Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / meshTools / directMapped / directMappedPolyPatch / directMappedVariableThicknessWallPolyPatch.C
blob15764e2a971f5ad921a0bcace5e9b7ad925fb875
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011-2011 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
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 "directMappedVariableThicknessWallPolyPatch.H"
27 #include "addToRunTimeSelectionTable.H"
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 namespace Foam
33     defineTypeNameAndDebug(directMappedVariableThicknessWallPolyPatch, 0);
35     addToRunTimeSelectionTable
36     (
37         polyPatch,
38         directMappedVariableThicknessWallPolyPatch,
39         word
40     );
42     addToRunTimeSelectionTable
43     (
44         polyPatch,
45         directMappedVariableThicknessWallPolyPatch,
46         dictionary
47     );
51 // * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * * * * //
53 Foam::directMappedVariableThicknessWallPolyPatch::
54 directMappedVariableThicknessWallPolyPatch
56     const word& name,
57     const label size,
58     const label start,
59     const label index,
60     const polyBoundaryMesh& bm
63     directMappedWallPolyPatch(name, size, start, index, bm),
64     thickness_(size)
68 Foam::directMappedVariableThicknessWallPolyPatch::
69 directMappedVariableThicknessWallPolyPatch
71     const word& name,
72     const label size,
73     const label start,
74     const label index,
75     const word& sampleRegion,
76     const directMappedPatchBase::sampleMode mode,
77     const word& samplePatch,
78     const vectorField& offset,
79     const polyBoundaryMesh& bm
82     directMappedWallPolyPatch(name, size, start, index, bm),
83     thickness_(size)
87 Foam::directMappedVariableThicknessWallPolyPatch::
88 directMappedVariableThicknessWallPolyPatch
90     const word& name,
91     const label size,
92     const label start,
93     const label index,
94     const word& sampleRegion,
95     const directMappedPatchBase::sampleMode mode,
96     const word& samplePatch,
97     const vector& offset,
98     const polyBoundaryMesh& bm
101     directMappedWallPolyPatch(name, size, start, index, bm),
102     thickness_(size)
106 Foam::directMappedVariableThicknessWallPolyPatch::
107 directMappedVariableThicknessWallPolyPatch
109     const word& name,
110     const dictionary& dict,
111     const label index,
112     const polyBoundaryMesh& bm
115     directMappedWallPolyPatch(name, dict, index, bm),
116     thickness_(scalarField("thickness", dict, this->size()))
120 Foam::directMappedVariableThicknessWallPolyPatch::
121 directMappedVariableThicknessWallPolyPatch
123     const directMappedVariableThicknessWallPolyPatch& pp,
124     const polyBoundaryMesh& bm
127     directMappedWallPolyPatch(pp, bm),
128     thickness_(pp.thickness_)
132 Foam::directMappedVariableThicknessWallPolyPatch::
133 directMappedVariableThicknessWallPolyPatch
135     const directMappedVariableThicknessWallPolyPatch& pp,
136     const polyBoundaryMesh& bm,
137     const label index,
138     const label newSize,
139     const label newStart
142     directMappedWallPolyPatch(pp, bm, index, newSize, newStart),
143     thickness_(newSize)
147 Foam::directMappedVariableThicknessWallPolyPatch::
148 directMappedVariableThicknessWallPolyPatch
150     const directMappedVariableThicknessWallPolyPatch& pp,
151     const polyBoundaryMesh& bm,
152     const label index,
153     const labelUList& mapAddressing,
154     const label newStart
157     directMappedWallPolyPatch(pp, bm, index, mapAddressing, newStart),
158     thickness_(pp.size())
162 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
164 Foam::directMappedVariableThicknessWallPolyPatch::
165 ~directMappedVariableThicknessWallPolyPatch()
170 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
172 void Foam::directMappedVariableThicknessWallPolyPatch::
173 write(Foam::Ostream& os) const
175     os.writeKeyword("thickness") << thickness_ << token::END_STATEMENT << nl;
178 // ************************************************************************* //