OpenFOAM: API Guide
v2006
The open source CFD toolbox
cellToPoint.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
-------------------------------------------------------------------------------
11
License
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
27
Class
28
Foam::cellToPoint
29
30
Description
31
A \c topoSetPointSource to select all the points from given \c cellSet(s).
32
33
Operands:
34
\table
35
Operand | Type | Location
36
input | cellSet(s) | $FOAM_CASE/constant/polyMesh/sets/<set>
37
output | pointSet | $FOAM_CASE/constant/polyMesh/sets/<set>
38
\endtable
39
40
Usage
41
Minimal example by using \c system/topoSetDict.actions:
42
\verbatim
43
{
44
// Mandatory (inherited) entries
45
name <name>;
46
type pointSet;
47
action <action>;
48
49
// Mandatory entries
50
source cellToPoint;
51
option <option>;
52
53
// Conditional mandatory entries
54
// Select either of the below
55
56
// Option-1
57
sets
58
(
59
<pointSetName1>
60
<pointSetName2>
61
...
62
);
63
64
// Option-2
65
set <pointSetName>;
66
}
67
\endverbatim
68
69
where the entries mean:
70
\table
71
Property | Description | Type | Req'd | Dflt
72
name | Name of pointSet | word | yes | -
73
type | Type name: pointSet | word | yes | -
74
action | Action applied on points - see below | word | yes | -
75
source | Source name: cellToPoint | word | yes | -
76
option | Selection type - see below | word | yes | -
77
\endtable
78
79
Options for the \c action entry:
80
\verbatim
81
new | Create a new pointSet from selected points
82
add | Add selected points into this pointSet
83
subtract | Remove selected points from this pointSet
84
\endverbatim
85
86
Options for the \c option entry:
87
\verbatim
88
all | Select all points of cells in the cellSet
89
\endverbatim
90
91
Options for the conditional mandatory entries:
92
\verbatim
93
Entry | Description | Type | Req'd | Dflt
94
sets | Names of input cellSets | wordList | cond'l | -
95
set | Name of input cellSet | word | cond'l | -
96
\verbatim
97
98
Note
99
The order of precedence among the conditional mandatory entries from the
100
highest to the lowest is \c sets, and \c set.
101
102
See also
103
- Foam::topoSetSource
104
- Foam::topoSetPointSource
105
106
SourceFiles
107
cellToPoint.C
108
109
\*---------------------------------------------------------------------------*/
110
111
#ifndef cellToPoint_H
112
#define cellToPoint_H
113
114
#include "
topoSetPointSource.H
"
115
#include "
Enum.H
"
116
117
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119
namespace
Foam
120
{
121
122
/*---------------------------------------------------------------------------*\
123
Class cellToPoint Declaration
124
\*---------------------------------------------------------------------------*/
125
126
class
cellToPoint
127
:
128
public
topoSetPointSource
129
{
130
131
public
:
132
//- Enumeration defining the valid options
133
enum
cellAction
134
{
135
ALL
136
};
137
138
139
private
:
140
141
// Private Data
142
143
//- Add usage string
144
static
addToUsageTable usage_;
145
146
static
const
Enum<cellAction> cellActionNames_;
147
148
//- Names of sets to use
149
wordList
names_;
150
151
//- Option
152
cellAction option_;
153
154
155
// Private Member Functions
156
157
void
combine
(topoSet& set,
const
bool
add
,
const
word& setName)
const
;
158
159
160
public
:
161
162
//- Runtime type information
163
TypeName
(
"cellToPoint"
);
164
165
166
// Constructors
167
168
//- Construct from components
169
cellToPoint
170
(
171
const
polyMesh&
mesh
,
172
const
word& setName,
173
const
cellAction option
174
);
175
176
//- Construct from dictionary
177
cellToPoint(
const
polyMesh&
mesh
,
const
dictionary&
dict
);
178
179
//- Construct from Istream
180
cellToPoint(
const
polyMesh&
mesh
, Istream& is);
181
182
183
//- Destructor
184
virtual
~cellToPoint() =
default
;
185
186
187
// Member Functions
188
189
virtual
void
applyToSet
190
(
191
const
topoSetSource::setAction
action,
192
topoSet& set
193
)
const
;
194
};
195
196
197
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198
199
}
// End namespace Foam
200
201
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202
203
#endif
204
205
// ************************************************************************* //
TypeName
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition:
typeInfo.H:73
Foam::topoSetSource::setAction
setAction
Enumeration defining the valid actions.
Definition:
topoSetSource.H:99
Foam::wordList
List< word > wordList
A List of words.
Definition:
fileName.H:59
Foam::ListListOps::combine
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
Definition:
ListListOps.C:69
dict
dictionary dict
Definition:
searchingEngine.H:14
Foam::add
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition:
FieldFieldFunctions.C:939
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
topoSetPointSource.H
Enum.H
src
meshTools
sets
pointSources
cellToPoint
cellToPoint.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.