The open source CFD toolbox
setToPointZone.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-------------------------------------------------------------------------------
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
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::setToPointZone
29
30Description
31 A \c topoSetSource to convert a \c pointSet
32 to a \c pointZone (and associated \c pointSet).
33
34 Operands:
35 \table
36 Operand | Type | Location
37 input | pointSet | $FOAM_CASE/constant/polyMesh/sets/<set> 38 output 1 | pointSet |$FOAM_CASE/constant/polyMesh/sets/<set>
39 output 2 | pointZone | \$FOAM_CASE/constant/polyMesh/pointZones
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 pointZoneSet;
49 action <action>;
50
51 // Mandatory entries
52 source setToCellZone;
53 set <pointSetName>;
54 }
55 \endverbatim
56
57 where the entries mean:
58 \table
59 Property | Description | Type | Req'd | Dflt
60 name | Name of pointZone | word | yes | -
61 type | Type name: pointZoneSet | word | yes | -
62 action | Action applied on points - see below | word | yes | -
63 source | Source name: setToPointZone | word | yes | -
64 set | Name of input pointSet | word | yes | -
65 \endtable
66
67 Options for the \c action entry:
68 \verbatim
69 new | Create a new pointZone from selected points of a pointSet
70 add | Add selected points of a pointSet into this pointZone
71 subtract | Remove selected points of a pointSet from this pointZone
72 \endverbatim
73
75 - Foam::topoSetSource
76 - Foam::topoSetPointSource
77
78SourceFiles
79 setToPointZone.C
80
81\*---------------------------------------------------------------------------*/
82
83#ifndef setToPointZone_H
84#define setToPointZone_H
85
87
88// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
89
90namespace Foam
91{
92
93/*---------------------------------------------------------------------------*\
94 Class setToPointZone Declaration
95\*---------------------------------------------------------------------------*/
96
97class setToPointZone
98:
99 public topoSetPointZoneSource
100{
101 // Private Data
102
105
106 //- Name of set to use
107 word setName_;
108
109
110public:
111
112 //- Runtime type information
113 TypeName("setToPointZone");
114
115
116 // Constructors
117
118 //- Construct from components
120 (
121 const polyMesh& mesh,
122 const word& setName
123 );
124
125 //- Construct from dictionary
126 setToPointZone(const polyMesh& mesh, const dictionary& dict);
127
128 //- Construct from Istream
129 setToPointZone(const polyMesh& mesh, Istream& is);
130
131
132 //- Destructor
133 virtual ~setToPointZone() = default;
134
135
136 // Member Functions
137
138 virtual void applyToSet
139 (
140 const topoSetSource::setAction action,
141 topoSet& set
142 ) const;
143};
144
145
146// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147
148} // End namespace Foam
149
150// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151
152#endif
153
154// ************************************************************************* //
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 pointSet to a pointZone (and associated pointSet).
TypeName("setToPointZone")
Runtime type information.
setToPointZone(const polyMesh &mesh, const word &setName)
Construct from components.
virtual ~setToPointZone()=default
Destructor.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
The topoSetPointZoneSource is a intermediate class for handling topoSet sources for selecting point z...
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