59 <<
"Required entry 'value' : missing for patch " <<
p.name()
60 <<
" in dictionary " <<
dict.relativeName() <<
nl
71 const auto&
p = fvPatchFieldBase::patch();
72 this->resize_nocopy(
p.size());
73 p.patchInternalField(internalField_, *
this);
143 Field<Type>(std::move(pfld)),
181 this->extrapolateInternal();
183 this->
map(ptf, mapper);
228 this->patchInternalField(result);
229 const auto& pif = result;
232 const auto& dc = patch().deltaCoeffs();
234 const label len = result.
size();
236 for (label i = 0; i < len; ++i)
238 result[i] = dc[i]*(pfld[i] - pif[i]);
246 auto tfld = tmp<Field<Type>>
::New(this->size());
256 return patch().patchInternalField(internalField_);
263 patch().patchInternalField(internalField_, pfld);
277 f.resize_nocopy(mapper.
size());
280 f = this->patchInternalField();
305 if (mapAddressing[i] < 0)
317 const labelList& localAddrs = mapAddressing[i];
319 if (!localAddrs.size())
407 os.writeEntry(
"type",
type());
409 if (!patchType().empty())
411 os.writeEntry(
"patchType", patchType());
415 os.writeEntry(
"useImplicit",
"true");
425 const UList<Type>& ul
518void Foam::fvPatchField<Type>::operator/=
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual bool direct() const =0
Is it a direct (non-interpolating) mapper?
virtual const labelUList & directAddressing() const
Return the direct addressing values.
virtual label size() const =0
The size of the mapper.
virtual bool distributed() const
Does the mapper have remote contributions?
virtual const labelListList & addressing() const
Return the interpolation addressing.
virtual bool hasUnmapped() const =0
Any unmapped values?
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
void operator=(const Field< Type > &)
Copy assignment.
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
void operator+=(const UList< Type > &)
void operator-=(const UList< Type > &)
constexpr Field() noexcept
Default construct.
void operator*=(const UList< scalar > &)
void assign(const entry &e, const label len)
Assign from a primitive dictionary entry with the following behaviour:
void operator/=(const UList< scalar > &)
void map(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 map from the given field
void rmap(const UList< Type > &mapF, const labelUList &mapAddressing)
1 to 1 reverse-map from the given field
static bool isReadRequired(readOption opt) noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
readOption
Enumeration defining read preferences.
static bool isAnyRead(readOption opt) noexcept
True if any reading may be required (ie, != NO_READ).
void resize_nocopy(const label len)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool empty() const noexcept
commsTypes
Communications types.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Template invariant parts for fvPatchField.
fvPatchFieldBase(const fvPatch &p)
Construct from patch.
void checkPatch(const fvPatchFieldBase &rhs) const
Check that patches are identical.
const fvPatch & patch() const noexcept
Return the patch.
void setManipulated(bool state) noexcept
Set matrix manipulated state.
bool useImplicit() const noexcept
Use implicit formulation for coupled patches only.
void setUpdated(bool state) noexcept
Set updated state.
const word & patchType() const noexcept
The optional patch type.
bool updated() const noexcept
True if the boundary condition has already been updated.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void write(Ostream &) const
Write.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void manipulateMatrix(fvMatrix< Type > &matrix)
Manipulate matrix.
virtual void updateWeightedCoeffs(const scalarField &weights)
Update the coefficients associated with the patch field.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
void extrapolateInternal()
Assign the patch field from the internal field.
void check(const fvPatchField< Type > &) const
Check against given patch field.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
fvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
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))
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
bool notNull(const T *ptr) noexcept
True if ptr is not a pointer (of type T) to the nullObject.
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.