92 return patch_.boundaryMesh().mesh()();
101 if (overridesConstraint())
112 return patchInternalField(primitiveField());
117 template<
class Type1>
126 if (iF.
size() != primitiveField().size())
129 <<
"given internal field does not correspond to the mesh. " 130 <<
"Field size: " << iF.
size()
131 <<
" mesh size: " << primitiveField().size()
140 template<
class Type1>
147 return patchInternalField(iF, patch().meshPoints());
152 template<
class Type1>
160 if (iF.
size() != primitiveField().size())
163 <<
"given internal field does not correspond to the mesh. " 164 <<
"Field size: " << iF.
size()
165 <<
" mesh size: " << primitiveField().size()
169 if (pF.
size() != size())
172 <<
"given patch field does not correspond to the mesh. " 173 <<
"Field size: " << pF.
size()
174 <<
" mesh size: " << size()
183 iF[mp[pointi]] += pF[pointi];
189 template<
class Type1>
198 if (iF.
size() != primitiveField().size())
201 <<
"given internal field does not correspond to the mesh. " 202 <<
"Field size: " << iF.
size()
203 <<
" mesh size: " << primitiveField().size()
207 if (pF.
size() != size())
210 <<
"given patch field does not correspond to the mesh. " 211 <<
"Field size: " << pF.
size()
212 <<
" mesh size: " << size()
221 label pointi = points[i];
222 iF[mp[pointi]] += pF[pointi];
228 template<
class Type1>
237 if (iF.
size() != primitiveField().size())
240 <<
"given internal field does not correspond to the mesh. " 241 <<
"Field size: " << iF.
size()
242 <<
" mesh size: " << primitiveField().size()
249 <<
"given patch field does not correspond to the meshPoints. " 250 <<
"Field size: " << pF.
size()
251 <<
" meshPoints size: " << size()
255 forAll(meshPoints, pointi)
257 iF[meshPoints[pointi]] = pF[pointi];
263 template<
class Type1>
270 setInternalField(iF, pF, patch().meshPoints());
297 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.
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.
const dimensionedScalar mp
Proton mass.
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.
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...
void setInternalField(Field< Type1 > &iF, const Field< Type1 > &pF, const labelList &meshPoints) const
Given the internal field and a patch field,.
A class for managing temporary objects.
Registry of regIOobjects.