Loading...
Searching...
No Matches
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,2024 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::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 one of the below
54
55 // Option-1
56 sets
57 (
58 <pointSetName1>
59 <pointSetName2>
60 ...
61 );
62
63 // Option-2
64 zones
65 (
66 <pointZoneName0>
67 <pointZoneName1>
68 ...
69 );
70
71 // Option-3
72 set <pointSetName>;
73
74 // Option-4
75 zone <pointZoneName>;
76 }
77 \endverbatim
78
79 where the entries mean:
80 \table
81 Property | Description | Type | Req'd | Dflt
82 name | Name of pointSet | word | yes | -
83 type | Type name: pointSet | word | yes | -
84 action | Action applied on points - see below | word | yes | -
85 source | Source name: pointToPoint | word | yes | -
86 \endtable
87
88 Options for the \c action entry:
89 \verbatim
90 new | Create a new pointSet from selected points
91 add | Add selected points into this pointSet
92 subtract | Remove selected points from this pointSet
93 \endverbatim
94
95 Options for the conditional mandatory entries (in order of precedence):
96 \verbatim
97 Entry | Description | Type | Req'd | Dflt
98 sets | Names of input pointSets | wordList | cond'l | -
99 zones | Names of input pointZones | wordList | cond'l | -
100 set | Name of input pointSet | word | cond'l | -
101 zone | Name of input pointZone | word | cond'l | -
102 \endverbatim
103
104See also
105 - Foam::topoSetSource
106 - Foam::topoSetPointSource
107
108SourceFiles
109 pointToPoint.C
110
111\*---------------------------------------------------------------------------*/
112
113#ifndef pointToPoint_H
114#define pointToPoint_H
115
116#include "topoSetPointSource.H"
117
118// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120namespace Foam
121{
122
123/*---------------------------------------------------------------------------*\
124 Class pointToPoint Declaration
125\*---------------------------------------------------------------------------*/
126
127class pointToPoint
128:
129 public topoSetPointSource
130{
131 // Private Data
132
133 //- Add usage string
134 static addToUsageTable usage_;
135
136 //- Names of sets or zones to use
137 wordList names_;
138
139 //- Is name a set or a zone
140 const bool isZone_;
141
142
143public:
144
145 //- Runtime type information
146 TypeName("pointToPoint");
147
148
149 // Constructors
150
151 //- Construct from components
152 pointToPoint(const polyMesh& mesh, const word& setName);
153
154 //- Construct from dictionary
155 pointToPoint(const polyMesh& mesh, const dictionary& dict);
156
157 //- Construct from Istream
158 pointToPoint(const polyMesh& mesh, Istream& is);
159
160
161 //- Destructor
162 virtual ~pointToPoint() = default;
163
165 // Member Functions
166
167 virtual void applyToSet
168 (
169 const topoSetSource::setAction action,
170 topoSet& set
171 ) const;
172};
173
174
175// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176
177} // End namespace Foam
178
179// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180
181#endif
182
183// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A topoSetPointSource to select all points from given pointSet(s).
pointToPoint(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.
TypeName("pointToPoint")
Runtime type information.
virtual ~pointToPoint()=default
Destructor.
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
The topoSetPointSource is a intermediate class for handling topoSet sources for selecting points.
topoSetPointSource(const polyMesh &mesh)
Construct from mesh.
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:63
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
List< word > wordList
List of word.
Definition fileName.H:60
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68