setToCellZone.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) 2011 OpenFOAM Foundation
9 Copyright (C) 2018-2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::setToCellZone
29
30Description
31 A \c topoSetSource to convert a \c cellSet
32 to a \c cellZone (and associated \c cellSet).
33
34 Operands:
35 \table
36 Operand | Type | Location
37 input | cellSet | $FOAM_CASE/constant/polyMesh/sets/<set>
38 output 1 | cellSet | $FOAM_CASE/constant/polyMesh/sets/<set>
39 output 2 | cellZone | $FOAM_CASE/constant/polyMesh/cellZones
40 \endtable
41
42Usage
43 Minimal example by using \c system/topoSetDict.actions:
44 \verbatim
45 {
46 // Mandatory (inherited) entries
47 name <name>;
48 type cellZoneSet;
49 action <action>;
50
51 // Mandatory entries
52 source setToCellZone;
53 set <cellSetName>;
54 }
55 \endverbatim
56
57 where the entries mean:
58 \table
59 Property | Description | Type | Req'd | Dflt
60 name | Name of cellZone | word | yes | -
61 type | Type name: cellZoneSet | word | yes | -
62 action | Action applied on cells - see below | word | yes | -
63 source | Source name: setToCellZone | word | yes | -
64 set | Name of input cellSet | word | yes | -
65 \endtable
66
67 Options for the \c action entry:
68 \verbatim
69 new | Create a new cellZone from selected cells of a cellSet
70 add | Add selected cells of a cellSet into this cellZone
71 subtract | Remove selected cells of a cellSet from this cellZone
72 \endverbatim
73
74See also
75 - Foam::topoSetSource
76
77SourceFiles
78 setToCellZone.C
79
80\*---------------------------------------------------------------------------*/
81
82#ifndef setToCellZone_H
83#define setToCellZone_H
84
86
87// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
88
89namespace Foam
90{
91
92/*---------------------------------------------------------------------------*\
93 Class setToCellZone Declaration
94\*---------------------------------------------------------------------------*/
95
96class setToCellZone
97:
98 public topoSetCellZoneSource
99{
100 // Private Data
101
102 //- Add usage string
103 static addToUsageTable usage_;
104
105 //- Name of cellSet to use
106 word setName_;
107
108
109public:
110
111 //- Runtime type information
112 TypeName("setToCellZone");
113
114
115 // Constructors
116
117 //- Construct from components
118 setToCellZone(const polyMesh& mesh, const word& setName);
119
120 //- Construct from dictionary
121 setToCellZone(const polyMesh& mesh, const dictionary& dict);
122
123 //- Construct from Istream
124 setToCellZone(const polyMesh& mesh, Istream& is);
125
126
127 //- Destructor
128 virtual ~setToCellZone() = default;
129
130
131 // Member Functions
132
133 virtual void applyToSet
134 (
135 const topoSetSource::setAction action,
136 topoSet& set
137 ) const;
138};
139
140
141// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142
143} // End namespace Foam
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147#endif
148
149// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
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
A topoSetSource to convert a cellSet to a cellZone (and associated cellSet).
setToCellZone(const polyMesh &mesh, const word &setName)
Construct from components.
Definition: setToCellZone.C:58
virtual ~setToCellZone()=default
Destructor.
TypeName("setToCellZone")
Runtime type information.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Definition: setToCellZone.C:93
The topoSetCellZoneSource is a intermediate class for handling topoSet sources for selecting cell zon...
Class with constructor to add usage string to table.
setAction
Enumeration defining various actions.
const polyMesh & mesh() const noexcept
Reference to the mesh.
General set of labels of mesh quantity (points, cells, faces).
Definition: topoSet.H:67
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73