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>&);
316 (dynamic_cast<const faPatchFieldType&>(ptf),
p, iF, m)
421 template<
class DerivedPatchField>
422 static tmp<faPatchField<Type>>
Clone 424 const DerivedPatchField& pf
427 return tmp<faPatchField<Type>>
429 new DerivedPatchField(pf)
434 template<
class DerivedPatchField>
435 static tmp<faPatchField<Type>>
Clone 437 const DerivedPatchField& pf,
438 const DimensionedField<Type, areaMesh>& iF
441 return tmp<faPatchField<Type>>
443 new DerivedPatchField(pf, iF)
450 static tmp<faPatchField<Type>>
New 452 const word& patchFieldType,
453 const word& actualPatchType,
455 const DimensionedField<Type, areaMesh>&
461 static tmp<faPatchField<Type>>
New 463 const word& patchFieldType,
465 const DimensionedField<Type, areaMesh>&
470 static tmp<faPatchField<Type>>
New 472 const faPatchField<Type>&,
474 const DimensionedField<Type, areaMesh>&,
475 const faPatchFieldMapper&
480 static tmp<faPatchField<Type>>
New 496 template<
class AnyType>
514 return internalField_;
520 return internalField_;
599 const tmp<Field<scalar>>&
610 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.
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 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.
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...
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.