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>&);
289 (dynamic_cast<const pointPatchFieldType&>(ptf),
p, iF, m)
359 const word& patchFieldType,
370 const word& patchFieldType,
371 const word& actualPatchType,
397 template<
class Type2>
422 return internalField_;
428 return internalField_;
439 template<
class Type1>
442 const Field<Type1>& iF
447 template<
class Type1>
450 const Field<Type1>& iF,
456 template<
class Type1>
460 const Field<Type1>& pF
465 template<
class Type1>
469 const Field<Type1>& pF,
475 template<
class Type1>
479 const Field<Type1>& pF,
485 template<
class Type1>
489 const Field<Type1>& pF
498 const pointPatchFieldMapper&
505 const pointPatchField<Type>&,
551 virtual void write(Ostream&
os)
const;
556 virtual void operator=(
const pointPatchField<Type>&){}
557 virtual void operator+=(
const pointPatchField<Type>&){}
558 virtual void operator-=(
const pointPatchField<Type>&){}
559 virtual void operator*=(
const pointPatchField<scalar>&){}
560 virtual void operator/=(
const pointPatchField<scalar>&){}
562 virtual void operator=(
const Field<Type>&){}
566 virtual void operator*=(
const Field<scalar>&){}
567 virtual void operator/=(
const Field<scalar>&){}
580 virtual void operator==(
const pointPatchField<Type>&) {}
581 virtual void operator==(
const Field<Type>&) {}
585 bool operator!=(
const pointPatchField<Type>&)
const =
delete;
586 bool operator!=(
const Field<Type>&)
const =
delete;
592 friend Ostream& operator<< <Type>
595 const pointPatchField<Type>&
612 const pointPatchField<Type>&
operator+
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field, sets updated() to false.
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.
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 initEvaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Initialise the evaluation of the patch field after a local.
static autoPtr< pointPatchField< Type > > NewCalculatedType(const pointPatchField< Type2 > &)
Return a pointer to a new calculatedPointPatchField created on.
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 void evaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field after a local operation (e.g. *=)
virtual bool fixesValue() const
True if the patch field fixes a value.
static const word null
An empty word.
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 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)
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.
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 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, 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...
List< label > labelList
A List of labels.
Registry of regIOobjects.
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...
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.