108 if (overridesConstraint())
119 return patchInternalField(primitiveField());
124 template<
class Type1>
133 if (iF.
size() != primitiveField().size())
136 <<
"given internal field does not correspond to the mesh. "
137 <<
"Field size: " << iF.
size()
138 <<
" mesh size: " << primitiveField().size()
147 template<
class Type1>
154 return patchInternalField(iF, patch().meshPoints());
159 template<
class Type1>
167 if (iF.
size() != primitiveField().size())
170 <<
"given internal field does not correspond to the mesh. "
171 <<
"Field size: " << iF.
size()
172 <<
" mesh size: " << primitiveField().size()
176 if (pF.
size() != size())
179 <<
"given patch field does not correspond to the mesh. "
180 <<
"Field size: " << pF.
size()
181 <<
" mesh size: " << size()
190 iF[
mp[pointi]] += pF[pointi];
196 template<
class Type1>
205 if (iF.
size() != primitiveField().size())
208 <<
"given internal field does not correspond to the mesh. "
209 <<
"Field size: " << iF.
size()
210 <<
" mesh size: " << primitiveField().size()
214 if (pF.
size() != size())
217 <<
"given patch field does not correspond to the mesh. "
218 <<
"Field size: " << pF.
size()
219 <<
" mesh size: " << size()
229 iF[
mp[pointi]] += pF[pointi];
235 template<
class Type1>
244 if (iF.
size() != primitiveField().size())
247 <<
"given internal field does not correspond to the mesh. "
248 <<
"Field size: " << iF.
size()
249 <<
" mesh size: " << primitiveField().size()
256 <<
"given patch field does not correspond to the meshPoints. "
257 <<
"Field size: " << pF.
size()
258 <<
" meshPoints size: " << size()
262 forAll(meshPoints, pointi)
264 iF[meshPoints[pointi]] = pF[pointi];
270 template<
class Type1>
277 setInternalField(iF, pF, patch().meshPoints());
304 os.
check(
"Ostream& operator<<(Ostream&, const pointPatchField<Type>&)");
#define forAll(list, i)
Loop across all elements in list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Pre-declare SubField and related Field type.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & write(const token &)
Write token.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
commsTypes
Types of communications.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Abstract base class for field mapping.
Registry of regIOobjects.
const Time & time() const
Return time.
const objectRegistry & db() const
Return the objectRegistry.
Abstract base class for point-mesh patch fields.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
const Time & time() const
Return time.
virtual void write(Ostream &) const
Write.
tmp< Field< Type > > patchInternalField() const
Return field created from appropriate internal field values.
const objectRegistry & db() const
Return local objectRegistry.
void addToInternalField(Field< Type1 > &iF, const Field< Type1 > &pF) const
Given the internal field and a patch field,.
void setInternalField(Field< Type1 > &iF, const Field< Type1 > &pF, const labelList &meshPoints) const
Given the internal field and a patch field,.
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
Basic pointPatch represents a set of points from the mesh.
A class for managing temporary objects.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionedScalar mp
Proton mass.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.