45 #ifndef Foam_pointPatchField_H 46 #define Foam_pointPatchField_H 61 class pointPatchFieldMapper;
64 template<
class Type>
class pointPatchField;
65 template<
class Type>
class calculatedPointPatchField;
68 Ostream& operator<<(Ostream&, const pointPatchField<Type>&);
295 (dynamic_cast<const pointPatchFieldType&>(ptf),
p, iF, m)
361 template<
class DerivedPatchField,
class... Args>
364 const DerivedPatchField& pf,
370 new DerivedPatchField(pf, std::forward<Args>(
args)...)
379 const word& patchFieldType,
390 const word& patchFieldType,
391 const word& actualPatchType,
425 template<
class AnyType>
450 return internalField_;
456 return internalField_;
468 template<
class Type1>
471 const UList<Type1>& internalData,
480 template<
class Type1>
483 const UList<Type1>& internalData,
489 template<
class Type1>
492 const UList<Type1>& internalData
501 template<
class Type1>
505 const Field<Type1>& pF
510 template<
class Type1>
514 const Field<Type1>& pF,
520 template<
class Type1>
524 const Field<Type1>& pF,
530 template<
class Type1>
534 const Field<Type1>& pF
596 virtual void write(Ostream&
os)
const;
601 virtual void operator=(
const pointPatchField<Type>&){}
602 virtual void operator+=(
const pointPatchField<Type>&){}
603 virtual void operator-=(
const pointPatchField<Type>&){}
604 virtual void operator*=(
const pointPatchField<scalar>&){}
605 virtual void operator/=(
const pointPatchField<scalar>&){}
607 virtual void operator=(
const Field<Type>&){}
611 virtual void operator*=(
const Field<scalar>&){}
612 virtual void operator/=(
const Field<scalar>&){}
625 virtual void operator==(
const pointPatchField<Type>&) {}
626 virtual void operator==(
const Field<Type>&) {}
630 bool operator!=(
const pointPatchField<Type>&)
const =
delete;
631 bool operator!=(
const Field<Type>&)
const =
delete;
637 friend Ostream& operator<< <Type>
640 const pointPatchField<Type>&
657 const pointPatchField<Type>&
operator+
659 const pointPatchField<Type>& ppf,
void normalise()
Normalise the field inplace. Dummy placeholder for FieldField.
static autoPtr< pointPatchField< Type > > NewCalculatedType(const pointPatch &p)
Return a pointer to a new calculatedPointPatchField created on.
static int disallowGenericPatchField
Debug switch to disallow the use of generic pointPatchField.
Template invariant parts for pointPatchField.
virtual ~pointPatchField()=default
Destructor.
DimensionedField< Type, pointMesh > Internal
The internal field type associated with the patch field.
const word zeroGradientType
A zeroGradient patch field type.
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
const pointPatch & patch() const noexcept
Return the patch.
commsTypes
Communications types.
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 write(Ostream &os) const
Write.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
virtual void operator==(const pointPatchField< Type > &)
static const word & emptyType() noexcept
The type name for empty patch fields.
A calculated boundary condition for pointField.
UList< label > labelUList
A UList of labels.
Abstract base class for point-mesh patch fields.
const Field< Type > & primitiveField() const noexcept
Return const-reference to the internal field values.
const word calculatedType
A calculated patch field type.
virtual void evaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field after a local operation (e.g. *=)
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.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
Macros for creating pointPatchField types.
virtual const word & constraintType() const
The constraint type the pointPatchField implements.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual bool fixesValue() const
True if the patch field fixes a value.
static const word null
An empty word.
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise evaluation of the patch field (do nothing)
static autoPtr< pointPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
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
Clone patch field with its own internal field reference.
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.
virtual void operator=(const pointPatchField< Type > &)
const word emptyType
An empty patch field type.
OBJstream os(runTime.globalPath()/outputName)
virtual void initEvaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field after a local.
pointPatchFieldBase(const pointPatch &p)
Construct from patch.
void setInInternalField(Field< Type1 > &iF, const Field< Type1 > &pF, const labelUList &meshPoints) const
Given the internal field and a patch field, set the patch field in the internal field.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
calculatedPointPatchField< Type > Calculated
Type for a calculated patch.
void setManipulated(bool state) noexcept
Set matrix manipulated state. Currently a no-op for pointPatchField.
Type value_type
The value_type for the patch field.
Basic pointPatch represents a set of points from the mesh.
void addToInternalField(Field< Type1 > &iF, const Field< Type1 > &pF) const
Given the internal field and a patch field, add the patch field to the internal 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...
Registry of regIOobjects.
"buffered" : (MPI_Bsend, MPI_Recv)
bool operator!=(const pointPatchField< Type > &) const =delete
virtual void operator+=(const pointPatchField< Type > &)
virtual bool coupled() const
True if the patch field is coupled.
bool manipulatedMatrix() const noexcept
True if the matrix has already been manipulated. Currently ignored (always false) for pointPatchField...
Foam::argList args(argc, argv)
virtual void readDict(const dictionary &dict)
Read dictionary entries.
const DimensionedField< Type, pointMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
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.