49#ifndef Foam_faePatchField_H
50#define Foam_faePatchField_H
199 return !patchType_.empty() && patchType_ !=
type();
320 (
dynamic_cast<const faePatchFieldType&
>(ptf),
p, iF, m)
439 template<
class DerivedPatchField,
class... Args>
442 const DerivedPatchField& pf,
448 new DerivedPatchField(pf, std::forward<Args>(
args)...)
457 const word& patchFieldType,
468 const word& patchFieldType,
469 const word& actualPatchType,
502 template<
class AnyType>
516 return internalField_;
522 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.
readOption
Enumeration defining read preferences.
@ 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)
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Area discretisation.
A FieldMapper for finite-area patch fields.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Template invariant parts for faePatchField.
virtual bool fixesValue() const
True if the patch field fixes a value.
TypeName("faePatchField")
Runtime type information.
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.
faePatchFieldBase(const faPatch &p)
Construct from patch.
const objectRegistry & db() const
The associated objectRegistry.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
void setManipulated(bool state) noexcept
Set matrix manipulated state. This is a no-op for faePatchField.
void setUpdated(bool state) noexcept
Set updated state. This is a no-op for faePatchField.
static int disallowGenericPatchField
Debug switch to disallow the use of generic faePatchField.
const word & patchType() const noexcept
The optional patch type.
bool manipulatedMatrix() const noexcept
True if the matrix has already been manipulated. Always false for faePatchField.
void checkPatch(const faePatchFieldBase &rhs) const
Check that patches are identical.
virtual bool constraintOverride() const
True if the type does not correspond to the constraint type.
bool updated() const noexcept
True if the boundary condition has already been updated. This is always true for faePatchField.
word & patchType() noexcept
The optional patch type.
static const word & emptyType() noexcept
The type name for empty patch fields.
virtual ~faePatchFieldBase()=default
Destructor.
const faPatch & patch() const noexcept
Return the patch.
faePatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cove...
const DimensionedField< scalar, edgeMesh > & internalField() const noexcept
faePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &, const Type &value)
Construct from patch, internal field and value.
virtual void operator/=(const Field< scalar > &)
virtual void operator+=(const faePatchField< Type > &)
static tmp< faePatchField< Type > > New(const word &patchFieldType, const word &actualPatchType, const faPatch &, const DimensionedField< Type, edgeMesh > &)
Return a pointer to a new patchField created on freestore given.
virtual void operator=(const faePatchField< Type > &)
declareRunTimeSelectionTable(tmp, faePatchField, patch,(const faPatch &p, const DimensionedField< Type, edgeMesh > &iF),(p, iF))
calculatedFaePatchField< Type > Calculated
Type for a calculated patch.
faePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &)
Construct from patch and internal field.
static tmp< faePatchField< Type > > New(const faPatch &, const DimensionedField< Type, edgeMesh > &, const dictionary &)
Return a pointer to a new patchField created on freestore.
faePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &, Field< Type > &&pfld)
Construct from patch, internal field and patch field.
virtual void operator=(const Type &)
declareRunTimeSelectionTable(tmp, faePatchField, patchMapper,(const faePatchField< Type > &ptf, const faPatch &p, const DimensionedField< Type, edgeMesh > &iF, const faPatchFieldMapper &m),(dynamic_cast< const faePatchFieldType & >(ptf), p, iF, m))
faePatchField(const faePatchField< Type > &pfld, const faPatch &p, const DimensionedField< Type, edgeMesh > &iF, const Type &value)
Copy construct onto new patch with specified value.
faePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &, const dictionary &dict, IOobjectOption::readOption requireValue=IOobjectOption::LAZY_READ)
Construct from patch, internal field and dictionary.
static tmp< faePatchField< Type > > NewCalculatedType(const faePatchField< AnyType > &pf)
Return a pointer to a new calculatedFaePatchField created on.
virtual void operator-=(const Type &)
Type value_type
The value_type for the patch field.
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field, generally a no-op.
virtual void operator*=(const faePatchField< scalar > &)
faPatch Patch
The patch type for the patch field.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
static tmp< faePatchField< Type > > NewCalculatedType(const faPatch &p)
Return a pointer to a new calculatedFaePatchField created on.
bool operator!=(const faePatchField< Type > &) const =delete
virtual void operator*=(const Field< scalar > &)
virtual void operator==(const Field< Type > &)
virtual void operator==(const faePatchField< Type > &)
virtual tmp< faePatchField< Type > > clone(const DimensionedField< Type, edgeMesh > &iF) const
Clone with an internal field reference.
virtual ~faePatchField()=default
Destructor.
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.
const Field< Type > & primitiveField() const noexcept
Return const-reference to the internal field values.
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 > &)
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, generally a no-op.
void check(const faePatchField< Type > &) const
Check against given patch field.
pTraits< Type >::cmptType cmptType
The component type for patch field.
static tmp< faePatchField< Type > > New(const faePatchField< Type > &, const faPatch &, const DimensionedField< Type, edgeMesh > &, const faPatchFieldMapper &)
Return a pointer to a new patchField created on freestore from.
virtual void write(Ostream &os) const
Write.
DimensionedField< Type, edgeMesh > Internal
The internal field type associated with the patch field.
faePatchField(const faePatchField< Type > &pfld, const DimensionedField< Type, edgeMesh > &iF)
Copy construct with internal field reference.
virtual tmp< faePatchField< Type > > clone() const
Clone patch field with its own internal field reference.
virtual void operator/=(const scalar)
faePatchField(const faePatchField< Type > &pfld)
Copy construct.
bool operator!=(const Field< Type > &) const =delete
static tmp< faePatchField< Type > > New(const word &patchFieldType, const faPatch &, const DimensionedField< Type, edgeMesh > &)
Return a pointer to a new patchField created on freestore given.
faePatchField(const faPatch &, const DimensionedField< Type, edgeMesh > &, const Field< Type > &pfld)
Construct from patch, internal field and patch field.
virtual void operator/=(const faePatchField< scalar > &)
virtual void autoMap(const faPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
bool operator!=(const Type &) const =delete
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
virtual void operator-=(const faePatchField< Type > &)
static tmp< faePatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
virtual void rmap(const faePatchField< Type > &, const labelList &)
Reverse map the given faePatchField onto this faePatchField.
declareRunTimeSelectionTable(tmp, faePatchField, dictionary,(const faPatch &p, const DimensionedField< Type, edgeMesh > &iF, const dictionary &dict),(p, iF, dict))
virtual void operator*=(const scalar)
virtual void operator==(const Type &)
faePatchField(const faePatchField< Type > &, const faPatch &, const DimensionedField< Type, edgeMesh > &, const faPatchFieldMapper &)
Construct by mapping the given faePatchField onto a new patch.
Registry of regIOobjects.
A traits class, which is primarily used for primitives and vector-space.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Macros for creating faePatchField 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.