1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 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
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
26 Foam::directMappedPolyPatch
29 Determines a mapping between patch face centres and mesh cell or face
30 centres and processors they're on.
33 Storage is not optimal. It stores all face centres and cells on all
34 processors to keep the addressing calculation simple.
37 directMappedPolyPatch.C
39 \*---------------------------------------------------------------------------*/
41 #ifndef directMappedPolyPatch_H
42 #define directMappedPolyPatch_H
44 #include "polyPatch.H"
45 #include "directMappedPatchBase.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class directMappedPolyPatch Declaration
57 \*---------------------------------------------------------------------------*/
59 class directMappedPolyPatch
62 public directMappedPatchBase
67 //- Initialise the calculation of the patch geometry
68 virtual void initGeometry();
70 //- Calculate the patch geometry
71 virtual void calcGeometry();
73 //- Initialise the patches for moving points
74 virtual void initMovePoints(const pointField&);
76 //- Correct patches after moving points
77 virtual void movePoints(const pointField&);
79 //- Initialise the update of the patch topology
80 virtual void initUpdateMesh();
82 //- Update of the patch topology
83 virtual void updateMesh();
88 //- Runtime type information
89 TypeName("directMappedPatch");
94 //- Construct from components
101 const polyBoundaryMesh& bm
104 //- Construct from components
105 directMappedPolyPatch
111 const word& sampleRegion,
112 const directMappedPatchBase::sampleMode mode,
113 const word& samplePatch,
114 const vectorField& offset,
115 const polyBoundaryMesh& bm
118 //- Construct from components. Uniform offset.
119 directMappedPolyPatch
125 const word& sampleRegion,
126 const directMappedPatchBase::sampleMode mode,
127 const word& samplePatch,
128 const vector& offset,
129 const polyBoundaryMesh& bm
132 //- Construct from dictionary
133 directMappedPolyPatch
136 const dictionary& dict,
138 const polyBoundaryMesh& bm
141 //- Construct as copy, resetting the boundary mesh
142 directMappedPolyPatch
144 const directMappedPolyPatch&,
145 const polyBoundaryMesh&
148 //- Construct given the original patch and resetting the
149 // face list and boundary mesh information
150 directMappedPolyPatch
152 const directMappedPolyPatch& pp,
153 const polyBoundaryMesh& bm,
159 //- Construct and return a clone, resetting the boundary mesh
160 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
162 return autoPtr<polyPatch>(new directMappedPolyPatch(*this, bm));
165 //- Construct and return a clone, resetting the face list
167 virtual autoPtr<polyPatch> clone
169 const polyBoundaryMesh& bm,
175 return autoPtr<polyPatch>
177 new directMappedPolyPatch(*this, bm, index, newSize, newStart)
183 virtual ~directMappedPolyPatch();
188 //- Write the polyPatch data as a dictionary
189 virtual void write(Ostream&) const;
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 } // End namespace Foam
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 // ************************************************************************* //