cyclicACMIPointPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2013-2016 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::cyclicACMIPointPatch
26 
27 Description
28  Cyclic AMI point patch - place holder only
29 
30 SourceFiles
31  cyclicACMIPointPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicACMIPointPatch_H
36 #define cyclicACMIPointPatch_H
37 
38 #include "coupledFacePointPatch.H"
39 #include "cyclicACMIPolyPatch.H"
40 #include "pointBoundaryMesh.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class cyclicACMIPointPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
54 {
55  // Private data
56 
57  //- Local reference cast into the cyclic AMI patch
58  const cyclicACMIPolyPatch& cyclicACMIPolyPatch_;
59 
60 
61  // Private Member Functions
62 
63  //- Disallow default construct as copy
65 
66  //- Disallow default assignment
67  void operator=(const cyclicACMIPointPatch&);
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(cyclicACMIPolyPatch::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 ~cyclicACMIPointPatch();
111 
112 
113  // Member Functions
114 
115  //- Is patch 'coupled'. Note that on AMI the geometry is not
116  // coupled but the fields are!
117  virtual bool coupled() const
118  {
119  return false;
120  }
121 
122  //- Return the constraint type this pointPatch implements.
123  virtual const word& constraintType() const
124  {
125  return type();
126  }
127 
128  //- Return the underlying cyclicAMIPolyPatch
129  const cyclicACMIPolyPatch& cyclicACMIPatch() const
130  {
131  return cyclicACMIPolyPatch_;
132  }
133 
134  //- Return neighbour point patch
135  const cyclicACMIPointPatch& neighbPatch() const
136  {
137  label patchi = cyclicACMIPolyPatch_.neighbPatchID();
138  const pointPatch& pp = this->boundaryMesh()[patchi];
139  return refCast<const cyclicACMIPointPatch>(pp);
140  }
141 
142  //- Are the cyclic planes parallel
143  bool parallel() const
144  {
145  return cyclicACMIPolyPatch_.parallel();
146  }
147 
148  //- Return face transformation tensor
149  const tensorField& forwardT() const
150  {
151  return cyclicACMIPolyPatch_.forwardT();
152  }
153 
154  //- Return neighbour-cell transformation tensor
155  const tensorField& reverseT() const
156  {
157  return cyclicACMIPolyPatch_.reverseT();
158  }
159 };
160 
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 } // End namespace Foam
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
Cyclic patch for Arbitrarily Coupled Mesh Interface (ACMI)
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
Cyclic AMI point patch - place holder only.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
Foam::pointBoundaryMesh.
virtual const word & constraintType() const
Return the constraint type this pointPatch implements.
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches ...
TypeName(cyclicACMIPolyPatch::typeName_())
Runtime type information.
virtual ~cyclicACMIPointPatch()
Destructor.
const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
const tensorField & forwardT() const
Return face transformation tensor.
virtual const tensorField & forwardT() const
Return face transformation tensor.
virtual bool parallel() const
Are the cyclic planes parallel.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
A class for handling words, derived from string.
Definition: word.H:59
bool parallel() const
Are the cyclic planes parallel.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
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:485
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.
const cyclicACMIPointPatch & neighbPatch() const
Return neighbour point patch.
virtual bool coupled() const
Is patch &#39;coupled&#39;. Note that on AMI the geometry is not.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Namespace for OpenFOAM.
const cyclicACMIPolyPatch & cyclicACMIPatch() const
Return the underlying cyclicAMIPolyPatch.