topoSetCellZoneSource.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::topoSetCellZoneSource
28
29Description
30 The \c topoSetCellZoneSource is a intermediate class
31 for handling \c topoSet sources for selecting cell 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 topoSetCellZoneSource.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef topoSetCellZoneSource_H
42#define topoSetCellZoneSource_H
43
44#include "topoSetSource.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51// Forward Declarations
52class cellZoneSet;
53
54/*---------------------------------------------------------------------------*\
55 Class topoSetCellZoneSource 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 topoSetCellZoneSource(const polyMesh& mesh);
97
98 //- Construct from mesh, use "verbose" entry if present
100
101
102 //- Clone (disallowed)
104 {
106 return nullptr;
107 }
108
109
110 // Selectors
111
112 //- Return a reference to the selected source type
114 (
115 const word& sourceType,
116 const polyMesh& mesh,
117 const dictionary& dict
118 );
119
120 //- Return a reference to the selected source type
122 (
123 const word& sourceType,
124 const polyMesh& mesh,
125 Istream& is
126 );
127
128
129 //- Destructor
130 virtual ~topoSetCellZoneSource() = default;
131
132
133 // Member Functions
134
135 //- The source category is a cellZone
136 virtual topoSetSource::sourceType setType() const
137 {
138 return CELLZONE_SOURCE;
139 }
140};
141
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145} // End namespace Foam
146
147// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148
149#endif
150
151// ************************************************************************* //
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 topoSetCellZoneSource is a intermediate class for handling topoSet sources for selecting cell zon...
static autoPtr< topoSetCellZoneSource > New(const word &sourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected source type.
autoPtr< topoSetCellZoneSource > clone() const
Clone (disallowed)
declareRunTimeSelectionTable(autoPtr, topoSetCellZoneSource, word,(const polyMesh &mesh, const dictionary &dict),(mesh, dict))
declareRunTimeSelectionTable(autoPtr, topoSetCellZoneSource, istream,(const polyMesh &mesh, Istream &is),(mesh, is))
virtual topoSetSource::sourceType setType() const
The source category is a cellZone.
virtual ~topoSetCellZoneSource()=default
Destructor.
Base class of a source for a topoSet.
Definition: topoSetSource.H:68
sourceType
Enumeration defining the types of sources.
Definition: topoSetSource.H:75
@ CELLZONE_SOURCE
Cells as zone.
Definition: topoSetSource.H:87
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