BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / meshTools / directMapped / directMappedPolyPatch / directMappedPolyPatch.C
blob67a6e8248e828f9c73d616e20630edc7330e276a
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 namespace Foam
33     defineTypeNameAndDebug(directMappedPolyPatch, 0);
35     addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, word);
36     addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, dictionary);
40 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
43 // * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * * * * //
45 Foam::directMappedPolyPatch::directMappedPolyPatch
47     const word& name,
48     const label size,
49     const label start,
50     const label index,
51     const polyBoundaryMesh& bm
54     polyPatch(name, size, start, index, bm),
55     directMappedPatchBase(static_cast<const polyPatch&>(*this))
59 Foam::directMappedPolyPatch::directMappedPolyPatch
61     const word& name,
62     const label size,
63     const label start,
64     const label index,
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),
73     directMappedPatchBase
74     (
75         static_cast<const polyPatch&>(*this),
76         sampleRegion,
77         mode,
78         samplePatch,
79         offset
80     )
84 Foam::directMappedPolyPatch::directMappedPolyPatch
86     const word& name,
87     const label size,
88     const label start,
89     const label index,
90     const word& sampleRegion,
91     const directMappedPatchBase::sampleMode mode,
92     const word& samplePatch,
93     const vector& offset,
94     const polyBoundaryMesh& bm
97     polyPatch(name, size, start, index, bm),
98     directMappedPatchBase
99     (
100         static_cast<const polyPatch&>(*this),
101         sampleRegion,
102         mode,
103         samplePatch,
104         offset
105     )
109 Foam::directMappedPolyPatch::directMappedPolyPatch
111     const word& name,
112     const dictionary& dict,
113     const label index,
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
128     polyPatch(pp, bm),
129     directMappedPatchBase(*this, pp)
133 Foam::directMappedPolyPatch::directMappedPolyPatch
135     const directMappedPolyPatch& pp,
136     const polyBoundaryMesh& bm,
137     const label index,
138     const label newSize,
139     const label newStart
142     polyPatch(pp, bm, index, newSize, newStart),
143     directMappedPatchBase(*this, pp)
147 Foam::directMappedPolyPatch::directMappedPolyPatch
149     const directMappedPolyPatch& pp,
150     const polyBoundaryMesh& bm,
151     const label index,
152     const labelUList& mapAddressing,
153     const label newStart
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,
188     const pointField& p
191     polyPatch::initMovePoints(pBufs, p);
194 //- Correct patches after moving points
195 void Foam::directMappedPolyPatch::movePoints
197     PstreamBuffers& pBufs,
198     const pointField& p
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 // ************************************************************************* //