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>&);
209 return !patchType_.empty() && patchType_ !=
type();
311 (dynamic_cast<const pointPatchFieldType&>(ptf),
p, iF, m)
377 template<
class DerivedPatchField,
class... Args>
380 const DerivedPatchField& pf,
386 new DerivedPatchField(pf, std::forward<Args>(
args)...)
395 const word& patchFieldType,
406 const word& patchFieldType,
407 const word& actualPatchType,
441 template<
class AnyType>
466 return internalField_;
472 return internalField_;
484 template<
class Type1>
487 const UList<Type1>& internalData,
496 template<
class Type1>
497 [[nodiscard]] tmp<Field<Type1>>
500 const UList<Type1>& internalData,
506 template<
class Type1>
507 [[nodiscard]] tmp<Field<Type1>>
510 const UList<Type1>& internalData
519 template<
class Type1>
523 const Field<Type1>& pF
528 template<
class Type1>
532 const Field<Type1>& pF,
538 template<
class Type1>
542 const Field<Type1>& pF,
548 template<
class Type1>
552 const Field<Type1>& pF
561 const pointPatchFieldMapper&
614 virtual void write(Ostream&
os)
const;
619 virtual void operator=(
const pointPatchField<Type>&){}
620 virtual void operator+=(
const pointPatchField<Type>&){}
621 virtual void operator-=(
const pointPatchField<Type>&){}
622 virtual void operator*=(
const pointPatchField<scalar>&){}
623 virtual void operator/=(
const pointPatchField<scalar>&){}
625 virtual void operator=(
const Field<Type>&){}
629 virtual void operator*=(
const Field<scalar>&){}
630 virtual void operator/=(
const Field<scalar>&){}
643 virtual void operator==(
const pointPatchField<Type>&) {}
644 virtual void operator==(
const Field<Type>&) {}
648 bool operator!=(
const pointPatchField<Type>&)
const =
delete;
649 bool operator!=(
const Field<Type>&)
const =
delete;
655 friend Ostream& operator<< <Type>
658 const pointPatchField<Type>&
675 const pointPatchField<Type>&
operator+
677 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.
pTraits< Type >::cmptType cmptType
The component type for patch field.
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.
A traits class, which is primarily used for primitives and vector-space.
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.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
virtual void evaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field after a local operation (e.g. *=)
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.
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 > &)
virtual bool constraintOverride() const
True if the type does not correspond to the constraint type.
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.
virtual bool assignable() const
True if the value of the patch field is altered by assignment.
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 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.