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-2018 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  // Private Member Functions
62 
63  //- Disallow default construct as copy
65 
66  //- Disallow default assignment
67  void operator=(const cyclicAMIPointPatch&);
68 
69 
70 protected:
71 
72  // Protected Member Functions
73 
74  //- Initialise the calculation of the patch geometry
75  virtual void initGeometry(PstreamBuffers&);
76 
77  //- Calculate the patch geometry
78  virtual void calcGeometry(PstreamBuffers&);
79 
80  //- Initialise the patches for moving points
81  virtual void initMovePoints(PstreamBuffers&, const pointField&);
82 
83  //- Correct patches after moving points
84  virtual void movePoints(PstreamBuffers&, const pointField&);
85 
86  //- Initialise the update of the patch topology
87  virtual void initUpdateMesh(PstreamBuffers&);
88 
89  //- Update of the patch topology
90  virtual void updateMesh(PstreamBuffers&);
91 
92 
93 public:
94 
95  //- Runtime type information
96  TypeName(cyclicAMIPolyPatch::typeName_());
97 
98 
99  // Constructors
100 
101  //- Construct from components
103  (
104  const polyPatch& patch,
105  const pointBoundaryMesh& bm
106  );
107 
108 
109  //- Destructor
110  virtual ~cyclicAMIPointPatch();
111 
112 
113  // Member Functions
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 cyclicAMIPolyPatch
122  const cyclicAMIPolyPatch& cyclicAMIPatch() const
123  {
124  return cyclicAMIPolyPatch_;
125  }
126 
127  //- Return neighbour point patch
128  const cyclicAMIPointPatch& neighbPatch() const
129  {
130  label patchi = cyclicAMIPolyPatch_.neighbPatchID();
131  const pointPatch& pp = this->boundaryMesh()[patchi];
132  return refCast<const cyclicAMIPointPatch>(pp);
133  }
134 
135  //- Are the cyclic planes parallel
136  bool parallel() const
137  {
138  return cyclicAMIPolyPatch_.parallel();
139  }
140 
141  //- Return face transformation tensor
142  const tensorField& forwardT() const
143  {
144  return cyclicAMIPolyPatch_.forwardT();
145  }
146 
147  //- Return neighbour-cell transformation tensor
148  const tensorField& reverseT() const
149  {
150  return cyclicAMIPolyPatch_.reverseT();
151  }
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
virtual ~cyclicAMIPointPatch()
Destructor.
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.
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:139
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:481
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.
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.
Namespace for OpenFOAM.
const tensorField & forwardT() const
Return face transformation tensor.