Loading...
Searching...
No Matches
cyclicPointPatch.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-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::cyclicPointPatch
28
29Description
30 Cyclic patch for post-processing.
31
32SourceFiles
33 cyclicPointPatch.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef cyclicPointPatch_H
38#define cyclicPointPatch_H
39
41#include "cyclicPolyPatch.H"
42#include "pointBoundaryMesh.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
49/*---------------------------------------------------------------------------*\
50 Class cyclicPointPatch Declaration
51\*---------------------------------------------------------------------------*/
52
53class cyclicPointPatch
54:
56{
57 // Private data
58
59 //- Local reference cast into the cyclic patch
60 const cyclicPolyPatch& cyclicPolyPatch_;
61
62
63 // Private Member Functions
64
65 //- No copy construct
66 cyclicPointPatch(const cyclicPointPatch&) = delete;
67
68 //- No copy assignment
69 void operator=(const cyclicPointPatch&) = delete;
70
71
72 // Demand driven private data
73
74 //- Initialise the calculation of the patch geometry
75 virtual void initGeometry(PstreamBuffers&);
76
77 //- Calculate the patch geometry
78 virtual void calcGeometry(PstreamBuffers&);
79
80 //- Initialise the patches for moving points
81 virtual void initMovePoints(PstreamBuffers&, const pointField&);
82
83 //- Correct patches after moving points
84 virtual void movePoints(PstreamBuffers&, const pointField&);
85
86 //- Initialise the update of the patch topology
87 virtual void initUpdateMesh(PstreamBuffers&);
88
89 //- Update of the patch topology
90 virtual void updateMesh(PstreamBuffers&);
91
92
93public:
94
95 //- Runtime type information
96 TypeName(cyclicPolyPatch::typeName_());
97
98
99 // Constructors
100
101 //- Construct from components
103 (
104 const polyPatch& patch,
105 const pointBoundaryMesh& bm
106 );
107
108 //- Construct given the original patch and a map
110 (
111 const cyclicPointPatch& patch,
112 const pointBoundaryMesh& bm,
113 const label index,
114 const labelUList& mapAddressing,
115 const labelUList& reversePointMap
116 );
117
118 //- Construct and return a subset clone,
119 //- resetting the point list and boundary mesh
121 (
122 const pointBoundaryMesh& bm,
123 const label index,
124 const labelUList& mapAddressing,
125 const labelUList& reversePointMap
126 ) const
127 {
129 (
130 *this,
131 bm,
132 index,
133 mapAddressing,
134 reversePointMap
135 );
136 }
137
138
139 //- Destructor
140 virtual ~cyclicPointPatch();
142
143 // Member Functions
144
145 // Access
146
147 //- Return the constraint type this pointPatch implements.
148 virtual const word& constraintType() const
149 {
150 return type();
151 }
152
153 //- Return the underlying cyclicPolyPatch
154 const cyclicPolyPatch& cyclicPatch() const
155 {
156 return cyclicPolyPatch_;
157 }
158
159 //- Return neighbour point patch
160 const cyclicPointPatch& neighbPatch() const
161 {
162 label patchi = cyclicPolyPatch_.neighbPatchID();
163 const pointPatch& pp = this->boundaryMesh()[patchi];
165 }
166
167 //- Are the cyclic planes parallel
168 bool parallel() const
169 {
170 return cyclicPolyPatch_.parallel();
171 }
172
173 //- Return face transformation tensor
174 const tensorField& forwardT() const
175 {
176 return cyclicPolyPatch_.forwardT();
177 }
178
179 //- Return neighbour-cell transformation tensor
180 const tensorField& reverseT() const
182 return cyclicPolyPatch_.reverseT();
183 }
184
185
186 // Access functions for demand driven data
187
188 //- Return the set of pairs of points that require transformation
189 // and/or mapping. First index is on this patch, second on the
190 // neighbour patch.
191 virtual const edgeList& transformPairs() const;
192};
193
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197} // End namespace Foam
198
199// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200
201#endif
202
203// ************************************************************************* //
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
static autoPtr< T > NewFrom(Args &&... args)
Construct autoPtr from derived type with forwarding arguments.
Definition autoPtr.H:193
coupledFacePointPatch(const coupledFacePointPatch &)=delete
No copy construct.
virtual ~cyclicPointPatch()
Destructor.
const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual const edgeList & transformPairs() const
Return the set of pairs of points that require transformation.
const tensorField & forwardT() const
Return face transformation tensor.
bool parallel() const
Are the cyclic planes parallel.
TypeName(cyclicPolyPatch::typeName_())
Runtime type information.
virtual const word & constraintType() const
Return the constraint type this pointPatch implements.
virtual autoPtr< pointPatch > clone(const pointBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const labelUList &reversePointMap) const
Construct and return a subset clone, resetting the point list and boundary mesh.
const cyclicPolyPatch & cyclicPatch() const
Return the underlying cyclicPolyPatch.
const cyclicPointPatch & neighbPatch() const
Return neighbour point patch.
Cyclic plane patch.
virtual label neighbPatchID() const
Neighbour patchID.
virtual label index() const
Return the index of this patch in the pointBoundaryMesh.
virtual const polyPatch & patch() const
Return the polyPatch.
friend class cyclicPointPatch
A pointBoundaryMesh is a pointPatch list with registered IO, a reference to the associated pointMesh,...
Basic pointPatch represents a set of points from the mesh.
Definition pointPatch.H:67
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition pointPatch.H:250
pointPatch(const pointPatch &)=delete
No copy construct.
A patch is a list of labels that address the faces in the global face list.
Definition polyPatch.H:73
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
List< edge > edgeList
List of edge.
Definition edgeList.H:32
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
Definition typeInfo.H:172
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition POSIX.C:801
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
Definition UList.H:75
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68