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())
121 << token::END_STATEMENT <<
nl;
127 template<
class EntryType>
131 const word& entryName,
132 const EntryType& value1,
133 const EntryType& value2
136 if (value1 != value2)
138 os.
writeKeyword(entryName) << value2 << token::END_STATEMENT <<
nl;
147 return patchInternalField(primitiveField());
152 template<
class Type1>
161 if (iF.
size() != primitiveField().size())
164 <<
"given internal field does not correspond to the mesh. " 165 <<
"Field size: " << iF.
size()
166 <<
" mesh size: " << primitiveField().size()
175 template<
class Type1>
182 return patchInternalField(iF, patch().meshPoints());
187 template<
class Type1>
195 if (iF.
size() != primitiveField().size())
198 <<
"given internal field does not correspond to the mesh. " 199 <<
"Field size: " << iF.
size()
200 <<
" mesh size: " << primitiveField().size()
204 if (pF.
size() != size())
207 <<
"given patch field does not correspond to the mesh. " 208 <<
"Field size: " << pF.
size()
209 <<
" mesh size: " << size()
218 iF[mp[pointi]] += pF[pointi];
224 template<
class Type1>
233 if (iF.
size() != primitiveField().size())
236 <<
"given internal field does not correspond to the mesh. " 237 <<
"Field size: " << iF.
size()
238 <<
" mesh size: " << primitiveField().size()
242 if (pF.
size() != size())
245 <<
"given patch field does not correspond to the mesh. " 246 <<
"Field size: " << pF.
size()
247 <<
" mesh size: " << size()
256 label pointi = points[i];
257 iF[mp[pointi]] += pF[pointi];
263 template<
class Type1>
272 if (iF.
size() != primitiveField().size())
275 <<
"given internal field does not correspond to the mesh. " 276 <<
"Field size: " << iF.
size()
277 <<
" mesh size: " << primitiveField().size()
284 <<
"given patch field does not correspond to the meshPoints. " 285 <<
"Field size: " << pF.
size()
286 <<
" meshPoints size: " << size()
290 forAll(meshPoints, pointi)
292 iF[meshPoints[pointi]] = pF[pointi];
298 template<
class Type1>
305 setInInternalField(iF, pF, patch().meshPoints());
332 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.
void writeEntryIfDifferent(Ostream &os, const word &entryName, const EntryType &value1, const EntryType &value2) const
Helper function to write the keyword and entry only if the.
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...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
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,.
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.