49 #ifndef Foam_faPatchField_H 50 #define Foam_faPatchField_H 65 class faPatchFieldMapper;
68 template<
class Type>
class faPatchField;
69 template<
class Type>
class calculatedFaPatchField;
70 template<
class Type>
class zeroGradientFaPatchField;
73 Ostream& operator<<(Ostream&, const faPatchField<Type>&);
211 return !patchType_.empty() && patchType_ !=
type();
336 (dynamic_cast<const faPatchFieldType&>(ptf),
p, iF, m)
441 template<
class DerivedPatchField>
442 static tmp<faPatchField<Type>>
Clone 444 const DerivedPatchField& pf
447 return tmp<faPatchField<Type>>
449 new DerivedPatchField(pf)
454 template<
class DerivedPatchField>
455 static tmp<faPatchField<Type>>
Clone 457 const DerivedPatchField& pf,
458 const DimensionedField<Type, areaMesh>& iF
461 return tmp<faPatchField<Type>>
463 new DerivedPatchField(pf, iF)
470 static tmp<faPatchField<Type>>
New 472 const word& patchFieldType,
473 const word& actualPatchType,
475 const DimensionedField<Type, areaMesh>&
481 static tmp<faPatchField<Type>>
New 483 const word& patchFieldType,
485 const DimensionedField<Type, areaMesh>&
490 static tmp<faPatchField<Type>>
New 492 const faPatchField<Type>&,
494 const DimensionedField<Type, areaMesh>&,
495 const faPatchFieldMapper&
500 static tmp<faPatchField<Type>>
New 503 const DimensionedField<Type, areaMesh>&,
516 template<
class AnyType>
534 return internalField_;
540 return internalField_;
625 const tmp<Field<scalar>>&
636 const tmp<Field<scalar>>&
virtual void operator+=(const faPatchField< Type > &)
virtual void autoMap(const faPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
static tmp< faPatchField< Type > > New(const word &patchFieldType, const word &actualPatchType, const faPatch &, const DimensionedField< Type, areaMesh > &)
Return a pointer to a new patchField created on freestore given patch and internal field...
faPatchFieldBase(const faPatch &p)
Construct from patch.
TypeName("faPatchField")
Runtime type information.
virtual void operator-=(const faPatchField< Type > &)
const faPatch & patch() const noexcept
Return the patch.
const word zeroGradientType
A zeroGradient patch field type.
void check(const faPatchField< Type > &) const
Check against given patch field.
virtual void write(Ostream &os) const
Write.
commsTypes
Communications types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
virtual tmp< faPatchField< Type > > clone() const
Clone patch field with its own internal field reference.
pTraits< Type >::cmptType cmptType
The component type for patch field.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
declareRunTimeSelectionTable(tmp, faPatchField, patch,(const faPatch &p, const DimensionedField< Type, areaMesh > &iF),(p, iF))
A traits class, which is primarily used for primitives and vector-space.
const DimensionedField< Type, areaMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
static const word & extrapolatedCalculatedType() noexcept
The type name for extrapolatedCalculated patch fields combines zero-gradient and calculated.
Template invariant parts for faPatchField.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
void setManipulated(bool state) noexcept
Set matrix manipulated state. Currently a no-op for faPatchField.
void extrapolateInternal()
Assign the patch field from the internal field.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< Field< scalar >> &) const
Return the matrix source coefficients corresponding to the evaluation of the value of this patchField...
Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
faPatch Patch
The patch type for the patch field.
virtual ~faPatchField()=default
Destructor.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
const objectRegistry & db() const
The associated objectRegistry.
const word calculatedType
A calculated patch field type.
void setUpdated(bool state) noexcept
Set updated state.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
bool manipulatedMatrix() const noexcept
True if the matrix has already been manipulated. Currently always false for faPatchField.
Macros for creating faPatchField types.
bool operator!=(const faPatchField< Type > &) const =delete
virtual void operator/=(const faPatchField< scalar > &)
virtual bool fixesValue() const
True if the patch field fixes a value.
Generic templated field type.
A class for handling words, derived from Foam::string.
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField on the opposite patch of a coupled patch.
DimensionedField< Type, areaMesh > Internal
The internal field type associated with the patch field.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the evaluation of the gradient of this patch...
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.
const word & patchType() const noexcept
The optional patch type.
bool updated() const noexcept
True if the boundary condition has already been updated.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< Field< scalar >> &) const
Return the matrix diagonal coefficients corresponding to the evaluation of the value of this patchFie...
virtual bool constraintOverride() const
True if the type does not correspond to the constraint type.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static tmp< faPatchField< Type > > Clone(const DerivedPatchField &pf)
Clone a patch field with its own internal field reference.
static int disallowGenericPatchField
Debug switch to disallow the use of generic faPatchField.
const word emptyType
An empty patch field type.
OBJstream os(runTime.globalPath()/outputName)
Finite area patch class. Used for 2-D non-Euclidian finite area method.
static tmp< faPatchField< Type > > NewCalculatedType(const faPatch &p)
Return a pointer to a new calculatedFaPatchField created on freestore without setting patchField valu...
static const word & calculatedType() noexcept
The type name for calculated patch fields.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
void checkPatch(const faPatchFieldBase &rhs) const
Check that patches are identical.
static const word & emptyType() noexcept
The type name for empty patch fields.
virtual void rmap(const faPatchField< Type > &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchFi...
Type value_type
The value_type for the patch field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void operator=(const UList< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual bool coupled() const
True if the patch field is coupled.
virtual void operator==(const faPatchField< Type > &)
Reading is optional [identical to READ_IF_PRESENT].
virtual ~faPatchFieldBase()=default
Destructor.
A class for managing temporary objects.
Registry of regIOobjects.
"buffered" : (MPI_Bsend, MPI_Recv)
A FieldMapper for finite-area patch fields.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
const word extrapolatedCalculatedType
A combined zero-gradient and calculated patch field type.
virtual void evaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field after a local operation (e.g. *=)
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
calculatedFaPatchField< Type > Calculated
Type for a calculated patch.
faPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual void operator*=(const faPatchField< scalar > &)
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field.
readOption
Enumeration defining read preferences.