faceToFace.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::faceToFace
29
30Description
31 A \c topoSetFaceSource to select faces based on usage in another \c faceSet.
32
33 Operands:
34 \table
35 Operand | Type | Location
36 input | faceSet | $FOAM_CASE/constant/polyMesh/sets/<set>
37 output | faceSet | $FOAM_CASE/constant/polyMesh/sets/<set>
38 \endtable
39
40Usage
41 Minimal example by using \c system/topoSetDict.actions:
42 \verbatim
43 {
44 // Mandatory (inherited) entries
45 name <name>;
46 type faceSet;
47 action <action>;
48
49 // Mandatory entries
50 source faceToFace;
51
52 // Conditional mandatory entries
53 // Select either of the below
54
55 // Option-1
56 sets
57 (
58 <faceSetName0>
59 <faceSetName1>
60 ...
61 );
62
63 // Option-2
64 set <faceSetName>;
65 }
66 \endverbatim
67
68 where the entries mean:
69 \table
70 Property | Description | Type | Req'd | Dflt
71 name | Name of faceSet | word | yes | -
72 type | Type name: faceSet | word | yes | -
73 action | Action applied on faces - see below | word | yes | -
74 source | Source name: faceToFace | word | yes | -
75 \endtable
76
77 Options for the \c action entry:
78 \verbatim
79 new | Create a new faceSet from selected faces
80 add | Add selected faces into this faceSet
81 subtract | Remove selected faces from this faceSet
82 \endverbatim
83
84 Options for the conditional mandatory entries:
85 \verbatim
86 Entry | Description | Type | Req'd | Dflt
87 sets | Names of input faceSets | wordList | cond'l | -
88 set | Name of input faceSet | word | cond'l | -
89 \endverbatim
90
91Note
92 The order of precedence among the conditional mandatory entries from the
93 highest to the lowest is \c sets, and \c set.
94
95See also
96 - Foam::topoSetSource
97 - Foam::topoSetFaceSource
98
99SourceFiles
100 faceToFace.C
101
102\*---------------------------------------------------------------------------*/
103
104#ifndef faceToFace_H
105#define faceToFace_H
106
107#include "topoSetFaceSource.H"
108
109// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111namespace Foam
112{
113
114/*---------------------------------------------------------------------------*\
115 Class faceToFace Declaration
116\*---------------------------------------------------------------------------*/
117
118class faceToFace
119:
120 public topoSetFaceSource
121{
122 // Private Data
123
124 //- Add usage string
125 static addToUsageTable usage_;
126
127 //- Names of faceSets to use
128 wordList names_;
129
130
131public:
132
133 //- Runtime type information
134 TypeName("faceToFace");
135
136
137 // Constructors
138
139 //- Construct from components
140 faceToFace(const polyMesh& mesh, const word& setName);
141
142 //- Construct from dictionary
143 faceToFace(const polyMesh& mesh, const dictionary& dict);
144
145 //- Construct from Istream
146 faceToFace(const polyMesh& mesh, Istream& is);
147
148
149 //- Destructor
150 virtual ~faceToFace() = default;
151
152
153 // Member Functions
154
155 virtual void applyToSet
156 (
157 const topoSetSource::setAction action,
158 topoSet& set
159 ) const;
160};
161
162
163// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164
165} // End namespace Foam
166
167// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168
169#endif
170
171// ************************************************************************* //
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 topoSetFaceSource to select faces based on usage in another faceSet.
Definition: faceToFace.H:162
virtual ~faceToFace()=default
Destructor.
faceToFace(const polyMesh &mesh, const word &setName)
Construct from components.
Definition: faceToFace.C:57
TypeName("faceToFace")
Runtime type information.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Definition: faceToFace.C:99
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces.
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.
List< word > wordList
A List of words.
Definition: fileName.H:63
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73