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 "directMappedWallPolyPatch.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 defineTypeNameAndDebug(directMappedWallPolyPatch, 0);
35 addToRunTimeSelectionTable(polyPatch, directMappedWallPolyPatch, word);
36 addToRunTimeSelectionTable
39 directMappedWallPolyPatch,
45 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
48 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
50 Foam::directMappedWallPolyPatch::directMappedWallPolyPatch
56 const polyBoundaryMesh& bm
59 wallPolyPatch(name, size, start, index, bm),
60 directMappedPatchBase(static_cast<const polyPatch&>(*this))
64 Foam::directMappedWallPolyPatch::directMappedWallPolyPatch
70 const word& sampleRegion,
71 const directMappedPatchBase::sampleMode mode,
72 const word& samplePatch,
73 const vectorField& offset,
74 const polyBoundaryMesh& bm
77 wallPolyPatch(name, size, start, index, bm),
80 static_cast<const polyPatch&>(*this),
89 Foam::directMappedWallPolyPatch::directMappedWallPolyPatch
95 const word& sampleRegion,
96 const directMappedPatchBase::sampleMode mode,
97 const word& samplePatch,
99 const polyBoundaryMesh& bm
102 wallPolyPatch(name, size, start, index, bm),
103 directMappedPatchBase
105 static_cast<const polyPatch&>(*this),
114 Foam::directMappedWallPolyPatch::directMappedWallPolyPatch
117 const dictionary& dict,
119 const polyBoundaryMesh& bm
122 wallPolyPatch(name, dict, index, bm),
123 directMappedPatchBase(*this, dict)
127 Foam::directMappedWallPolyPatch::directMappedWallPolyPatch
129 const directMappedWallPolyPatch& pp,
130 const polyBoundaryMesh& bm
133 wallPolyPatch(pp, bm),
134 directMappedPatchBase(*this, pp)
138 Foam::directMappedWallPolyPatch::directMappedWallPolyPatch
140 const directMappedWallPolyPatch& pp,
141 const polyBoundaryMesh& bm,
147 wallPolyPatch(pp, bm, index, newSize, newStart),
148 directMappedPatchBase(*this, pp)
152 Foam::directMappedWallPolyPatch::directMappedWallPolyPatch
154 const directMappedWallPolyPatch& pp,
155 const polyBoundaryMesh& bm,
157 const labelUList& mapAddressing,
161 wallPolyPatch(pp, bm, index, mapAddressing, newStart),
162 directMappedPatchBase(*this, pp, mapAddressing)
166 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
168 Foam::directMappedWallPolyPatch::~directMappedWallPolyPatch()
170 directMappedPatchBase::clearOut();
174 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
176 //- Initialise the calculation of the patch geometry
177 void Foam::directMappedWallPolyPatch::initGeometry(PstreamBuffers& pBufs)
179 wallPolyPatch::initGeometry(pBufs);
182 //- Calculate the patch geometry
183 void Foam::directMappedWallPolyPatch::calcGeometry(PstreamBuffers& pBufs)
185 wallPolyPatch::calcGeometry(pBufs);
186 directMappedPatchBase::clearOut();
189 //- Initialise the patches for moving points
190 void Foam::directMappedWallPolyPatch::initMovePoints
192 PstreamBuffers& pBufs,
196 wallPolyPatch::initMovePoints(pBufs, p);
199 //- Correct patches after moving points
200 void Foam::directMappedWallPolyPatch::movePoints
202 PstreamBuffers& pBufs,
206 wallPolyPatch::movePoints(pBufs, p);
207 directMappedPatchBase::clearOut();
210 //- Initialise the update of the patch topology
211 void Foam::directMappedWallPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
213 wallPolyPatch::initUpdateMesh(pBufs);
216 //- Update of the patch topology
217 void Foam::directMappedWallPolyPatch::updateMesh(PstreamBuffers& pBufs)
219 wallPolyPatch::updateMesh(pBufs);
220 directMappedPatchBase::clearOut();
224 void Foam::directMappedWallPolyPatch::write(Ostream& os) const
226 wallPolyPatch::write(os);
227 directMappedPatchBase::write(os);
231 // ************************************************************************* //