topoSetFaceZoneSource.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2020-2021 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::topoSetFaceZoneSource
28
29Description
30 The \c topoSetFaceZoneSource is a intermediate class
31 for handling \c topoSet sources for selecting face zones.
32
33 The class is not an executable \c topoSet itself,
34 yet a provider for common entries to its derived \c topoSet.
35
36SourceFiles
37 topoSetFaceZoneSource.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef Foam_topoSetFaceZoneSource_H
42#define Foam_topoSetFaceZoneSource_H
43
44#include "topoSetSource.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51// Forward Declarations
52class faceZoneSet;
53
54/*---------------------------------------------------------------------------*\
55 Class topoSetFaceZoneSource Declaration
56\*---------------------------------------------------------------------------*/
59:
60 public topoSetSource
61{
62public:
63
64 // Declare run-time constructor selection table
65
66 // For the dictionary constructor
68 (
69 autoPtr,
71 word,
72 (
73 const polyMesh& mesh,
74 const dictionary& dict
75 ),
76 (mesh, dict)
77 );
78
79 // For the Istream constructor
81 (
82 autoPtr,
84 istream,
85 (
86 const polyMesh& mesh,
87 Istream& is
88 ),
89 (mesh, is)
90 );
91
92
93 // Constructors
94
95 //- Construct from mesh
96 explicit topoSetFaceZoneSource(const polyMesh& mesh);
97
98 //- Construct from mesh,
99 //- use "verbose" entry if present
101
102
103 //- Clone (disallowed)
105 {
107 return nullptr;
108 }
109
110
111 // Selectors
112
113 //- Return a reference to the selected source type
115 (
116 const word& sourceType,
117 const polyMesh& mesh,
118 const dictionary& dict
119 );
120
121 //- Return a reference to the selected source type
123 (
124 const word& sourceType,
125 const polyMesh& mesh,
126 Istream& is
127 );
128
129
130 //- Destructor
131 virtual ~topoSetFaceZoneSource() = default;
132
133
134 // Member Functions
135
136 //- The source category is a faceZone
137 virtual topoSetSource::sourceType setType() const
138 {
139 return FACEZONE_SOURCE;
140 }
141};
142
143
144// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146} // End namespace Foam
147
148// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150#endif
151
152// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
The topoSetFaceZoneSource is a intermediate class for handling topoSet sources for selecting face zon...
virtual ~topoSetFaceZoneSource()=default
Destructor.
declareRunTimeSelectionTable(autoPtr, topoSetFaceZoneSource, istream,(const polyMesh &mesh, Istream &is),(mesh, is))
autoPtr< topoSetFaceZoneSource > clone() const
Clone (disallowed)
static autoPtr< topoSetFaceZoneSource > New(const word &sourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected source type.
declareRunTimeSelectionTable(autoPtr, topoSetFaceZoneSource, word,(const polyMesh &mesh, const dictionary &dict),(mesh, dict))
virtual topoSetSource::sourceType setType() const
The source category is a faceZone.
Base class of a source for a topoSet.
Definition: topoSetSource.H:68
sourceType
Enumeration defining the types of sources.
Definition: topoSetSource.H:75
@ FACEZONE_SOURCE
Faces as zone.
Definition: topoSetSource.H:88
const polyMesh & mesh() const noexcept
Reference to the mesh.
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Namespace for OpenFOAM.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict