45 #ifndef Foam_pointPatchField_H 46 #define Foam_pointPatchField_H 60 class pointPatchFieldMapper;
63 template<
class Type>
class pointPatchField;
64 template<
class Type>
class calculatedPointPatchField;
67 Ostream& operator<<(Ostream&, const pointPatchField<Type>&);
235 (dynamic_cast<const pointPatchFieldType&>(ptf),
p, iF, m)
305 const word& patchFieldType,
316 const word& patchFieldType,
317 const word& actualPatchType,
343 template<
class Type2>
397 return internalField_;
403 return internalField_;
411 template<
class Type1>
414 const Field<Type1>& iF
419 template<
class Type1>
422 const Field<Type1>& iF,
428 template<
class Type1>
432 const Field<Type1>& pF
437 template<
class Type1>
441 const Field<Type1>& pF,
447 template<
class Type1>
457 template<
class Type1>
514 virtual void operator+=(
const pointPatchField<Type>&){}
515 virtual void operator-=(
const pointPatchField<Type>&){}
516 virtual void operator*=(
const pointPatchField<scalar>&){}
517 virtual void operator/=(
const pointPatchField<scalar>&){}
519 virtual void operator=(
const Field<Type>&){}
523 virtual void operator*=(
const Field<scalar>&){}
524 virtual void operator/=(
const Field<scalar>&){}
537 virtual void operator==(
const pointPatchField<Type>&){}
544 friend Ostream& operator<< <Type>
547 const pointPatchField<Type>&
564 const pointPatchField<Type>&
operator+
566 const pointPatchField<Type>& ppf,
592 #define addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) \ 593 addToRunTimeSelectionTable \ 596 typePatchTypeField, \ 599 addToRunTimeSelectionTable \ 602 typePatchTypeField, \ 605 addToRunTimeSelectionTable \ 608 typePatchTypeField, \ 614 #define makePointPatchTypeField(PatchTypeField,typePatchTypeField) \ 615 defineTypeNameAndDebug(typePatchTypeField, 0); \ 616 addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) 620 #define makeTemplatePointPatchTypeField(PatchTypeField, typePatchTypeField) \ 621 defineNamedTemplateTypeNameAndDebug(typePatchTypeField, 0); \ 622 addToPointPatchFieldRunTimeSelection(PatchTypeField, typePatchTypeField) 625 #define makePointPatchFields(type) \ 626 makeTemplatePointPatchTypeField \ 628 pointPatchScalarField, \ 629 type##PointPatchScalarField \ 631 makeTemplatePointPatchTypeField \ 633 pointPatchVectorField, \ 634 type##PointPatchVectorField \ 636 makeTemplatePointPatchTypeField \ 638 pointPatchSphericalTensorField, \ 639 type##PointPatchSphericalTensorField \ 641 makeTemplatePointPatchTypeField \ 643 pointPatchSymmTensorField, \ 644 type##PointPatchSymmTensorField \ 646 makeTemplatePointPatchTypeField \ 648 pointPatchTensorField, \ 649 type##PointPatchTensorField \ 653 #define makePointPatchFieldsTypeName(type) \ 654 defineNamedTemplateTypeNameAndDebug(type##PointPatchScalarField, 0); \ 655 defineNamedTemplateTypeNameAndDebug(type##PointPatchVectorField, 0); \ 656 defineNamedTemplateTypeNameAndDebug \ 658 type##PointPatchSphericalTensorField, 0 \ 660 defineNamedTemplateTypeNameAndDebug(type##PointPatchSymmTensorField, 0); \ 661 defineNamedTemplateTypeNameAndDebug(type##PointPatchTensorField, 0) 664 #define makePointPatchFieldTypedefs(type) \ 665 typedef type##PointPatchField<scalar> type##PointPatchScalarField; \ 666 typedef type##PointPatchField<vector> type##PointPatchVectorField; \ 667 typedef type##PointPatchField<sphericalTensor> \ 668 type##PointPatchSphericalTensorField; \ 669 typedef type##PointPatchField<symmTensor> type##PointPatchSymmTensorField;\ 670 typedef type##PointPatchField<tensor> type##PointPatchTensorField; virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
void normalise()
Normalise the field inplace. Dummy placeholder for FieldField.
static int disallowGenericPatchField
Debug switch to disallow the use of generic pointPatchField.
Template invariant parts for pointPatchField.
virtual ~pointPatchField()=default
Destructor.
"blocking" : (MPI_Bsend, MPI_Recv)
DimensionedField< Type, pointMesh > Internal
The internal field type associated with the patch field.
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
const pointPatch & patch() const noexcept
Return the patch.
commsTypes
Types of communications.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const word & patchType() const noexcept
The optional patch type.
void setUpdated(bool state) noexcept
Set updated state.
declareRunTimeSelectionTable(autoPtr, pointPatchField, patch,(const pointPatch &p, const DimensionedField< Type, pointMesh > &iF),(p, iF))
virtual void operator-=(const pointPatchField< Type > &)
Foam::pointPatchFieldMapper.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const pointPatchField< Type > &, const labelList &)
Reverse map the given pointPatchField onto this pointPatchField.
virtual void operator==(const pointPatchField< Type > &)
A calculated boundary condition for pointField.
Abstract base class for point-mesh patch fields.
const Field< Type > & primitiveField() const noexcept
Return internal field reference.
static const word & calculatedType()
The type name for calculated patch fields.
static autoPtr< pointPatchField< Type > > NewCalculatedType(const pointPatchField< Type2 > &)
Return a pointer to a new calculatedPointPatchField created on.
Generic templated field type.
A class for handling words, derived from Foam::string.
static autoPtr< pointPatchField< Type > > New(const word &patchFieldType, const pointPatch &p, const DimensionedField< Type, pointMesh > &iF)
Return a pointer to a new patchField created on freestore given.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
static const word null
An empty word.
void setInInternalField(Field< Type1 > &iF, const Field< Type1 > &pF, const labelList &meshPoints) const
Given the internal field and a patch field,.
bool updated() const noexcept
True if the boundary condition has already been updated.
const objectRegistry & db() const
The associated objectRegistry.
virtual autoPtr< pointPatchField< Type > > clone() const =0
Construct and return a clone.
virtual const word & constraintType() const
The constraint type this pointPatchField implements.
virtual void operator*=(const pointPatchField< scalar > &)
tmp< Field< Type > > patchInternalField() const
Return field created from appropriate internal field values.
pointPatch Patch
The patch type for the patch field.
virtual ~pointPatchFieldBase()=default
Destructor.
TypeName("pointPatchField")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual void operator=(const pointPatchField< Type > &)
pointPatchFieldBase(const pointPatch &p)
Construct from patch.
calculatedPointPatchField< Type > Calculated
Type for a calculated patch.
virtual void write(Ostream &) const
Write.
Type value_type
The Field value_type.
Basic pointPatch represents a set of points from the mesh.
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Initialise evaluation of the patch field (do nothing)
void addToInternalField(Field< Type1 > &iF, const Field< Type1 > &pF) const
Given the internal field and a patch field,.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual void operator/=(const pointPatchField< scalar > &)
label size() const
Return the patch size.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
List< label > labelList
A List of labels.
Registry of regIOobjects.
virtual void operator+=(const pointPatchField< Type > &)
virtual bool coupled() const
True if this patch field is coupled.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
const DimensionedField< Type, pointMesh > & internalField() const noexcept
Return dimensioned internal field reference.
static const word & zeroGradientType()
The type name for zeroGradient patch fields.
virtual label size() const =0
Return size.
void negate()
Negate the field inplace. Dummy placeholder for FieldField.
void checkPatch(const pointPatchFieldBase &rhs) const
Check that patches are identical.
virtual bool fixesValue() const
True if this patch field fixes a value.