ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / meshTools / directMapped / directMappedPolyPatch / directMappedWallPolyPatch.H
blobcabe9b8acd0bcedae2ea07b1d7e0ef380c514f4e
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::directMappedWallPolyPatch
27 Description
28     Determines a mapping between patch face centres and mesh cell or face
29     centres and processors they're on.
31 Note
32     Storage is not optimal. It stores all face centres and cells on all
33     processors to keep the addressing calculation simple.
35 SourceFiles
36     directMappedWallPolyPatch.C
38 \*---------------------------------------------------------------------------*/
40 #ifndef directMappedWallPolyPatch_H
41 #define directMappedWallPolyPatch_H
43 #include "wallPolyPatch.H"
44 #include "directMappedPatchBase.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace Foam
52 class polyMesh;
54 /*---------------------------------------------------------------------------*\
55                       Class directMappedWallPolyPatch Declaration
56 \*---------------------------------------------------------------------------*/
58 class directMappedWallPolyPatch
60     public wallPolyPatch,
61     public directMappedPatchBase
64 protected:
66         //- Initialise the calculation of the patch geometry
67         virtual void initGeometry(PstreamBuffers&);
69         //- Calculate the patch geometry
70         virtual void calcGeometry(PstreamBuffers&);
72         //- Initialise the patches for moving points
73         virtual void initMovePoints(PstreamBuffers&, const pointField&);
75         //- Correct patches after moving points
76         virtual void movePoints(PstreamBuffers&, const pointField&);
78         //- Initialise the update of the patch topology
79         virtual void initUpdateMesh(PstreamBuffers&);
81         //- Update of the patch topology
82         virtual void updateMesh(PstreamBuffers&);
85 public:
87     //- Runtime type information
88     TypeName("directMappedWall");
91     // Constructors
93         //- Construct from components
94         directMappedWallPolyPatch
95         (
96             const word& name,
97             const label size,
98             const label start,
99             const label index,
100             const polyBoundaryMesh& bm
101         );
103         //- Construct from components
104         directMappedWallPolyPatch
105         (
106             const word& name,
107             const label size,
108             const label start,
109             const label index,
110             const word& sampleRegion,
111             const directMappedPatchBase::sampleMode mode,
112             const word& samplePatch,
113             const vectorField& offset,
114             const polyBoundaryMesh& bm
115         );
117         //- Construct from components. Uniform offset.
118         directMappedWallPolyPatch
119         (
120             const word& name,
121             const label size,
122             const label start,
123             const label index,
124             const word& sampleRegion,
125             const directMappedPatchBase::sampleMode mode,
126             const word& samplePatch,
127             const vector& offset,
128             const polyBoundaryMesh& bm
129         );
131         //- Construct from dictionary
132         directMappedWallPolyPatch
133         (
134             const word& name,
135             const dictionary& dict,
136             const label index,
137             const polyBoundaryMesh& bm
138         );
140         //- Construct as copy, resetting the boundary mesh
141         directMappedWallPolyPatch
142         (
143             const directMappedWallPolyPatch&,
144             const polyBoundaryMesh&
145         );
147         //- Construct given the original patch and resetting the
148         //  face list and boundary mesh information
149         directMappedWallPolyPatch
150         (
151             const directMappedWallPolyPatch& pp,
152             const polyBoundaryMesh& bm,
153             const label index,
154             const label newSize,
155             const label newStart
156         );
158         //- Construct given the original patch and a map
159         directMappedWallPolyPatch
160         (
161             const directMappedWallPolyPatch& pp,
162             const polyBoundaryMesh& bm,
163             const label index,
164             const labelUList& mapAddressing,
165             const label newStart
166         );
168         //- Construct and return a clone, resetting the boundary mesh
169         virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
170         {
171             return autoPtr<polyPatch>(new directMappedWallPolyPatch(*this, bm));
172         }
174         //- Construct and return a clone, resetting the face list
175         //  and boundary mesh
176         virtual autoPtr<polyPatch> clone
177         (
178             const polyBoundaryMesh& bm,
179             const label index,
180             const label newSize,
181             const label newStart
182         ) const
183         {
184             return autoPtr<polyPatch>
185             (
186                 new directMappedWallPolyPatch
187                 (
188                     *this,
189                     bm,
190                     index,
191                     newSize,
192                     newStart
193                 )
194             );
195         }
197         //- Construct and return a clone, resetting the face list
198         //  and boundary mesh
199         virtual autoPtr<polyPatch> clone
200         (
201             const polyBoundaryMesh& bm,
202             const label index,
203             const labelUList& mapAddressing,
204             const label newStart
205         ) const
206         {
207             return autoPtr<polyPatch>
208             (
209                 new directMappedWallPolyPatch
210                 (
211                     *this,
212                     bm,
213                     index,
214                     mapAddressing,
215                     newStart
216                 )
217             );
218         }
221     //- Destructor
222     virtual ~directMappedWallPolyPatch();
225     // Member functions
227         //- Write the polyPatch data as a dictionary
228         virtual void write(Ostream&) const;
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234 } // End namespace Foam
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
238 #endif
240 // ************************************************************************* //