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 
155 
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::cyclicPointPatch::reverseT
const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Definition: cyclicPointPatch.H:149
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
cyclicPolyPatch.H
Foam::cyclicPolyPatch
Cyclic plane patch.
Definition: cyclicPolyPatch.H:66
Foam::coupledPolyPatch::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: coupledPolyPatch.H:301
Foam::PstreamBuffers
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Definition: PstreamBuffers.H:88
Foam::coupledPolyPatch::reverseT
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Definition: coupledPolyPatch.H:307
Foam::facePointPatch::patch
virtual const polyPatch & patch() const
Return the polyPatch.
Definition: facePointPatch.H:148
Foam::cyclicPointPatch::cyclicPatch
const cyclicPolyPatch & cyclicPatch() const
Return the underlying cyclicPolyPatch.
Definition: cyclicPointPatch.H:123
Foam::pointPatch
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:58
Foam::cyclicPointPatch
Cyclic patch for post-processing.
Definition: cyclicPointPatch.H:52
Foam::cyclicPointPatch::neighbPatch
const cyclicPointPatch & neighbPatch() const
Return neighbour point patch.
Definition: cyclicPointPatch.H:129
pointBoundaryMesh.H
Foam::coupledPolyPatch::parallel
virtual bool parallel() const
Are the cyclic planes parallel.
Definition: coupledPolyPatch.H:295
Foam::cyclicPointPatch::forwardT
const tensorField & forwardT() const
Return face transformation tensor.
Definition: cyclicPointPatch.H:143
Foam::cyclicPointPatch::transformPairs
virtual const edgeList & transformPairs() const
Return the set of pairs of points that require transformation.
Definition: cyclicPointPatch.C:102
Foam::Field< vector >
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::coupledFacePointPatch
coupled patch for post-processing. Used as the base class for processor and cyclic pointPatches
Definition: coupledFacePointPatch.H:55
Foam::cyclicPointPatch::parallel
bool parallel() const
Are the cyclic planes parallel.
Definition: cyclicPointPatch.H:137
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::pointBoundaryMesh
Foam::pointBoundaryMesh.
Definition: pointBoundaryMesh.H:56
coupledFacePointPatch.H
Foam::List< edge >
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::pointPatch::boundaryMesh
const pointBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
Definition: pointPatch.H:135
Foam::cyclicPointPatch::~cyclicPointPatch
virtual ~cyclicPointPatch()
Destructor.
Definition: cyclicPointPatch.C:96
Foam::cyclicPointPatch::TypeName
TypeName(cyclicPolyPatch::typeName_())
Runtime type information.
Foam::cyclicPolyPatch::neighbPatchID
virtual label neighbPatchID() const
Neighbour patchID.
Definition: cyclicPolyPatch.C:837
Foam::cyclicPointPatch::constraintType
virtual const word & constraintType() const
Return the constraint type this pointPatch implements.
Definition: cyclicPointPatch.H:117