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::directMappedWallPolyPatch
28 Determines a mapping between patch face centres and mesh cell or face
29 centres and processors they're on.
32 Storage is not optimal. It stores all face centres and cells on all
33 processors to keep the addressing calculation simple.
36 directMappedWallPolyPatch.C
38 \*---------------------------------------------------------------------------*/
40 #ifndef directMappedWallPolyPatch_H
41 #define directMappedWallPolyPatch_H
43 #include "wallPolyPatch.H"
44 #include "directMappedPatchBase.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 /*---------------------------------------------------------------------------*\
55 Class directMappedWallPolyPatch Declaration
56 \*---------------------------------------------------------------------------*/
58 class directMappedWallPolyPatch
61 public directMappedPatchBase
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&);
87 //- Runtime type information
88 TypeName("directMappedWall");
93 //- Construct from components
94 directMappedWallPolyPatch
100 const polyBoundaryMesh& bm
103 //- Construct from components
104 directMappedWallPolyPatch
110 const word& sampleRegion,
111 const directMappedPatchBase::sampleMode mode,
112 const word& samplePatch,
113 const vectorField& offset,
114 const polyBoundaryMesh& bm
117 //- Construct from components. Uniform offset.
118 directMappedWallPolyPatch
124 const word& sampleRegion,
125 const directMappedPatchBase::sampleMode mode,
126 const word& samplePatch,
127 const vector& offset,
128 const polyBoundaryMesh& bm
131 //- Construct from dictionary
132 directMappedWallPolyPatch
135 const dictionary& dict,
137 const polyBoundaryMesh& bm
140 //- Construct as copy, resetting the boundary mesh
141 directMappedWallPolyPatch
143 const directMappedWallPolyPatch&,
144 const polyBoundaryMesh&
147 //- Construct given the original patch and resetting the
148 // face list and boundary mesh information
149 directMappedWallPolyPatch
151 const directMappedWallPolyPatch& pp,
152 const polyBoundaryMesh& bm,
158 //- Construct given the original patch and a map
159 directMappedWallPolyPatch
161 const directMappedWallPolyPatch& pp,
162 const polyBoundaryMesh& bm,
164 const labelUList& mapAddressing,
168 //- Construct and return a clone, resetting the boundary mesh
169 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
171 return autoPtr<polyPatch>(new directMappedWallPolyPatch(*this, bm));
174 //- Construct and return a clone, resetting the face list
176 virtual autoPtr<polyPatch> clone
178 const polyBoundaryMesh& bm,
184 return autoPtr<polyPatch>
186 new directMappedWallPolyPatch
197 //- Construct and return a clone, resetting the face list
199 virtual autoPtr<polyPatch> clone
201 const polyBoundaryMesh& bm,
203 const labelUList& mapAddressing,
207 return autoPtr<polyPatch>
209 new directMappedWallPolyPatch
222 virtual ~directMappedWallPolyPatch();
227 //- Write the polyPatch data as a dictionary
228 virtual void write(Ostream&) const;
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234 } // End namespace Foam
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
240 // ************************************************************************* //