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-2020 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 constraint type this pointPatch implements.
116  virtual const word& constraintType() const
117  {
118  return type();
119  }
120 
121  //- Return the underlying cyclicPolyPatch
122  const cyclicPolyPatch& cyclicPatch() const
123  {
124  return cyclicPolyPatch_;
125  }
126 
127  //- Return neighbour point patch
128  const cyclicPointPatch& nbrPatch() const
129  {
130  label patchi = cyclicPolyPatch_.nbrPatchID();
131  const pointPatch& pp = this->boundaryMesh()[patchi];
132  return refCast<const cyclicPointPatch>(pp);
133  }
134 
135  //- Return transformation between the coupled patches
136  virtual const transformer& transform() const
137  {
138  return cyclicPolyPatch_.transform();
139  }
140 
141 
142  // Access functions for demand driven data
143 
144  //- Return the set of pairs of points that require transformation
145  // and/or mapping. First index is on this patch, second on the
146  // neighbour patch.
147  virtual const edgeList& transformPairs() const;
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #endif
158 
159 // ************************************************************************* //
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 and rotations 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.
A class for handling words, derived from string.
Definition: word.H:59
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.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
virtual const edgeList & transformPairs() const
Return the set of pairs of points that require transformation.
virtual const word & constraintType() const
Return the constraint type this pointPatch implements.
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.