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>&);
306 (dynamic_cast<const faPatchFieldType&>(ptf),
p, iF, m)
407 static tmp<faPatchField<Type>>
New 409 const word& patchFieldType,
410 const word& actualPatchType,
412 const DimensionedField<Type, areaMesh>&
418 static tmp<faPatchField<Type>>
New 420 const word& patchFieldType,
422 const DimensionedField<Type, areaMesh>&
427 static tmp<faPatchField<Type>>
New 429 const faPatchField<Type>&,
431 const DimensionedField<Type, areaMesh>&,
432 const faPatchFieldMapper&
437 static tmp<faPatchField<Type>>
New 440 const DimensionedField<Type, areaMesh>&,
446 template<
class AnyType>
449 const faPatchField<AnyType>& pf
464 return internalField_;
470 return internalField_;
549 const tmp<Field<scalar>>&
560 const tmp<Field<scalar>>&
587 virtual void write(Ostream&
os)
const;
590 void check(
const faPatchField<Type>&)
const;
595 virtual void operator=(
const UList<Type>&);
597 virtual void operator=(
const faPatchField<Type>&);
598 virtual void operator+=(
const faPatchField<Type>&);
599 virtual void operator-=(
const faPatchField<Type>&);
600 virtual void operator*=(
const faPatchField<scalar>&);
601 virtual void operator/=(
const faPatchField<scalar>&);
606 virtual void operator*=(
const Field<scalar>&);
607 virtual void operator/=(
const Field<scalar>&);
618 virtual void operator==(
const faPatchField<Type>&);
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 void initEvaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Initialise the evaluation of the patch field after a local.
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 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.
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...
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 evaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field after a local operation (e.g. *=)
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.