initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / OpenFOAM / meshes / pointMesh / pointPatches / constraint / cyclic / cyclicPointPatch.H
blob25c74ac69ac55b65042952259f43a5d98902e9a2
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::cyclicPointPatch
28 Description
29     Cyclic patch for post-processing.
31 SourceFiles
32     cyclicPointPatch.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef cyclicPointPatch_H
37 #define cyclicPointPatch_H
39 #include "coupledFacePointPatch.H"
40 #include "cyclicPolyPatch.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         //- The set of pairs of points that require transformation
73         //  and/or mapping
74         edgeList transformPairs_;
76         //- Initialise the calculation of the patch geometry
77         virtual void initGeometry();
79         //- Calculate the patch geometry
80         virtual void calcGeometry();
82         //- Initialise the patches for moving points
83         virtual void initMovePoints(const pointField&);
85         //- Correct patches after moving points
86         virtual void movePoints(const pointField&);
88         //- Initialise the update of the patch topology
89         virtual void initUpdateMesh();
91         //- Update of the patch topology
92         virtual void updateMesh();
95 public:
97     //- Runtime type information
98     TypeName(cyclicPolyPatch::typeName_());
101     // Constructors
103         //- Construct from components
104         cyclicPointPatch
105         (
106             const polyPatch& patch,
107             const pointBoundaryMesh& bm
108         );
111     // Destructor
113         virtual ~cyclicPointPatch();
116     // Member Functions
118         // Access
120             //- Return the underlying cyclicPolyPatch
121             const cyclicPolyPatch& cyclicPatch() const
122             {
123                 return cyclicPolyPatch_;
124             }
126             //- Are the cyclic planes parallel
127             bool parallel() const
128             {
129                 return cyclicPolyPatch_.parallel();
130             }
132             //- Return face transformation tensor
133             const tensorField& forwardT() const
134             {
135                 return cyclicPolyPatch_.forwardT();
136             }
138             //- Return neighbour-cell transformation tensor
139             const tensorField& reverseT() const
140             {
141                 return cyclicPolyPatch_.reverseT();
142             }
145         // Access functions for demand driven data
147             //- Return the set of pairs of points that require transformation
148             //  and/or mapping
149             virtual const edgeList& transformPairs() const;
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 } // End namespace Foam
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 #endif
161 // ************************************************************************* //