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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "directMappedPolyPatch.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 defineTypeNameAndDebug(directMappedPolyPatch, 0);
35 addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, word);
36 addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, dictionary);
40 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
43 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
45 Foam::directMappedPolyPatch::directMappedPolyPatch
51 const polyBoundaryMesh& bm
54 polyPatch(name, size, start, index, bm),
55 directMappedPatchBase(static_cast<const polyPatch&>(*this))
59 Foam::directMappedPolyPatch::directMappedPolyPatch
65 const word& sampleRegion,
66 const directMappedPatchBase::sampleMode mode,
67 const word& samplePatch,
68 const vectorField& offset,
69 const polyBoundaryMesh& bm
72 polyPatch(name, size, start, index, bm),
75 static_cast<const polyPatch&>(*this),
84 Foam::directMappedPolyPatch::directMappedPolyPatch
90 const word& sampleRegion,
91 const directMappedPatchBase::sampleMode mode,
92 const word& samplePatch,
94 const polyBoundaryMesh& bm
97 polyPatch(name, size, start, index, bm),
100 static_cast<const polyPatch&>(*this),
109 Foam::directMappedPolyPatch::directMappedPolyPatch
112 const dictionary& dict,
114 const polyBoundaryMesh& bm
117 polyPatch(name, dict, index, bm),
118 directMappedPatchBase(*this, dict)
122 Foam::directMappedPolyPatch::directMappedPolyPatch
124 const directMappedPolyPatch& pp,
125 const polyBoundaryMesh& bm
129 directMappedPatchBase(*this, pp)
133 Foam::directMappedPolyPatch::directMappedPolyPatch
135 const directMappedPolyPatch& pp,
136 const polyBoundaryMesh& bm,
142 polyPatch(pp, bm, index, newSize, newStart),
143 directMappedPatchBase(*this, pp)
147 Foam::directMappedPolyPatch::directMappedPolyPatch
149 const directMappedPolyPatch& pp,
150 const polyBoundaryMesh& bm,
152 const labelUList& mapAddressing,
156 polyPatch(pp, bm, index, mapAddressing, newStart),
157 directMappedPatchBase(*this, pp, mapAddressing)
161 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
163 Foam::directMappedPolyPatch::~directMappedPolyPatch()
165 directMappedPatchBase::clearOut();
169 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
171 //- Initialise the calculation of the patch geometry
172 void Foam::directMappedPolyPatch::initGeometry(PstreamBuffers& pBufs)
174 polyPatch::initGeometry(pBufs);
177 //- Calculate the patch geometry
178 void Foam::directMappedPolyPatch::calcGeometry(PstreamBuffers& pBufs)
180 polyPatch::calcGeometry(pBufs);
181 directMappedPatchBase::clearOut();
184 //- Initialise the patches for moving points
185 void Foam::directMappedPolyPatch::initMovePoints
187 PstreamBuffers& pBufs,
191 polyPatch::initMovePoints(pBufs, p);
194 //- Correct patches after moving points
195 void Foam::directMappedPolyPatch::movePoints
197 PstreamBuffers& pBufs,
201 polyPatch::movePoints(pBufs, p);
202 directMappedPatchBase::clearOut();
205 //- Initialise the update of the patch topology
206 void Foam::directMappedPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
208 polyPatch::initUpdateMesh(pBufs);
211 //- Update of the patch topology
212 void Foam::directMappedPolyPatch::updateMesh(PstreamBuffers& pBufs)
214 polyPatch::updateMesh(pBufs);
215 directMappedPatchBase::clearOut();
219 void Foam::directMappedPolyPatch::write(Ostream& os) const
221 polyPatch::write(os);
222 directMappedPatchBase::write(os);
226 // ************************************************************************* //