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>&);
317 (dynamic_cast<const faPatchFieldType&>(ptf),
p, iF, m)
418 static tmp<faPatchField<Type>>
New 420 const word& patchFieldType,
421 const word& actualPatchType,
423 const DimensionedField<Type, areaMesh>&
429 static tmp<faPatchField<Type>>
New 431 const word& patchFieldType,
433 const DimensionedField<Type, areaMesh>&
438 static tmp<faPatchField<Type>>
New 440 const faPatchField<Type>&,
442 const DimensionedField<Type, areaMesh>&,
443 const faPatchFieldMapper&
448 static tmp<faPatchField<Type>>
New 451 const DimensionedField<Type, areaMesh>&,
457 template<
class AnyType>
460 const faPatchField<AnyType>& pf
475 return internalField_;
481 return internalField_;
543 const tmp<Field<scalar>>&
554 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 > &)
"blocking" : (MPI_Bsend, MPI_Recv)
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 tmp< faPatchField< Type > > clone() const
Construct and return a clone.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
declareRunTimeSelectionTable(tmp, faPatchField, patch,(const faPatch &p, const DimensionedField< Type, areaMesh > &iF),(p, iF))
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...
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Initialise the evaluation of the patch field.
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.
bool manipulatedMatrix() const noexcept
True if the matrix has already been manipulated. Currently ignored (always false) for faPatchField...
Macros for creating faPatchField types.
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...
const Field< Type > & primitiveField() const noexcept
Return const-reference to the internal field values.
const word & patchType() const noexcept
The optional patch type.
static tmp< faPatchField< Type > > NewCalculatedType(const faPatchField< AnyType > &pf)
Return a pointer to a new calculatedFaPatchField created on freestore without setting patchField valu...
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...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
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 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 void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field, sets updated() to false.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchFi...
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.
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.
calculatedFaPatchField< Type > Calculated
Type for a calculated patch.
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
faPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual void operator*=(const faPatchField< scalar > &)
readOption
Enumeration defining read preferences.