faceZoneToFaceZone.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::faceZoneToFaceZone
29
30Description
31 A \c topoSetSource to select faces of a given \c faceZone.
32
33 Operands:
34 \table
35 Operand | Type | Location
36 input | faceSet | $FOAM_CASE/constant/polyMesh/sets/<set>
37 output 1 | faceSet | $FOAM_CASE/constant/polyMesh/sets/<set>
38 output 2 | faceZone | $FOAM_CASE/constant/polyMesh/faceZones
39 \endtable
40
41Usage
42 Minimal example by using \c system/topoSetDict.actions:
43 \verbatim
44 {
45 // Mandatory (inherited) entries
46 name <name>;
47 type faceZoneSet;
48 action <action>;
49
50 // Mandatory entries
51 source faceZoneToFaceZone;
52 zone <faceZoneName>;
53 }
54 \endverbatim
55
56 where the entries mean:
57 \table
58 Property | Description | Type | Req'd | Dflt
59 name | Name of faceZone | word | yes | -
60 type | Type name: faceZoneSet | word | yes | -
61 action | Action applied on faces - see below | word | yes | -
62 source | Source name: faceZoneToFaceZone | word | yes | -
63 zone | Name of input faceZone | word | yes | -
64 \endtable
65
66 Options for the \c action entry:
67 \verbatim
68 new | Create a new faceZone from selected faces of a faceZone
69 add | Add selected faces of a faceZone into this faceZone
70 subtract | Remove selected faces of a faceZone from this faceZone
71 \endverbatim
72
73See also
74 - Foam::topoSetSource
75
76SourceFiles
77 faceZoneToFaceZone.C
78
79\*---------------------------------------------------------------------------*/
80
81#ifndef faceZoneToFaceZone_H
82#define faceZoneToFaceZone_H
83
85
86// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87
88namespace Foam
89{
90
91/*---------------------------------------------------------------------------*\
92 Class faceZoneToFaceZone Declaration
93\*---------------------------------------------------------------------------*/
94
95class faceZoneToFaceZone
96:
97 public topoSetFaceZoneSource
98{
99 // Private Data
100
101 //- Add usage string
102 static addToUsageTable usage_;
103
104 //- Name of set to use
105 word setName_;
106
107
108public:
109
110 //- Runtime type information
111 TypeName("faceZoneToFaceZone");
112
113
114 // Constructors
115
116 //- Construct from components
117 faceZoneToFaceZone(const polyMesh& mesh, const word& setName);
118
119 //- Construct from dictionary
120 faceZoneToFaceZone(const polyMesh& mesh, const dictionary& dict);
121
122 //- Construct from Istream
123 faceZoneToFaceZone(const polyMesh& mesh, Istream& is);
124
125
126 //- Destructor
127 virtual ~faceZoneToFaceZone() = default;
128
129
130 // Member Functions
131
132 virtual void applyToSet
133 (
134 const topoSetSource::setAction action,
135 topoSet& set
136 ) const;
137};
138
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141
142} // End namespace Foam
143
144// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146#endif
147
148// ************************************************************************* //
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
A topoSetSource to select faces of a given faceZone.
TypeName("faceZoneToFaceZone")
Runtime type information.
virtual ~faceZoneToFaceZone()=default
Destructor.
faceZoneToFaceZone(const polyMesh &mesh, const word &setName)
Construct from components.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
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