41 if (!IOobjectOption::isAnyRead(readOpt))
return false;
45 const auto* eptr =
dict.findEntry(
"value", keyType::LITERAL);
53 if (IOobjectOption::isReadRequired(readOpt))
56 <<
"Required entry 'value' : missing for patch " <<
p.name()
57 <<
" in dictionary " <<
dict.relativeName() <<
nl 70 const Field<Type>& iF = this->primitiveField();
71 Field<Type>& pfld = *
this;
73 pfld.resize_nocopy(meshPoints.size());
77 pfld[i] = iF[meshPoints[i]];
105 Field<Type>(
p.size(), value)
121 if (!readValueEntry(
dict, requireValue))
132 const valuePointPatchField<Type>& ptf,
134 const DimensionedField<Type, pointMesh>& iF,
135 const pointPatchFieldMapper& mapper
139 Field<Type>(ptf, mapper)
194 Field<Type>& iF =
const_cast<Field<Type>&
>(this->primitiveField());
196 this->setInInternalField(iF, *
this);
208 this->setInInternalField(iF, *
this);
218 this->writeValueEntry(
os);
241 this->extrapolateInternal();
282 this->extrapolateInternal();
void extrapolateInternal()
Assign the patch field from the internal field.
Foam::valuePointPatchField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
commsTypes
Communications types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
constexpr char nl
The newline '\n' character (0x0a)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
Foam::pointPatchFieldMapper.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void write(Ostream &) const
Write.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
Abstract base class for point-mesh patch fields.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
valuePointPatchField(const valuePointPatchField &)=default
Copy construct.
Generic templated field type.
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void assign(Field< Tout > &result, const Field< T1 > &a, const UnaryOp &op)
Populate a field as the result of a unary operation on an input.
OBJstream os(runTime.globalPath()/outputName)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Basic pointPatch represents a set of points from the mesh.
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.
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
virtual void rmap(const pointPatchField< Type > &, const labelList &)
Reverse map the given PointPatchField onto.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0)
readOption
Enumeration defining read preferences.