mappedVariableThicknessWallPolyPatch.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
28 
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  defineTypeNameAndDebug(mappedVariableThicknessWallPolyPatch, 0);
34 
36  (
37  polyPatch,
38  mappedVariableThicknessWallPolyPatch,
39  word
40  );
41 
43  (
44  polyPatch,
45  mappedVariableThicknessWallPolyPatch,
46  dictionary
47  );
48 }
49 
50 
51 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
52 
54 (
55  const word& name,
56  const label size,
57  const label start,
58  const label index,
59  const polyBoundaryMesh& bm,
60  const word& patchType
61 )
62 :
63  mappedWallPolyPatch(name, size, start, index, bm, patchType),
64  thickness_(size)
65 {}
66 
67 
69 (
70  const word& name,
71  const label size,
72  const label start,
73  const label index,
74  const word& sampleRegion,
76  const word& samplePatch,
77  const vectorField& offset,
78  const polyBoundaryMesh& bm
79 )
80 :
81  mappedWallPolyPatch(name, size, start, index, bm, typeName),
82  thickness_(size)
83 {}
84 
85 
87 (
88  const word& name,
89  const label size,
90  const label start,
91  const label index,
92  const word& sampleRegion,
94  const word& samplePatch,
95  const vector& offset,
96  const polyBoundaryMesh& bm
97 )
98 :
99  mappedWallPolyPatch(name, size, start, index, bm, typeName),
100  thickness_(size)
101 {}
102 
103 
105 (
106  const word& name,
107  const dictionary& dict,
108  const label index,
109  const polyBoundaryMesh& bm,
110  const word& patchType
111 )
112 :
113  mappedWallPolyPatch(name, dict, index, bm, patchType),
114  thickness_(scalarField("thickness", dict, this->size()))
115 {}
116 
117 
120 (
122  const polyBoundaryMesh& bm
123 )
124 :
125  mappedWallPolyPatch(pp, bm),
126  thickness_(pp.thickness_)
127 {}
128 
129 
131 (
133  const polyBoundaryMesh& bm,
134  const label index,
135  const label newSize,
136  const label newStart
137 )
138 :
139  mappedWallPolyPatch(pp, bm, index, newSize, newStart),
140  thickness_(newSize)
141 {}
142 
143 
145 (
147  const polyBoundaryMesh& bm,
148  const label index,
149  const labelUList& mapAddressing,
150  const label newStart
151 )
152 :
153  mappedWallPolyPatch(pp, bm, index, mapAddressing, newStart),
154  thickness_(pp.size())
155 {}
156 
157 
158 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
159 
162 {}
163 
164 
165 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
166 
169 {
170  os.writeKeyword("thickness") << thickness_ << token::END_STATEMENT << nl;
171 }
172 
173 
174 // ************************************************************************* //
Foam::token::END_STATEMENT
@ END_STATEMENT
Definition: token.H:99
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::polyBoundaryMesh
Foam::polyBoundaryMesh.
Definition: polyBoundaryMesh.H:60
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Foam::mode
mode_t mode(const fileName &)
Return the file mode.
Definition: POSIX.C:573
Foam::mappedVariableThicknessWallPolyPatch::write
void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: mappedVariableThicknessWallPolyPatch.C:168
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::mappedVariableThicknessWallPolyPatch::mappedVariableThicknessWallPolyPatch
mappedVariableThicknessWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
Definition: mappedVariableThicknessWallPolyPatch.C:54
Foam::mappedVariableThicknessWallPolyPatch
Foam::mappedVariableThicknessWallPolyPatch.
Definition: mappedVariableThicknessWallPolyPatch.H:52
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::mappedWallPolyPatch
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
Definition: mappedWallPolyPatch.H:57
Foam::mappedVariableThicknessWallPolyPatch::~mappedVariableThicknessWallPolyPatch
virtual ~mappedVariableThicknessWallPolyPatch()
Destructor.
Definition: mappedVariableThicknessWallPolyPatch.C:161
mappedVariableThicknessWallPolyPatch.H
Foam::Vector< scalar >
scalarField
volScalarField scalarField(fieldObject, mesh)
Foam::Ostream::writeKeyword
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
Definition: Ostream.C:59
Foam::mappedVariableThicknessWallPolyPatch::thickness_
scalarList thickness_
Thickness.
Definition: mappedVariableThicknessWallPolyPatch.H:60
Foam::UList
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::mappedPatchBase::sampleMode
sampleMode
Mesh items to sample.
Definition: mappedPatchBase.H:109
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47