49 #ifndef Foam_faPatchField_H 50 #define Foam_faPatchField_H 63 class faPatchFieldMapper;
66 template<
class Type>
class faPatchField;
67 template<
class Type>
class calculatedFaPatchField;
70 Ostream& operator<<(Ostream&, const faPatchField<Type>&);
236 (dynamic_cast<const faPatchFieldType&>(ptf),
p, iF, m)
276 const bool valueRequired=
true 319 static tmp<faPatchField<Type>>
New 321 const word& patchFieldType,
322 const word& actualPatchType,
324 const DimensionedField<Type, areaMesh>&
330 static tmp<faPatchField<Type>>
New 332 const word& patchFieldType,
334 const DimensionedField<Type, areaMesh>&
339 static tmp<faPatchField<Type>>
New 341 const faPatchField<Type>&,
343 const DimensionedField<Type, areaMesh>&,
344 const faPatchFieldMapper&
349 static tmp<faPatchField<Type>>
New 352 const DimensionedField<Type, areaMesh>&,
358 template<
class Type2>
398 const objectRegistry&
db()
const;
401 const DimensionedField<Type, areaMesh>&
404 return internalField_;
410 return internalField_;
419 const faPatchFieldMapper&
425 const faPatchField<Type>&,
433 virtual tmp<Field<Type>>
snGrad()
const;
567 #define addToFaPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \ 569 addToRunTimeSelectionTable \ 571 PatchTypeField, typePatchTypeField, patch \ 574 addToRunTimeSelectionTable \ 577 typePatchTypeField, \ 581 addToRunTimeSelectionTable \ 583 PatchTypeField, typePatchTypeField, dictionary \ 587 #define makeFaPatchTypeFieldTypeName(typePatchTypeField) \ 589 defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); 592 #define makeFaPatchFieldsTypeName(typePatchField) \ 594 makeFaPatchTypeFieldTypeName(typePatchField##FaPatchScalarField); \ 595 makeFaPatchTypeFieldTypeName(typePatchField##FaPatchVectorField); \ 596 makeFaPatchTypeFieldTypeName(typePatchField##FaPatchSphericalTensorField); \ 597 makeFaPatchTypeFieldTypeName(typePatchField##FaPatchSymmTensorField); \ 598 makeFaPatchTypeFieldTypeName(typePatchField##FaPatchTensorField); 601 #define makeFaPatchTypeField(PatchTypeField, typePatchTypeField) \ 603 defineTypeNameAndDebug(typePatchTypeField, 0); \ 605 addToFaPatchFieldRunTimeSelection \ 607 PatchTypeField, typePatchTypeField \ 610 #define makeTemplateFaPatchTypeField(PatchTypeField, typePatchTypeField) \ 612 defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \ 614 addToFaPatchFieldRunTimeSelection \ 616 PatchTypeField, typePatchTypeField \ 620 #define makeFaPatchFields(type) \ 622 makeTemplateFaPatchTypeField(faPatchScalarField, type##FaPatchScalarField); \ 623 makeTemplateFaPatchTypeField(faPatchVectorField, type##FaPatchVectorField); \ 624 makeTemplateFaPatchTypeField \ 626 faPatchSphericalTensorField, \ 627 type##FaPatchSphericalTensorField \ 629 makeTemplateFaPatchTypeField \ 631 faPatchSymmTensorField, \ 632 type##FaPatchSymmTensorField \ 634 makeTemplateFaPatchTypeField \ 636 faPatchTensorField, \ 637 type##FaPatchTensorField \ 641 #define makeFaPatchTypeFieldTypedefs(type) \ 643 typedef type##FaPatchField<scalar> type##FaPatchScalarField; \ 644 typedef type##FaPatchField<vector> type##FaPatchVectorField; \ 645 typedef type##FaPatchField<sphericalTensor> \ 646 type##FaPatchSphericalTensorField; \ 647 typedef type##FaPatchField<symmTensor> type##FaPatchSymmTensorField; \ 648 typedef type##FaPatchField<tensor> type##FaPatchTensorField; 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
The associated objectRegistry.
virtual bool fixesValue() const
True if this patch field fixes a value.
void check(const faPatchField< Type > &) const
Check faPatchField<Type> against given faPatchField<Type>
commsTypes
Types of communications.
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 dimensioned internal field reference.
Template invariant parts for faPatchField.
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.
static const word & calculatedType()
The type name for calculated patch fields.
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.
virtual void write(Ostream &) const
Write.
void setUpdated(bool state) noexcept
Set updated state.
virtual void operator/=(const faPatchField< scalar > &)
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 internal field reference.
const word & patchType() const noexcept
The optional patch type.
virtual bool coupled() const
True if this patch field is coupled.
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.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
void checkPatch(const faPatchFieldBase &rhs) const
Check that patches are identical.
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 void operator==(const faPatchField< Type > &)
static tmp< faPatchField< Type > > NewCalculatedType(const faPatchField< Type2 > &)
Return a pointer to a new calculatedFaPatchField created on freestore without setting patchField valu...
const objectRegistry & db() const
Return local objectRegistry.
virtual ~faPatchFieldBase()=default
Destructor.
static const word & zeroGradientType()
The type name for zeroGradient patch fields.
List< label > labelList
A List of labels.
A class for managing temporary objects.
A FieldMapper for finite-area patch fields.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
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 > &)