81 internalField_(ptf.internalField_)
102 os.writeEntry(
"type",
type());
104 if (!patchType().empty())
106 os.writeEntry(
"patchType", patchType());
115 return patchInternalField(primitiveField());
120 template<
class Type1>
129 if (iF.
size() != primitiveField().size())
132 <<
"given internal field does not correspond to the mesh. " 133 <<
"Field size: " << iF.
size()
134 <<
" mesh size: " << primitiveField().size()
138 return tmp<Field<Type1>>
::New(iF, meshPoints);
143 template<
class Type1>
150 return patchInternalField(iF,
patch().meshPoints());
155 template<
class Type1>
163 if (iF.
size() != primitiveField().size())
166 <<
"given internal field does not correspond to the mesh. " 167 <<
"Field size: " << iF.
size()
168 <<
" mesh size: " << primitiveField().size()
172 if (pF.
size() != size())
175 <<
"given patch field does not correspond to the mesh. " 176 <<
"Field size: " << pF.
size()
177 <<
" mesh size: " << size()
186 iF[
mp[pointi]] += pF[pointi];
192 template<
class Type1>
196 const Field<Type1>& pF,
201 if (iF.size() != primitiveField().size())
204 <<
"given internal field does not correspond to the mesh. " 205 <<
"Field size: " << iF.size()
206 <<
" mesh size: " << primitiveField().size()
210 if (pF.size() != size())
213 <<
"given patch field does not correspond to the mesh. " 214 <<
"Field size: " << pF.size()
215 <<
" mesh size: " << size()
225 iF[
mp[pointi]] += pF[pointi];
231 template<
class Type1>
235 const Field<Type1>& pF,
240 if (iF.size() != primitiveField().size())
243 <<
"given internal field does not correspond to the mesh. " 244 <<
"Field size: " << iF.size()
245 <<
" mesh size: " << primitiveField().size()
249 if (pF.size() != meshPoints.size())
252 <<
"given patch field does not correspond to the meshPoints. " 253 <<
"Field size: " << pF.size()
254 <<
" meshPoints size: " << size()
258 forAll(meshPoints, pointi)
260 iF[meshPoints[pointi]] = pF[pointi];
266 template<
class Type1>
270 const Field<Type1>& pF
273 setInInternalField(iF, pF,
patch().meshPoints());
280 pointPatchFieldBase::setUpdated(
true);
292 pointPatchFieldBase::setUpdated(
false);
302 const pointPatchField<Type>& ptf
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
void size(const label n)
Older name for setAddressableSize.
Template invariant parts for pointPatchField.
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
commsTypes
Types of communications.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Foam::pointPatchFieldMapper.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
#define forAll(list, i)
Loop across all elements in list.
Abstract base class for point-mesh patch fields.
Generic templated field type.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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...
OBJstream os(runTime.globalPath()/outputName)
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,.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
List< label > labelList
A List of labels.
A class for managing temporary objects.
const dimensionedScalar mp
Proton mass.