44 if (!IOobjectOption::isAnyRead(readOpt))
return false;
48 const auto* eptr =
dict.findEntry(
"value", keyType::LITERAL);
56 if (IOobjectOption::isReadRequired(readOpt))
59 <<
"Required entry 'value' : missing for patch " <<
p.name()
60 <<
" in dictionary " <<
dict.relativeName() <<
nl 159 readValueEntry(
dict, requireValue);
179 this->extrapolateInternal();
181 this->map(ptf, mapper);
188 const fvPatchField<Type>& ptf
191 fvPatchFieldBase(ptf),
193 internalField_(ptf.internalField_)
222 return patch().deltaCoeffs()*(*
this - patchInternalField());
230 return patch().patchInternalField(internalField_);
237 patch().patchInternalField(internalField_, pfld);
251 f.resize_nocopy(mapper.
size());
254 f = this->patchInternalField();
260 Field<Type>::autoMap(mapper);
266 Field<Type> pif(this->patchInternalField());
279 if (mapAddressing[i] < 0)
291 const labelList& localAddrs = mapAddressing[i];
293 if (!localAddrs.size())
307 const fvPatchField<Type>& ptf,
318 fvPatchFieldBase::setUpdated(
true);
330 fvPatchFieldBase::setUpdated(
true);
343 fvPatchFieldBase::setUpdated(
false);
344 fvPatchFieldBase::setManipulated(
false);
351 fvPatchFieldBase::setManipulated(
true);
362 fvPatchFieldBase::setManipulated(
true);
374 fvPatchFieldBase::setManipulated(
true);
381 os.writeEntry(
"type",
type());
383 if (!patchType().empty())
385 os.writeEntry(
"patchType", patchType());
389 os.writeEntry(
"useImplicit",
"true");
584 Foam::Ostream& Foam::operator<<(Ostream& os, const fvPatchField<Type>& ptf)
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
void size(const label n)
Older name for setAddressableSize.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
constexpr char nl
The newline '\n' character (0x0a)
virtual const labelListList & addressing() const
Return the interpolation addressing.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
void extrapolateInternal()
Assign the patch field from the internal field.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual bool direct() const =0
Is it a direct (non-interpolating) mapper?
Template invariant parts for fvPatchField.
virtual void write(Ostream &) const
Write.
virtual const labelUList & directAddressing() const
Return the direct addressing values.
List< labelList > labelListList
List of labelList.
#define forAll(list, i)
Loop across all elements in list.
virtual label size() const =0
The size of the mapper.
Generic templated field type.
A class for handling words, derived from Foam::string.
A FieldMapper for finite-volume patch fields.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual void manipulateMatrix(fvMatrix< Type > &matrix)
Manipulate matrix.
void check(const fvPatchField< Type > &) const
Check against given patch field.
virtual bool hasUnmapped() const =0
Any unmapped values?
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual bool distributed() const
Does the mapper have remote contributions?
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.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
OBJstream os(runTime.globalPath()/outputName)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
bool notNull(const T *ptr) noexcept
True if ptr is not a pointer (of type T) to the nullObject.
virtual void updateCoeffs()
Update the coefficients associated with the 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.
virtual void updateWeightedCoeffs(const scalarField &weights)
Update the coefficients associated with the patch field.
List< label > labelList
A List of labels.
A class for managing temporary objects.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
fvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
bool checkPatch(const bool allGeometry, const std::string &name, const polyMesh &mesh, const PatchType &pp, const labelUList &meshEdges, labelHashSet *pointSetPtr=nullptr, labelHashSet *badEdgesPtr=nullptr)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
readOption
Enumeration defining read preferences.