ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / OpenFOAM / meshes / pointMesh / pointPatches / constraint / cyclic / cyclicPointPatch.H
blob764e20a2a997531ac97ba1758a80f5110acdffdf
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     Foam::cyclicPointPatch
27 Description
28     Cyclic patch for post-processing.
30 SourceFiles
31     cyclicPointPatch.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef cyclicPointPatch_H
36 #define cyclicPointPatch_H
38 #include "coupledFacePointPatch.H"
39 #include "cyclicPolyPatch.H"
40 #include "pointBoundaryMesh.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                       Class cyclicPointPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class cyclicPointPatch
53     public coupledFacePointPatch
55     // Private data
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&);
91 public:
93     //- Runtime type information
94     TypeName(cyclicPolyPatch::typeName_());
97     // Constructors
99         //- Construct from components
100         cyclicPointPatch
101         (
102             const polyPatch& patch,
103             const pointBoundaryMesh& bm
104         );
107     //- Destructor
108     virtual ~cyclicPointPatch();
111     // Member Functions
113         // Access
115             //- Return the constraint type this pointPatch implements.
116             virtual const word& constraintType() const
117             {
118                 return type();
119             }
121             //- Return the underlying cyclicPolyPatch
122             const cyclicPolyPatch& cyclicPatch() const
123             {
124                 return cyclicPolyPatch_;
125             }
127             //- Return neighbour point patch
128             const cyclicPointPatch& neighbPatch() const
129             {
130                 label patchI = cyclicPolyPatch_.neighbPatchID();
131                 const pointPatch& pp = this->boundaryMesh()[patchI];
132                 return refCast<const cyclicPointPatch>(pp);
133             }
135             //- Are the cyclic planes parallel
136             bool parallel() const
137             {
138                 return cyclicPolyPatch_.parallel();
139             }
141             //- Return face transformation tensor
142             const tensorField& forwardT() const
143             {
144                 return cyclicPolyPatch_.forwardT();
145             }
147             //- Return neighbour-cell transformation tensor
148             const tensorField& reverseT() const
149             {
150                 return cyclicPolyPatch_.reverseT();
151             }
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
158             //  neighbour patch.
159             virtual const edgeList& transformPairs() const;
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 } // End namespace Foam
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 #endif
172 // ************************************************************************* //