1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::cyclicPointPatch
28 Cyclic patch for post-processing.
33 \*---------------------------------------------------------------------------*/
35 #ifndef cyclicPointPatch_H
36 #define cyclicPointPatch_H
38 #include "coupledFacePointPatch.H"
39 #include "cyclicPolyPatch.H"
40 #include "pointBoundaryMesh.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class cyclicPointPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class cyclicPointPatch
53 public coupledFacePointPatch
57 //- Local reference cast into the cyclic patch
58 const cyclicPolyPatch& cyclicPolyPatch_;
61 // Private Member Functions
63 //- Disallow default construct as copy
64 cyclicPointPatch(const cyclicPointPatch&);
66 //- Disallow default assignment
67 void operator=(const cyclicPointPatch&);
70 // Demand driven private data
72 //- Initialise the calculation of the patch geometry
73 virtual void initGeometry(PstreamBuffers&);
75 //- Calculate the patch geometry
76 virtual void calcGeometry(PstreamBuffers&);
78 //- Initialise the patches for moving points
79 virtual void initMovePoints(PstreamBuffers&, const pointField&);
81 //- Correct patches after moving points
82 virtual void movePoints(PstreamBuffers&, const pointField&);
84 //- Initialise the update of the patch topology
85 virtual void initUpdateMesh(PstreamBuffers&);
87 //- Update of the patch topology
88 virtual void updateMesh(PstreamBuffers&);
93 //- Runtime type information
94 TypeName(cyclicPolyPatch::typeName_());
99 //- Construct from components
102 const polyPatch& patch,
103 const pointBoundaryMesh& bm
108 virtual ~cyclicPointPatch();
115 //- Return the constraint type this pointPatch implements.
116 virtual const word& constraintType() const
121 //- Return the underlying cyclicPolyPatch
122 const cyclicPolyPatch& cyclicPatch() const
124 return cyclicPolyPatch_;
127 //- Return neighbour point patch
128 const cyclicPointPatch& neighbPatch() const
130 label patchI = cyclicPolyPatch_.neighbPatchID();
131 const pointPatch& pp = this->boundaryMesh()[patchI];
132 return refCast<const cyclicPointPatch>(pp);
135 //- Are the cyclic planes parallel
136 bool parallel() const
138 return cyclicPolyPatch_.parallel();
141 //- Return face transformation tensor
142 const tensorField& forwardT() const
144 return cyclicPolyPatch_.forwardT();
147 //- Return neighbour-cell transformation tensor
148 const tensorField& reverseT() const
150 return cyclicPolyPatch_.reverseT();
154 // Access functions for demand driven data
156 //- Return the set of pairs of points that require transformation
157 // and/or mapping. First index is on this patch, second on the
159 virtual const edgeList& transformPairs() const;
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 } // End namespace Foam
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 // ************************************************************************* //