cyclicPointPatch.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::cyclicPointPatch
28 
29 Description
30  Cyclic patch for post-processing.
31 
32 SourceFiles
33  cyclicPointPatch.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef cyclicPointPatch_H
38 #define cyclicPointPatch_H
39 
40 #include "coupledFacePointPatch.H"
41 #include "cyclicPolyPatch.H"
42 #include "pointBoundaryMesh.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class cyclicPointPatch Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class cyclicPointPatch
54 :
56 {
57  // Private data
58 
59  //- Local reference cast into the cyclic patch
60  const cyclicPolyPatch& cyclicPolyPatch_;
61 
62 
63  // Private Member Functions
64 
65  //- No copy construct
66  cyclicPointPatch(const cyclicPointPatch&) = delete;
67 
68  //- No copy assignment
69  void operator=(const cyclicPointPatch&) = delete;
70 
71 
72  // Demand driven private data
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(cyclicPolyPatch::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 ~cyclicPointPatch();
111 
112 
113  // Member Functions
114 
115  // Access
116 
117  //- Return the constraint type this pointPatch implements.
118  virtual const word& constraintType() const
119  {
120  return type();
121  }
122 
123  //- Return the underlying cyclicPolyPatch
124  const cyclicPolyPatch& cyclicPatch() const
125  {
126  return cyclicPolyPatch_;
127  }
128 
129  //- Return neighbour point patch
130  const cyclicPointPatch& neighbPatch() const
131  {
132  label patchi = cyclicPolyPatch_.neighbPatchID();
133  const pointPatch& pp = this->boundaryMesh()[patchi];
134  return refCast<const cyclicPointPatch>(pp);
135  }
136 
137  //- Are the cyclic planes parallel
138  bool parallel() const
139  {
140  return cyclicPolyPatch_.parallel();
141  }
142 
143  //- Return face transformation tensor
144  const tensorField& forwardT() const
145  {
146  return cyclicPolyPatch_.forwardT();
147  }
148 
149  //- Return neighbour-cell transformation tensor
150  const tensorField& reverseT() const
151  {
152  return cyclicPolyPatch_.reverseT();
153  }
154 
156  // Access functions for demand driven data
157 
158  //- Return the set of pairs of points that require transformation
159  // and/or mapping. First index is on this patch, second on the
160  // neighbour patch.
161  virtual const edgeList& transformPairs() const;
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Foam::pointBoundaryMesh.
TypeName(cyclicPolyPatch::typeName_())
Runtime type information.
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches ...
virtual const polyPatch & patch() const
Return the polyPatch.
const cyclicPolyPatch & cyclicPatch() const
Return the underlying cyclicPolyPatch.
virtual ~cyclicPointPatch()
Destructor.
const tensorField & forwardT() const
Return face transformation tensor.
Cyclic patch for post-processing.
virtual const tensorField & forwardT() const
Return face transformation tensor.
virtual bool parallel() const
Are the cyclic planes parallel.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: POSIX.C:799
A class for handling words, derived from Foam::string.
Definition: word.H:63
Cyclic plane patch.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: pointPatch.H:171
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:61
const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual label neighbPatchID() const
Neighbour patchID.
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.
const cyclicPointPatch & neighbPatch() const
Return neighbour point patch.
bool parallel() const
Are the cyclic planes parallel.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:69
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Namespace for OpenFOAM.