All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2023 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  // Demand driven private data
62 
63  //- Initialise the calculation of the patch geometry
64  virtual void initCalcGeometry(PstreamBuffers&);
65 
66  //- Calculate the patch geometry
67  virtual void calcGeometry(PstreamBuffers&);
68 
69  //- Initialise the patches for moving points
70  virtual void initMovePoints(PstreamBuffers&, const pointField&);
71 
72  //- Correct patches after moving points
73  virtual void movePoints(PstreamBuffers&, const pointField&);
74 
75  //- Initialise the update of the patch topology
76  virtual void initTopoChange(PstreamBuffers&);
77 
78  //- Update of the patch topology
79  virtual void topoChange(PstreamBuffers&);
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName(cyclicPolyPatch::typeName_());
86 
87 
88  // Constructors
89 
90  //- Construct from components
92  (
93  const polyPatch& patch,
94  const pointBoundaryMesh& bm
95  );
96 
97  //- Disallow default bitwise copy construction
98  cyclicPointPatch(const cyclicPointPatch&) = delete;
99 
100 
101  //- Destructor
102  virtual ~cyclicPointPatch();
103 
104 
105  // Member Functions
106 
107  // Access
108 
109  //- Return the underlying cyclicPolyPatch
110  const cyclicPolyPatch& cyclicPatch() const
111  {
112  return cyclicPolyPatch_;
113  }
114 
115  //- Return neighbour point patch
116  const cyclicPointPatch& nbrPatch() const
117  {
118  label patchi = cyclicPolyPatch_.nbrPatchIndex();
119  const pointPatch& pp = this->boundaryMesh()[patchi];
120  return refCast<const cyclicPointPatch>(pp);
121  }
122 
123  //- Return transformation between the coupled patches
124  virtual const transformer& transform() const
125  {
126  return cyclicPolyPatch_.transform();
127  }
128 
129 
130  // Access functions for demand driven data
131 
132  //- Return the set of pairs of points that require transformation
133  // and/or mapping. First index is on this patch, second on the
134  // neighbour patch.
135  virtual const edgeList& transformPairs() const;
136 
137 
138  // Member Operators
139 
140  //- Disallow default bitwise assignment
141  void operator=(const cyclicPointPatch&) = delete;
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace Foam
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 #endif
152 
153 // ************************************************************************* //
Buffers for inter-processor communications streams (UOPstream, UIPstream).
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches
Cyclic patch for post-processing.
virtual ~cyclicPointPatch()
Destructor.
virtual const edgeList & transformPairs() const
Return the set of pairs of points that require transformation.
const cyclicPointPatch & nbrPatch() const
Return neighbour point patch.
TypeName(cyclicPolyPatch::typeName_())
Runtime type information.
virtual const transformer & transform() const
Return transformation between the coupled patches.
void operator=(const cyclicPointPatch &)=delete
Disallow default bitwise assignment.
const cyclicPolyPatch & cyclicPatch() const
Return the underlying cyclicPolyPatch.
Cyclic plane patch.
virtual const transformer & transform() const
Return transformation between the coupled patches.
virtual label nbrPatchIndex() const
Neighbour patchID.
const polyPatch & patch() const
Return the polyPatch.
friend class cyclicPointPatch
Foam::pointBoundaryMesh.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:57
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: pointPatch.H:133
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space.
Definition: transformer.H:84
label patchi
Namespace for OpenFOAM.
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