47 #ifndef Foam_fvsPatchField_H 48 #define Foam_fvsPatchField_H 62 class fvPatchFieldMapper;
65 template<
class Type>
class fvsPatchField;
66 template<
class Type>
class calculatedFvsPatchField;
69 Ostream& operator<<(Ostream&, const fvsPatchField<Type>&);
280 (dynamic_cast<const fvsPatchFieldType&>(ptf),
p, iF, m)
385 virtual tmp<fvsPatchField<Type>>
clone 387 const DimensionedField<Type, surfaceMesh>& iF
390 return tmp<fvsPatchField<Type>>
392 new fvsPatchField<Type>(*
this, iF)
400 template<
class DerivedPatchField,
class... Args>
401 static tmp<fvsPatchField<Type>>
Clone 403 const DerivedPatchField& pf,
407 return tmp<fvsPatchField<Type>>
409 new DerivedPatchField(pf, std::forward<Args>(
args)...)
418 const word& patchFieldType,
429 const word& patchFieldType,
430 const word& actualPatchType,
463 template<
class AnyType>
482 return internalField_;
488 return internalField_;
497 const fvPatchFieldMapper&
503 const fvsPatchField<Type>&,
545 virtual void write(Ostream&
os)
const;
548 void check(
const fvsPatchField<Type>&)
const;
553 virtual void operator=(
const UList<Type>&);
555 virtual void operator=(
const fvsPatchField<Type>&);
556 virtual void operator+=(
const fvsPatchField<Type>&);
557 virtual void operator-=(
const fvsPatchField<Type>&);
558 virtual void operator*=(
const fvsPatchField<scalar>&);
559 virtual void operator/=(
const fvsPatchField<scalar>&);
564 virtual void operator*=(
const Field<scalar>&);
565 virtual void operator/=(
const Field<scalar>&);
576 virtual void operator==(
const fvsPatchField<Type>&);
virtual void operator*=(const fvsPatchField< scalar > &)
void setManipulated(bool state) noexcept
Set matrix manipulated state. This is a no-op for fvsPatchField.
static const word & emptyType() noexcept
The type name for empty patch fields.
virtual ~fvsPatchField()=default
Destructor.
const DimensionedField< Type, surfaceMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
commsTypes
Communications types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
static tmp< fvsPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
virtual void initEvaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field after a local.
const Field< Type > & primitiveField() const noexcept
Return const-reference to the internal field values.
static int disallowGenericPatchField
Debug switch to disallow the use of generic fvsPatchField.
virtual void operator==(const fvsPatchField< Type > &)
bool operator!=(const fvsPatchField< Type > &) const =delete
TypeName("fvsPatchField")
Runtime type information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const objectRegistry & db() const
The associated objectRegistry.
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
const fvPatch & patch() const noexcept
Return the patch.
DimensionedField< Type, surfaceMesh > Internal
The internal field type associated with the patch field.
calculatedFvsPatchField< Type > Calculated
Type for a calculated patch.
const word calculatedType
A calculated patch field type.
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets Updated to false.
virtual void operator/=(const fvsPatchField< scalar > &)
Generic templated field type.
A class for handling words, derived from Foam::string.
void check(const fvsPatchField< Type > &) const
Check against given patch field.
static tmp< fvsPatchField< Type > > NewCalculatedType(const fvPatch &p)
Return a pointer to a new calculatedFvsPatchField created on.
A FieldMapper for finite-volume patch fields.
declareRunTimeSelectionTable(tmp, fvsPatchField, patch,(const fvPatch &p, const DimensionedField< Type, surfaceMesh > &iF),(p, iF))
fvsPatchFieldBase(const fvPatch &p)
Construct from patch.
fvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
void checkPatch(const fvsPatchFieldBase &rhs) const
Check that patches are identical.
Macros for creating fvsPatchField types.
virtual void operator-=(const fvsPatchField< Type > &)
fvPatch Patch
The patch type for the patch field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual ~fvsPatchFieldBase()=default
Destructor.
const word emptyType
An empty patch field type.
OBJstream os(runTime.globalPath()/outputName)
virtual void rmap(const fvsPatchField< Type > &, const labelList &)
Reverse map the given fvsPatchField onto this fvsPatchField.
virtual bool coupled() const
True if the patch field is coupled.
virtual void write(Ostream &os) const
Write the patch "type".
Template invariant parts for fvsPatchField.
virtual void operator+=(const fvsPatchField< Type > &)
bool manipulatedMatrix() const noexcept
True if the matrix has already been manipulated.
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field.
Type value_type
The value_type for the patch field.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual void operator=(const UList< Type > &)
virtual void evaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field after a local operation (e.g. *=)
void setUpdated(bool state) noexcept
Set updated state. This is a no-op for fvsPatchField.
Reading is optional [identical to READ_IF_PRESENT].
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
List< label > labelList
A List of labels.
A class for managing temporary objects.
Registry of regIOobjects.
"buffered" : (MPI_Bsend, MPI_Recv)
bool updated() const noexcept
True if the boundary condition has already been updated. This is always true for fvsPatchField.
Foam::argList args(argc, argv)
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
virtual bool fixesValue() const
True if the patch field fixes a value.
virtual tmp< fvsPatchField< Type > > clone() const
Clone patch field with its own internal field reference.
static tmp< fvsPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Return a pointer to a new patchField created on freestore given.
readOption
Enumeration defining read preferences.