cyclicAMIPointPatch.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::cyclicAMIPointPatch
26 
27 Description
28  Cyclic AMI point patch - place holder only
29 
30 SourceFiles
31  cyclicAMIPointPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicAMIPointPatch_H
36 #define cyclicAMIPointPatch_H
37 
38 #include "coupledFacePointPatch.H"
39 #include "cyclicAMIPolyPatch.H"
40 #include "pointBoundaryMesh.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class cyclicAMIPointPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
54 {
55  // Private Data
56 
57  //- Local reference cast into the cyclic AMI patch
58  const cyclicAMIPolyPatch& cyclicAMIPolyPatch_;
59 
60 
61 protected:
62 
63  // Protected Member Functions
64 
65  //- Initialise the calculation of the patch geometry
66  virtual void initCalcGeometry(PstreamBuffers&);
67 
68  //- Calculate the patch geometry
69  virtual void calcGeometry(PstreamBuffers&);
70 
71  //- Initialise the patches for moving points
72  virtual void initMovePoints(PstreamBuffers&, const pointField&);
73 
74  //- Correct patches after moving points
75  virtual void movePoints(PstreamBuffers&, const pointField&);
76 
77  //- Initialise the update of the patch topology
78  virtual void initUpdateMesh(PstreamBuffers&);
79 
80  //- Update of the patch topology
81  virtual void updateMesh(PstreamBuffers&);
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName(cyclicAMIPolyPatch::typeName_());
88 
89 
90  // Constructors
91 
92  //- Construct from components
94  (
95  const polyPatch& patch,
96  const pointBoundaryMesh& bm
97  );
98 
99  //- Disallow default bitwise copy construction
101 
102 
103  //- Destructor
104  virtual ~cyclicAMIPointPatch();
105 
106 
107  // Member Functions
108 
109  //- Return true if this patch field is coupled
110  virtual bool coupled() const;
111 
112  //- Return the underlying cyclicAMIPolyPatch
113  const cyclicAMIPolyPatch& cyclicAMIPatch() const
114  {
115  return cyclicAMIPolyPatch_;
116  }
117 
118  //- Return neighbour point patch
119  const cyclicAMIPointPatch& nbrPatch() const
120  {
121  label patchi = cyclicAMIPolyPatch_.nbrPatchID();
122  const pointPatch& pp = this->boundaryMesh()[patchi];
123  return refCast<const cyclicAMIPointPatch>(pp);
124  }
125 
126  //- Return transformation between the coupled patches
127  virtual const transformer& transform() const
128  {
129  return cyclicAMIPolyPatch_.transform();
130  }
131 
132 
133  // Member Operators
134 
135  //- Disallow default bitwise assignment
136  void operator=(const cyclicAMIPointPatch&);
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
virtual ~cyclicAMIPointPatch()
Destructor.
void operator=(const cyclicAMIPointPatch &)
Disallow default bitwise assignment.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
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
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Foam::pointBoundaryMesh.
const cyclicAMIPolyPatch & cyclicAMIPatch() const
Return the underlying cyclicAMIPolyPatch.
const cyclicAMIPointPatch & nbrPatch() const
Return neighbour point patch.
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches ...
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
virtual label nbrPatchID() const
Neighbour patch ID.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual const transformer & transform() const
Return transformation between the coupled patches.
Cyclic patch for Arbitrary Mesh Interface (AMI)
virtual bool coupled() const
Return true if this patch field is coupled.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: pointPatch.H:133
label patchi
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:56
virtual const transformer & transform() const
Return transformation between the coupled patches.
const polyPatch & patch() const
Return the polyPatch.
TypeName(cyclicAMIPolyPatch::typeName_())
Runtime type information.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Cyclic AMI point patch - place holder only.
cyclicAMIPointPatch(const polyPatch &patch, const pointBoundaryMesh &bm)
Construct from components.
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Namespace for OpenFOAM.