Go to the documentation of this file.
44 patchType_(word::null)
59 patchType_(
dict.lookupOrDefault<
word>(
"patchType", word::null))
75 patchType_(ptf.patchType_)
86 internalField_(ptf.internalField_),
88 patchType_(ptf.patchType_)
102 patchType_(ptf.patchType_)
111 return patch_.boundaryMesh().mesh()();
120 if (patchType_.size())
131 return patchInternalField(primitiveField());
136 template<
class Type1>
145 if (iF.size() != primitiveField().size())
148 <<
"given internal field does not correspond to the mesh. "
149 <<
"Field size: " << iF.size()
150 <<
" mesh size: " << primitiveField().size()
159 template<
class Type1>
166 return patchInternalField(iF,
patch().meshPoints());
171 template<
class Type1>
179 if (iF.size() != primitiveField().size())
182 <<
"given internal field does not correspond to the mesh. "
183 <<
"Field size: " << iF.size()
184 <<
" mesh size: " << primitiveField().size()
188 if (pF.size() != size())
191 <<
"given patch field does not correspond to the mesh. "
192 <<
"Field size: " << pF.size()
193 <<
" mesh size: " << size()
202 iF[
mp[pointi]] += pF[pointi];
208 template<
class Type1>
217 if (iF.size() != primitiveField().size())
220 <<
"given internal field does not correspond to the mesh. "
221 <<
"Field size: " << iF.size()
222 <<
" mesh size: " << primitiveField().size()
226 if (pF.size() != size())
229 <<
"given patch field does not correspond to the mesh. "
230 <<
"Field size: " << pF.size()
231 <<
" mesh size: " << size()
241 iF[
mp[pointi]] += pF[pointi];
247 template<
class Type1>
256 if (iF.size() != primitiveField().size())
259 <<
"given internal field does not correspond to the mesh. "
260 <<
"Field size: " << iF.size()
261 <<
" mesh size: " << primitiveField().size()
265 if (pF.size() != meshPoints.size())
268 <<
"given patch field does not correspond to the meshPoints. "
269 <<
"Field size: " << pF.size()
270 <<
" meshPoints size: " << size()
274 forAll(meshPoints, pointi)
276 iF[meshPoints[pointi]] = pF[pointi];
282 template<
class Type1>
289 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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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...