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-2019 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 initGeometry(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 constraint type this pointPatch implements.
113  virtual const word& constraintType() const
114  {
115  return type();
116  }
117 
118  //- Return the underlying cyclicAMIPolyPatch
119  const cyclicAMIPolyPatch& cyclicAMIPatch() const
120  {
121  return cyclicAMIPolyPatch_;
122  }
123 
124  //- Return neighbour point patch
125  const cyclicAMIPointPatch& neighbPatch() const
126  {
127  label patchi = cyclicAMIPolyPatch_.neighbPatchID();
128  const pointPatch& pp = this->boundaryMesh()[patchi];
129  return refCast<const cyclicAMIPointPatch>(pp);
130  }
131 
132  //- Are the cyclic planes parallel
133  bool parallel() const
134  {
135  return cyclicAMIPolyPatch_.parallel();
136  }
137 
138  //- Return face transformation tensor
139  const tensorField& forwardT() const
140  {
141  return cyclicAMIPolyPatch_.forwardT();
142  }
143 
144  //- Return neighbour-cell transformation tensor
145  const tensorField& reverseT() const
146  {
147  return cyclicAMIPolyPatch_.reverseT();
148  }
149 
150 
151  // Member Operators
152 
153  //- Disallow default bitwise assignment
154  void operator=(const cyclicAMIPointPatch&);
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #endif
165 
166 // ************************************************************************* //
virtual ~cyclicAMIPointPatch()
Destructor.
void operator=(const cyclicAMIPointPatch &)
Disallow default bitwise assignment.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
virtual label neighbPatchID() const
Neighbour patch ID.
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
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Foam::pointBoundaryMesh.
const cyclicAMIPolyPatch & cyclicAMIPatch() const
Return the underlying cyclicAMIPolyPatch.
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches ...
virtual const tensorField & forwardT() const
Return face transformation tensor.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
virtual bool parallel() const
Are the cyclic planes parallel.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
A class for handling words, derived from string.
Definition: word.H:59
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Cyclic patch for Arbitrary Mesh Interface (AMI)
virtual const word & constraintType() const
Return the constraint type this pointPatch implements.
virtual bool coupled() const
Return true if this patch field is coupled.
const cyclicAMIPointPatch & neighbPatch() const
Return neighbour point patch.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: pointPatch.H:133
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
bool parallel() const
Are the cyclic planes parallel.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
label patchi
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
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.
Namespace for OpenFOAM.
const tensorField & forwardT() const
Return face transformation tensor.