Go to the documentation of this file.
45 patchType_(word::null)
60 patchType_(
dict.getOrDefault<
word>(
"patchType", word::null))
76 patchType_(ptf.patchType_)
87 internalField_(ptf.internalField_),
89 patchType_(ptf.patchType_)
103 patchType_(ptf.patchType_)
112 return patch_.boundaryMesh().mesh()();
121 if (patchType_.size())
132 return patchInternalField(primitiveField());
137 template<
class Type1>
146 if (iF.size() != primitiveField().size())
149 <<
"given internal field does not correspond to the mesh. "
150 <<
"Field size: " << iF.size()
151 <<
" mesh size: " << primitiveField().size()
160 template<
class Type1>
167 return patchInternalField(iF,
patch().meshPoints());
172 template<
class Type1>
180 if (iF.size() != primitiveField().size())
183 <<
"given internal field does not correspond to the mesh. "
184 <<
"Field size: " << iF.size()
185 <<
" mesh size: " << primitiveField().size()
189 if (pF.size() != size())
192 <<
"given patch field does not correspond to the mesh. "
193 <<
"Field size: " << pF.size()
194 <<
" mesh size: " << size()
203 iF[
mp[pointi]] += pF[pointi];
209 template<
class Type1>
218 if (iF.size() != primitiveField().size())
221 <<
"given internal field does not correspond to the mesh. "
222 <<
"Field size: " << iF.size()
223 <<
" mesh size: " << primitiveField().size()
227 if (pF.size() != size())
230 <<
"given patch field does not correspond to the mesh. "
231 <<
"Field size: " << pF.size()
232 <<
" mesh size: " << size()
242 iF[
mp[pointi]] += pF[pointi];
248 template<
class Type1>
257 if (iF.size() != primitiveField().size())
260 <<
"given internal field does not correspond to the mesh. "
261 <<
"Field size: " << iF.size()
262 <<
" mesh size: " << primitiveField().size()
266 if (pF.size() != meshPoints.size())
269 <<
"given patch field does not correspond to the meshPoints. "
270 <<
"Field size: " << pF.size()
271 <<
" meshPoints size: " << size()
275 forAll(meshPoints, pointi)
277 iF[meshPoints[pointi]] = pF[pointi];
283 template<
class Type1>
290 setInInternalField(iF, pF,
patch().meshPoints());
void addToInternalField(Field< Type1 > &iF, const Field< Type1 > &pF) const
Given the internal field and a patch field,.
const dimensionedScalar mp
Proton mass.
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
const objectRegistry & db() const
Return local objectRegistry.
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
Basic pointPatch represents a set of points from the mesh.
Abstract base class for point-mesh patch fields.
void setInInternalField(Field< Type1 > &iF, const Field< Type1 > &pF, const labelList &meshPoints) const
Given the internal field and a patch field,.
Foam::pointPatchFieldMapper.
#define forAll(list, i)
Loop across all elements in list.
Registry of regIOobjects.
Generic templated field type.
virtual void write(Ostream &) const
Write.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
errorManip< error > abort(error &err)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
commsTypes
Types of communications.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const std::string patch
OpenFOAM patch number as a std::string.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
tmp< Field< Type > > patchInternalField() const
Return field created from appropriate internal field values.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...