47#ifndef Foam_fvsPatchField_H
48#define Foam_fvsPatchField_H
200 return !patchType_.empty() && patchType_ !=
type();
322 (
dynamic_cast<const fvsPatchFieldType&
>(ptf),
p, iF, m)
456 template<
class DerivedPatchField,
class... Args>
459 const DerivedPatchField& pf,
465 new DerivedPatchField(pf, std::forward<Args>(
args)...)
474 const word& patchFieldType,
485 const word& patchFieldType,
486 const word& actualPatchType,
519 template<
class AnyType>
538 return internalField_;
544 return internalField_;
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
constexpr Field() noexcept
Default construct.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
readOption
Enumeration defining read preferences.
@ MUST_READ
Reading required.
@ LAZY_READ
Reading is optional [identical to READ_IF_PRESENT].
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
commsTypes
Communications types.
@ buffered
"buffered" : (MPI_Bsend, MPI_Recv)
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Template invariant parts for fvsPatchField.
virtual bool fixesValue() const
True if the patch field fixes a value.
virtual ~fvsPatchFieldBase()=default
Destructor.
virtual bool coupled() const
True if the patch field is coupled.
static const word & zeroValueType() noexcept
The type name for zeroValue patch fields.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
const objectRegistry & db() const
The associated objectRegistry.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
const fvPatch & patch() const noexcept
Return the patch.
void setManipulated(bool state) noexcept
Set matrix manipulated state. This is a no-op for fvsPatchField.
TypeName("fvsPatchField")
Runtime type information.
void setUpdated(bool state) noexcept
Set updated state. This is a no-op for fvsPatchField.
static int disallowGenericPatchField
Debug switch to disallow the use of generic fvsPatchField.
const word & patchType() const noexcept
The optional patch type.
void checkPatch(const fvsPatchFieldBase &rhs) const
Check that patches are identical.
bool manipulatedMatrix() const noexcept
True if the matrix has already been manipulated Always false for fvsPatchField.
virtual bool constraintOverride() const
True if the type does not correspond to the constraint type.
virtual bool assignable() const
True if the value of the patch field is altered by assignment.
bool updated() const noexcept
True if the boundary condition has already been updated. This is always true for fvsPatchField.
word & patchType() noexcept
The optional patch type.
static const word & emptyType() noexcept
The type name for empty patch fields.
fvsPatchFieldBase(const fvPatch &p)
Construct from patch.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
virtual void operator/=(const Field< scalar > &)
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
bool operator!=(const fvsPatchField< Type > &) const =delete
virtual void operator=(const Type &)
virtual void rmap(const fvsPatchField< Type > &, const labelList &)
Reverse map the given fvsPatchField onto this fvsPatchField.
fvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &, const Type &value)
Construct from patch, internal field and value.
virtual void operator-=(const Type &)
static tmp< fvsPatchField< Type > > New(const fvsPatchField< Type > &, const fvPatch &, const DimensionedField< Type, surfaceMesh > &, const fvPatchFieldMapper &)
Return a pointer to a new patchField created on freestore from.
Type value_type
The value_type for the patch field.
virtual tmp< fvsPatchField< Type > > clone(const DimensionedField< Type, surfaceMesh > &iF) const
Clone with an internal field reference.
fvsPatchField(const fvsPatchField< Type > &pfld)
Copy construct.
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field.
fvPatch Patch
The patch type for the patch field.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void operator*=(const Field< scalar > &)
virtual void operator==(const fvsPatchField< Type > &)
virtual void operator==(const Field< Type > &)
fvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
virtual void operator+=(const Field< Type > &)
virtual void initEvaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field after a local.
fvsPatchField(const fvPatch &p, const DimensionedField< Type, surfaceMesh > &iF, const dictionary &dict, const bool needValue)
Construct, forwarding to readOption variant.
declareRunTimeSelectionTable(tmp, fvsPatchField, patch,(const fvPatch &p, const DimensionedField< Type, surfaceMesh > &iF),(p, iF))
virtual tmp< fvsPatchField< Type > > clone() const
Clone patch field with its own internal field reference.
const Field< Type > & primitiveField() const noexcept
Return const-reference to the internal field values.
declareRunTimeSelectionTable(tmp, fvsPatchField, dictionary,(const fvPatch &p, const DimensionedField< Type, surfaceMesh > &iF, const dictionary &dict),(p, iF, dict))
virtual void operator+=(const Type &)
virtual void evaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field after a local operation (e.g. *=).
virtual void operator-=(const Field< Type > &)
virtual void operator=(const UList< Type > &)
fvsPatchField(const fvsPatchField< Type > &, const fvPatch &, const DimensionedField< Type, surfaceMesh > &, const fvPatchFieldMapper &)
Construct by mapping the given fvsPatchField onto a new patch.
fvsPatchField(const fvsPatchField< Type > &pfld, const fvPatch &p, const DimensionedField< Type, surfaceMesh > &iF, const Type &value)
Construct onto new patch with internal field reference and specified value.
fvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &, const dictionary &dict, IOobjectOption::readOption requireValue=IOobjectOption::MUST_READ)
Construct from patch, internal field and dictionary.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets Updated to false.
declareRunTimeSelectionTable(tmp, fvsPatchField, patchMapper,(const fvsPatchField< Type > &ptf, const fvPatch &p, const DimensionedField< Type, surfaceMesh > &iF, const fvPatchFieldMapper &m),(dynamic_cast< const fvsPatchFieldType & >(ptf), p, iF, m))
pTraits< Type >::cmptType cmptType
The component type for patch field.
virtual void write(Ostream &os) const
Write the patch "type".
DimensionedField< Type, surfaceMesh > Internal
The internal field type associated with the patch field.
fvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &, Field< Type > &&pfld)
Construct from patch, internal field and patch field.
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.
fvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &, const Field< Type > &pfld)
Construct from patch, internal field and patch field.
virtual void operator=(const fvsPatchField< Type > &)
virtual void operator/=(const scalar)
virtual void operator-=(const fvsPatchField< Type > &)
bool operator!=(const Field< Type > &) const =delete
const DimensionedField< scalar, surfaceMesh > & internalField() const noexcept
static tmp< fvsPatchField< Type > > NewCalculatedType(const fvsPatchField< AnyType > &pf)
Return a pointer to a new calculatedFvsPatchField created on.
virtual void operator/=(const fvsPatchField< scalar > &)
bool operator!=(const Type &) const =delete
virtual ~fvsPatchField()=default
Destructor.
virtual void operator+=(const fvsPatchField< Type > &)
calculatedFvsPatchField< Type > Calculated
Type for a calculated patch.
fvsPatchField(const fvsPatchField< Type > &, const DimensionedField< Type, surfaceMesh > &)
Copy construct with internal field reference.
void check(const fvsPatchField< Type > &) const
Check against given patch field.
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
static tmp< fvsPatchField< Type > > NewCalculatedType(const fvPatch &p)
Return a pointer to a new calculatedFvsPatchField created on.
static tmp< fvsPatchField< Type > > New(const word &patchFieldType, const word &actualPatchType, const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Return a pointer to a new patchField created on freestore given.
static tmp< fvsPatchField< Type > > New(const fvPatch &, const DimensionedField< Type, surfaceMesh > &, const dictionary &)
Return a pointer to a new patchField created on freestore.
virtual void operator*=(const scalar)
static tmp< fvsPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
virtual void operator*=(const fvsPatchField< scalar > &)
virtual void operator==(const Type &)
Registry of regIOobjects.
A traits class, which is primarily used for primitives and vector-space.
Mesh data needed to do the Finite Volume discretisation.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Macros for creating fvsPatchField types.
const word calculatedType
A calculated patch field type.
const word emptyType
An empty patch field type.
const word zeroValueType
A zeroValue patch field type.
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.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
Foam::argList args(argc, argv)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.