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{
48
49/*---------------------------------------------------------------------------*\
50 Class cyclicPointPatch Declaration
51\*---------------------------------------------------------------------------*/
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
109 //- Destructor
110 virtual ~cyclicPointPatch();
111
112
113 // Member Functions
114
115 // Access
116
117 //- Return the constraint type this pointPatch implements.
118 virtual const word& constraintType() const
119 {
120 return type();
121 }
122
123 //- Return the underlying cyclicPolyPatch
124 const cyclicPolyPatch& cyclicPatch() const
125 {
126 return cyclicPolyPatch_;
127 }
128
129 //- Return neighbour point patch
130 const cyclicPointPatch& neighbPatch() const
131 {
132 label patchi = cyclicPolyPatch_.neighbPatchID();
133 const pointPatch& pp = this->boundaryMesh()[patchi];
134 return refCast<const cyclicPointPatch>(pp);
135 }
136
137 //- Are the cyclic planes parallel
138 bool parallel() const
139 {
140 return cyclicPolyPatch_.parallel();
141 }
142
143 //- Return face transformation tensor
144 const tensorField& forwardT() const
145 {
146 return cyclicPolyPatch_.forwardT();
147 }
148
149 //- Return neighbour-cell transformation tensor
150 const tensorField& reverseT() const
151 {
152 return cyclicPolyPatch_.reverseT();
153 }
154
155
156 // Access functions for demand driven data
157
158 //- Return the set of pairs of points that require transformation
159 // and/or mapping. First index is on this patch, second on the
160 // neighbour patch.
161 virtual const edgeList& transformPairs() const;
162};
163
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167} // End namespace Foam
168
169// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170
171#endif
172
173// ************************************************************************* //
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Definition: boundaryMesh.H:63
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual bool parallel() const
Are the cyclic planes parallel.
virtual const tensorField & forwardT() const
Return face transformation tensor.
Cyclic patch for post-processing.
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.
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 const polyPatch & patch() const
Return the polyPatch.
Foam::pointBoundaryMesh.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:64
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73