The open source CFD toolbox
pointToPoint.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::pointToPoint
29
30Description
31 A \c topoSetPointSource to select all points from given \c pointSet(s).
32
33 Operands
34 \table
35 Operand | Type | Location
36 input | pointSet(s) | $FOAM_CASE/constant/polyMesh/sets/<set> 37 output | pointSet |$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 pointSet;
47 action <action>;
48
49 // Mandatory entries
50 source pointToPoint;
51
52 // Conditional mandatory entries
53 // Select either of the below
54
55 // Option-1
56 sets
57 (
58 <pointSetName1>
59 <pointSetName2>
60 ...
61 );
62
63 // Option-2
64 set <pointSetName>;
65 }
66 \endverbatim
67
68 where the entries mean:
69 \table
70 Property | Description | Type | Req'd | Dflt
71 name | Name of pointSet | word | yes | -
72 type | Type name: pointSet | word | yes | -
73 action | Action applied on points - see below | word | yes | -
74 source | Source name: pointToPoint | word | yes | -
75 \endtable
76
77 Options for the \c action entry:
78 \verbatim
79 new | Create a new pointSet from selected points
81 subtract | Remove selected points from this pointSet
82 \endverbatim
83
84 Options for the conditional mandatory entries:
85 \verbatim
86 Entry | Description | Type | Req'd | Dflt
87 sets | Names of input pointSets | wordList | cond'l | -
88 set | Name of input pointSet | 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
96 - Foam::topoSetSource
97 - Foam::topoSetPointSource
98
99SourceFiles
100 pointToPoint.C
101
102\*---------------------------------------------------------------------------*/
103
104#ifndef pointToPoint_H
105#define pointToPoint_H
106
107#include "topoSetPointSource.H"
108
109// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111namespace Foam
112{
113
114/*---------------------------------------------------------------------------*\
115 Class pointToPoint Declaration
116\*---------------------------------------------------------------------------*/
117
118class pointToPoint
119:
120 public topoSetPointSource
121{
122 // Private Data
123
126
127 //- Names of sets to use
128 wordList names_;
129
130
131public:
132
133 //- Runtime type information
134 TypeName("pointToPoint");
135
136
137 // Constructors
138
139 //- Construct from components
140 pointToPoint(const polyMesh& mesh, const word& setName);
141
142 //- Construct from dictionary
143 pointToPoint(const polyMesh& mesh, const dictionary& dict);
144
145 //- Construct from Istream
146 pointToPoint(const polyMesh& mesh, Istream& is);
147
148
149 //- Destructor
150 virtual ~pointToPoint() = 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 topoSetPointSource to select all points from given pointSet(s).
Definition: pointToPoint.H:162
pointToPoint(const polyMesh &mesh, const word &setName)
Construct from components.
Definition: pointToPoint.C:57
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Definition: pointToPoint.C:99
TypeName("pointToPoint")
Runtime type information.
virtual ~pointToPoint()=default
Destructor.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
The topoSetPointSource is a intermediate class for handling topoSet sources for selecting points.
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