42 patchType_(word::null)
73 patchType_(ptf.patchType_)
84 internalField_(ptf.internalField_),
86 patchType_(ptf.patchType_)
100 patchType_(ptf.patchType_)
109 return patch_.boundaryMesh().mesh()();
118 if (patchType_.size())
129 return patchInternalField(primitiveField());
134 template<
class Type1>
143 if (iF.
size() != primitiveField().size())
146 <<
"given internal field does not correspond to the mesh. " 147 <<
"Field size: " << iF.
size()
148 <<
" mesh size: " << primitiveField().size()
157 template<
class Type1>
164 return patchInternalField(iF, patch().meshPoints());
169 template<
class Type1>
177 if (iF.
size() != primitiveField().size())
180 <<
"given internal field does not correspond to the mesh. " 181 <<
"Field size: " << iF.
size()
182 <<
" mesh size: " << primitiveField().size()
186 if (pF.
size() != size())
189 <<
"given patch field does not correspond to the mesh. " 190 <<
"Field size: " << pF.
size()
191 <<
" mesh size: " << size()
200 iF[mp[pointi]] += pF[pointi];
206 template<
class Type1>
215 if (iF.
size() != primitiveField().size())
218 <<
"given internal field does not correspond to the mesh. " 219 <<
"Field size: " << iF.
size()
220 <<
" mesh size: " << primitiveField().size()
224 if (pF.
size() != size())
227 <<
"given patch field does not correspond to the mesh. " 228 <<
"Field size: " << pF.
size()
229 <<
" mesh size: " << size()
238 label pointi = points[i];
239 iF[mp[pointi]] += pF[pointi];
245 template<
class Type1>
254 if (iF.
size() != primitiveField().size())
257 <<
"given internal field does not correspond to the mesh. " 258 <<
"Field size: " << iF.
size()
259 <<
" mesh size: " << primitiveField().size()
266 <<
"given patch field does not correspond to the meshPoints. " 267 <<
"Field size: " << pF.
size()
268 <<
" meshPoints size: " << size()
272 forAll(meshPoints, pointi)
274 iF[meshPoints[pointi]] = pF[pointi];
280 template<
class Type1>
287 setInInternalField(iF, pF, patch().meshPoints());
314 os.check(
"Ostream& operator<<(Ostream&, const pointPatchField<Type>&)");
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
commsTypes
Types of communications.
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::pointPatchFieldMapper.
Abstract base class for point-mesh patch fields.
const objectRegistry & db() const
Return local objectRegistry.
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
void setInInternalField(Field< Type1 > &iF, const Field< Type1 > &pF, const labelList &meshPoints) const
Given the internal field and a patch field,.
errorManip< error > abort(error &err)
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...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
virtual void write(Ostream &) const
Write.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Basic pointPatch represents a set of points from the mesh.
void addToInternalField(Field< Type1 > &iF, const Field< Type1 > &pF) const
Given the internal field and a patch field,.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Registry of regIOobjects.
const dimensionedScalar mp
Proton mass.