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
25 \*---------------------------------------------------------------------------*/
27 #include "directMappedPolyPatch.H"
28 #include "addToRunTimeSelectionTable.H"
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 defineTypeNameAndDebug(directMappedPolyPatch, 0);
36 addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, word);
37 addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, dictionary);
41 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
44 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
46 Foam::directMappedPolyPatch::directMappedPolyPatch
52 const polyBoundaryMesh& bm
55 polyPatch(name, size, start, index, bm),
56 directMappedPatchBase(static_cast<const polyPatch&>(*this))
60 Foam::directMappedPolyPatch::directMappedPolyPatch
66 const word& sampleRegion,
67 const directMappedPatchBase::sampleMode mode,
68 const word& samplePatch,
69 const vectorField& offset,
70 const polyBoundaryMesh& bm
73 polyPatch(name, size, start, index, bm),
76 static_cast<const polyPatch&>(*this),
85 Foam::directMappedPolyPatch::directMappedPolyPatch
91 const word& sampleRegion,
92 const directMappedPatchBase::sampleMode mode,
93 const word& samplePatch,
95 const polyBoundaryMesh& bm
98 polyPatch(name, size, start, index, bm),
101 static_cast<const polyPatch&>(*this),
110 Foam::directMappedPolyPatch::directMappedPolyPatch
113 const dictionary& dict,
115 const polyBoundaryMesh& bm
118 polyPatch(name, dict, index, bm),
119 directMappedPatchBase(*this, dict)
123 Foam::directMappedPolyPatch::directMappedPolyPatch
125 const directMappedPolyPatch& pp,
126 const polyBoundaryMesh& bm
130 directMappedPatchBase(*this, pp)
134 Foam::directMappedPolyPatch::directMappedPolyPatch
136 const directMappedPolyPatch& pp,
137 const polyBoundaryMesh& bm,
143 polyPatch(pp, bm, index, newSize, newStart),
144 directMappedPatchBase(*this, pp)
148 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
150 Foam::directMappedPolyPatch::~directMappedPolyPatch()
152 directMappedPatchBase::clearOut();
156 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
158 //- Initialise the calculation of the patch geometry
159 void Foam::directMappedPolyPatch::initGeometry()
161 polyPatch::initGeometry();
162 directMappedPatchBase::clearOut();
165 //- Calculate the patch geometry
166 void Foam::directMappedPolyPatch::calcGeometry()
168 polyPatch::calcGeometry();
169 directMappedPatchBase::clearOut();
172 //- Initialise the patches for moving points
173 void Foam::directMappedPolyPatch::initMovePoints(const pointField& p)
175 polyPatch::initMovePoints(p);
176 directMappedPatchBase::clearOut();
179 //- Correct patches after moving points
180 void Foam::directMappedPolyPatch::movePoints(const pointField& p)
182 polyPatch::movePoints(p);
183 directMappedPatchBase::clearOut();
186 //- Initialise the update of the patch topology
187 void Foam::directMappedPolyPatch::initUpdateMesh()
189 polyPatch::initUpdateMesh();
190 directMappedPatchBase::clearOut();
193 //- Update of the patch topology
194 void Foam::directMappedPolyPatch::updateMesh()
196 polyPatch::updateMesh();
197 directMappedPatchBase::clearOut();
201 void Foam::directMappedPolyPatch::write(Ostream& os) const
203 polyPatch::write(os);
204 directMappedPatchBase::write(os);
208 // ************************************************************************* //