ENH: splitMeshRegions now fills in coupling information in directMapped patch.
[OpenFOAM-1.6.x.git] / src / meshTools / directMapped / directMappedPolyPatch / directMappedPolyPatch.C
blobcf0b708c3ec611ea2933455095b309daf1d86ed8
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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 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
19     for more details.
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 namespace Foam
34     defineTypeNameAndDebug(directMappedPolyPatch, 0);
36     addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, word);
37     addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, dictionary);
41 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
44 // * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * * * * //
46 Foam::directMappedPolyPatch::directMappedPolyPatch
48     const word& name,
49     const label size,
50     const label start,
51     const label index,
52     const polyBoundaryMesh& bm
55     polyPatch(name, size, start, index, bm),
56     directMappedPatchBase(static_cast<const polyPatch&>(*this))
60 Foam::directMappedPolyPatch::directMappedPolyPatch
62     const word& name,
63     const label size,
64     const label start,
65     const label index,
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),
74     directMappedPatchBase
75     (
76         static_cast<const polyPatch&>(*this),
77         sampleRegion,
78         mode,
79         samplePatch,
80         offset
81     )
85 Foam::directMappedPolyPatch::directMappedPolyPatch
87     const word& name,
88     const label size,
89     const label start,
90     const label index,
91     const word& sampleRegion,
92     const directMappedPatchBase::sampleMode mode,
93     const word& samplePatch,
94     const vector& offset,
95     const polyBoundaryMesh& bm
98     polyPatch(name, size, start, index, bm),
99     directMappedPatchBase
100     (
101         static_cast<const polyPatch&>(*this),
102         sampleRegion,
103         mode,
104         samplePatch,
105         offset
106     )
110 Foam::directMappedPolyPatch::directMappedPolyPatch
112     const word& name,
113     const dictionary& dict,
114     const label index,
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
129     polyPatch(pp, bm),
130     directMappedPatchBase(*this, pp)
134 Foam::directMappedPolyPatch::directMappedPolyPatch
136     const directMappedPolyPatch& pp,
137     const polyBoundaryMesh& bm,
138     const label index,
139     const label newSize,
140     const label newStart
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 // ************************************************************************* //