cyclicPointPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::cyclicPointPatch
26 
27 Description
28  Cyclic patch for post-processing.
29 
30 SourceFiles
31  cyclicPointPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicPointPatch_H
36 #define cyclicPointPatch_H
37 
38 #include "coupledFacePointPatch.H"
39 #include "cyclicPolyPatch.H"
40 #include "pointBoundaryMesh.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class cyclicPointPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class cyclicPointPatch
52 :
54 {
55  // Private Data
56 
57  //- Local reference cast into the cyclic patch
58  const cyclicPolyPatch& cyclicPolyPatch_;
59 
60 
61  // Private Member Functions
62 
63  //- Disallow default bitwise copy construction
65 
66  //- Disallow default bitwise assignment
67  void operator=(const cyclicPointPatch&);
68 
69 
70  // Demand driven private data
71 
72  //- Initialise the calculation of the patch geometry
73  virtual void initCalcGeometry(PstreamBuffers&);
74 
75  //- Calculate the patch geometry
76  virtual void calcGeometry(PstreamBuffers&);
77 
78  //- Initialise the patches for moving points
79  virtual void initMovePoints(PstreamBuffers&, const pointField&);
80 
81  //- Correct patches after moving points
82  virtual void movePoints(PstreamBuffers&, const pointField&);
83 
84  //- Initialise the update of the patch topology
85  virtual void initUpdateMesh(PstreamBuffers&);
86 
87  //- Update of the patch topology
88  virtual void updateMesh(PstreamBuffers&);
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName(cyclicPolyPatch::typeName_());
95 
96 
97  // Constructors
98 
99  //- Construct from components
101  (
102  const polyPatch& patch,
103  const pointBoundaryMesh& bm
104  );
105 
106 
107  //- Destructor
108  virtual ~cyclicPointPatch();
109 
110 
111  // Member Functions
112 
113  // Access
114 
115  //- Return the underlying cyclicPolyPatch
116  const cyclicPolyPatch& cyclicPatch() const
117  {
118  return cyclicPolyPatch_;
119  }
120 
121  //- Return neighbour point patch
122  const cyclicPointPatch& nbrPatch() const
123  {
124  label patchi = cyclicPolyPatch_.nbrPatchID();
125  const pointPatch& pp = this->boundaryMesh()[patchi];
126  return refCast<const cyclicPointPatch>(pp);
127  }
128 
129  //- Return transformation between the coupled patches
130  virtual const transformer& transform() const
131  {
132  return cyclicPolyPatch_.transform();
133  }
134 
135 
136  // Access functions for demand driven data
137 
138  //- Return the set of pairs of points that require transformation
139  // and/or mapping. First index is on this patch, second on the
140  // neighbour patch.
141  virtual const edgeList& transformPairs() const;
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace Foam
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space...
Definition: transformer.H:83
Foam::pointBoundaryMesh.
TypeName(cyclicPolyPatch::typeName_())
Runtime type information.
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches ...
const cyclicPointPatch & nbrPatch() const
Return neighbour point patch.
virtual const transformer & transform() const
Return transformation between the coupled patches.
const cyclicPolyPatch & cyclicPatch() const
Return the underlying cyclicPolyPatch.
virtual ~cyclicPointPatch()
Destructor.
Cyclic patch for post-processing.
Cyclic plane patch.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: pointPatch.H:133
label patchi
virtual const transformer & transform() const
Return transformation between the coupled patches.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:56
const polyPatch & patch() const
Return the polyPatch.
virtual const edgeList & transformPairs() const
Return the set of pairs of points that require transformation.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
virtual label nbrPatchID() const
Neighbour patchID.
Namespace for OpenFOAM.