setsToFaceZone.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-2013 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::setsToFaceZone
29
30Description
31 A \c topoSetSource to select all faces in a given \c faceSet,
32 which are oriented in slave cells of a given \c cellSet.
33
34 Operands:
35 \table
36 Operand | Type | Location
37 input 1 | faceSet | $FOAM_CASE/constant/polyMesh/sets/<set>
38 input 2 | cellSet | $FOAM_CASE/constant/polyMesh/sets/<set>
39 output | faceZone | $FOAM_CASE/constant/polyMesh/faceZones
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 faceZoneSet;
49 action <action>;
50
51 // Mandatory entries
52 source setToFaceZone;
53 faceSet <faceSetName>;
54 cellSet <cellSetName>;
55
56 // Optional entries
57 flip false;
58 }
59 \endverbatim
60
61 where the entries mean:
62 \table
63 Property | Description | Type | Req'd | Dflt
64 name | Name of faceZone | word | yes | -
65 type | Type name: faceZoneSet | word | yes | -
66 action | Action applied on faces - see below | word | yes | -
67 source | Source name: setsToFaceZone | word | yes | -
68 faceSet | Name of input faceSet | word | yes | -
69 cellSet | Name of input cellSet containing the slave cells <!--
70 --> | word | yes | -
71 flip | Flag to select master/slave cells | bool | no | false
72 \endtable
73
74 Options for the \c action entry:
75 \verbatim
76 new | Create a new faceZone from selected faces
77 add | Add selected faces of a faceZoneSet into this faceZone
78 subtract | Remove selected faces of a faceZoneSet from this faceZone
79 \endverbatim
80
81See also
82 - Foam::topoSetSource
83
84SourceFiles
85 setsToFaceZone.C
86
87\*---------------------------------------------------------------------------*/
88
89#ifndef setsToFaceZone_H
90#define setsToFaceZone_H
91
93
94// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95
96namespace Foam
97{
98
99/*---------------------------------------------------------------------------*\
100 Class setsToFaceZone Declaration
101\*---------------------------------------------------------------------------*/
102
103class setsToFaceZone
104:
105 public topoSetFaceZoneSource
106{
107 // Private Data
108
109 //- Add usage string
110 static addToUsageTable usage_;
111
112 //- Name of set to use
113 const word faceSetName_;
114
115 //- Name of set to use
116 const word cellSetName_;
117
118 //- Whether cellSet is slave cells or master cells
119 const bool flip_;
120
121
122public:
123
124 //- Runtime type information
125 TypeName("setsToFaceZone");
126
127
128 // Constructors
129
130 //- Construct from components
132 (
133 const polyMesh& mesh,
134 const word& faceSetName,
135 const word& cellSetName,
136 const bool flip
137 );
138
139 //- Construct from dictionary
140 setsToFaceZone(const polyMesh& mesh, const dictionary& dict);
141
142 //- Construct from Istream
143 setsToFaceZone(const polyMesh& mesh, Istream& is);
144
145
146 //- Destructor
147 virtual ~setsToFaceZone() = default;
148
149
150 // Member Functions
151
152 virtual void applyToSet
153 (
154 const topoSetSource::setAction action,
155 topoSet& set
156 ) const;
157};
158
159
160// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161
162} // End namespace Foam
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166#endif
167
168// ************************************************************************* //
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 select all faces in a given faceSet, which are oriented in slave cells of a given ...
TypeName("setsToFaceZone")
Runtime type information.
setsToFaceZone(const polyMesh &mesh, const word &faceSetName, const word &cellSetName, const bool flip)
Construct from components.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
virtual ~setsToFaceZone()=default
Destructor.
The topoSetFaceZoneSource is a intermediate class for handling topoSet sources for selecting face 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