45#ifndef Foam_pointPatchField_H
46#define Foam_pointPatchField_H
215 return !patchType_.empty() && patchType_ !=
type();
317 (
dynamic_cast<const pointPatchFieldType&
>(ptf),
p, iF, m)
396 template<
class DerivedPatchField,
class... Args>
399 const DerivedPatchField& pf,
405 new DerivedPatchField(pf, std::forward<Args>(
args)...)
414 const word& patchFieldType,
425 const word& patchFieldType,
426 const word& actualPatchType,
460 template<
class AnyType>
485 return internalField_;
491 return internalField_;
503 template<
class Type1>
515 template<
class Type1>
525 template<
class Type1>
538 template<
class Type1>
547 template<
class Type1>
557 template<
class Type1>
567 template<
class Type1>
641 virtual void operator=(
const Field<Type>&){}
645 virtual void operator*=(
const Field<scalar>&){}
646 virtual void operator/=(
const Field<scalar>&){}
665 bool operator!=(
const Field<Type>&)
const =
delete;
671 friend Ostream& operator<< <Type>
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
commsTypes
Communications types.
@ buffered
"buffered" : (MPI_Bsend, MPI_Recv)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A calculated boundary condition for pointField.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Registry of regIOobjects.
A traits class, which is primarily used for primitives and vector-space.
Mesh representing a set of points created from polyMesh.
Template invariant parts for pointPatchField.
virtual bool fixesValue() const
True if the patch field fixes a value.
const pointPatch & patch() const noexcept
Return the patch.
TypeName("pointPatchField")
Runtime type information.
virtual bool coupled() const
True if the patch field is coupled.
static const word & zeroValueType() noexcept
The type name for zeroValue patch fields.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
virtual const word & constraintType() const
The constraint type the pointPatchField implements.
const objectRegistry & db() const
The associated objectRegistry.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
void setManipulated(bool state) noexcept
Set matrix manipulated state. Currently a no-op for pointPatchField.
void setUpdated(bool state) noexcept
Set updated state.
static int disallowGenericPatchField
Debug switch to disallow the use of generic pointPatchField.
pointPatchFieldBase(const pointPatch &p)
Construct from patch.
const word & patchType() const noexcept
The optional patch type.
bool manipulatedMatrix() const noexcept
True if the matrix has already been manipulated. Currently always false for pointPatchField.
virtual bool constraintOverride() const
True if the type does not correspond to the constraint type.
virtual bool assignable() const
True if the value of the patch field is altered by assignment.
bool updated() const noexcept
True if the boundary condition has already been updated.
word & patchType() noexcept
The optional patch type.
void checkPatch(const pointPatchFieldBase &rhs) const
Check that patches are identical.
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
static const word & emptyType() noexcept
The type name for empty patch fields.
virtual ~pointPatchFieldBase()=default
Destructor.
Foam::pointPatchFieldMapper.
Abstract base class for point-mesh patch fields.
pointPatch Patch
The patch type for the patch field.
virtual void operator/=(const Field< scalar > &)
virtual void operator==(const pointPatchField< Type > &)
static autoPtr< pointPatchField< Type > > New(const word &patchFieldType, const word &actualPatchType, const pointPatch &p, const DimensionedField< Type, pointMesh > &iF)
Return a pointer to a new patchField created on freestore given.
virtual autoPtr< pointPatchField< Type > > clone(const DimensionedField< Type, pointMesh > &iF) const =0
Clone patch field with an internal field reference.
static autoPtr< pointPatchField< Type > > New(const pointPatchField< Type > &, const pointPatch &, const DimensionedField< Type, pointMesh > &, const pointPatchFieldMapper &)
Return a pointer to a new patchField created on freestore from.
Type value_type
The value_type for the patch field.
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise evaluation of the patch field (do nothing).
virtual void operator==(const Type &)
virtual void operator=(const pointPatchField< Type > &)
void patchInternalField(const UList< Type1 > &internalData, const labelUList &addressing, UList< Type1 > &pfld) const
Extract field using specified addressing.
tmp< Field< Type > > patchInternalField() const
Return field created from appropriate internal field values.
virtual void operator+=(const Field< Type > &)
virtual void operator/=(const pointPatchField< scalar > &)
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 operator=(const Type &)
virtual void operator*=(const Field< scalar > &)
static autoPtr< pointPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
calculatedPointPatchField< Type > Calculated
Type for a calculated patch.
declareRunTimeSelectionTable(autoPtr, pointPatchField, patchMapper,(const pointPatchField< Type > &ptf, const pointPatch &p, const DimensionedField< Type, pointMesh > &iF, const pointPatchFieldMapper &m),(dynamic_cast< const pointPatchFieldType & >(ptf), p, iF, m))
virtual void initEvaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Initialise the evaluation of the patch field after a local operation.
const Field< Type > & primitiveField() const noexcept
Return const-reference to the internal field values.
virtual void operator+=(const pointPatchField< Type > &)
declareRunTimeSelectionTable(autoPtr, pointPatchField, patch,(const pointPatch &p, const DimensionedField< Type, pointMesh > &iF),(p, iF))
virtual void evaluateLocal(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field after a local operation (e.g. *=).
virtual autoPtr< pointPatchField< Type > > clone() const =0
Clone patch field with its own internal field reference.
virtual void rmap(const pointPatchField< Type > &, const labelList &)
Reverse map the given pointPatchField onto this pointPatchField.
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.
void addToInternalField(Field< Type1 > &iF, const Field< Type1 > &pF, const labelUList &points) const
Given the internal field and a patch field, add selected elements of the patch field to the internal ...
pTraits< Type >::cmptType cmptType
The component type for patch field.
virtual void operator-=(const pointPatchField< Type > &)
virtual void write(Ostream &os) const
Write.
virtual void operator/=(const scalar)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
void setInInternalField(Field< Type1 > &iF, const Field< Type1 > &pF) const
Given the internal field and a patch field, set the patch field in the internal field.
virtual void operator==(const Field< Type > &)
tmp< Field< Type1 > > patchInternalField(const UList< Type1 > &internalData, const labelUList &addressing) const
Return field created from selected internal field values given internal field reference.
pointPatchField(const pointPatchField< Type > &pfld, const pointPatch &p, const DimensionedField< Type, pointMesh > &iF, const Type &value)
Copy construct onto a new patch with (unused) value.
virtual void operator*=(const pointPatchField< scalar > &)
static autoPtr< pointPatchField< Type > > NewCalculatedType(const pointPatchField< AnyType > &pf)
Return a pointer to a new calculatedPointPatchField created on.
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 operator-=(const Type &)
declareRunTimeSelectionTable(autoPtr, pointPatchField, dictionary,(const pointPatch &p, const DimensionedField< Type, pointMesh > &iF, const dictionary &dict),(p, iF, dict))
static autoPtr< pointPatchField< Type > > NewCalculatedType(const pointPatch &p)
Return a pointer to a new calculatedPointPatchField created on.
bool operator!=(const Field< Type > &) const =delete
pointPatchField(const pointPatchField< Type > &pfld, const DimensionedField< Type, pointMesh > &iF)
Copy construct with internal field reference.
static autoPtr< pointPatchField< Type > > New(const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &)
Return a pointer to a new patchField created on freestore.
bool operator!=(const Type &) const =delete
label size() const noexcept
Return the patch size.
void negate()
Negate the field inplace. Dummy placeholder for FieldField.
virtual void autoMap(const pointPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual ~pointPatchField()=default
Destructor.
const DimensionedField< scalar, pointMesh > & internalField() const noexcept
void normalise()
Normalise the field inplace. Dummy placeholder for FieldField.
virtual void operator=(const Field< Type > &)
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
pointPatchField(const pointPatchField< Type > &pfld)
Copy construct.
DimensionedField< Type, pointMesh > Internal
The internal field type associated with the patch field.
virtual void operator*=(const scalar)
tmp< Field< Type1 > > patchInternalField(const UList< Type1 > &internalData) const
Return field created from appropriate internal field values given internal field reference.
virtual void operator-=(const Field< Type > &)
virtual void operator+=(const Type &)
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
bool operator!=(const pointPatchField< Type > &) const =delete
pointPatchField(const pointPatchField< Type > &, const pointPatch &, const DimensionedField< Type, pointMesh > &, const pointPatchFieldMapper &)
Construct by mapping given patch field onto a new patch.
pointPatchField(const pointPatch &, const DimensionedField< Type, pointMesh > &)
Construct from patch and internal field.
Basic pointPatch represents a set of points from the mesh.
virtual label size() const =0
Return size.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
OBJstream os(runTime.globalPath()/outputName)
const word zeroGradientType
A zeroGradient patch field type.
const word calculatedType
A calculated patch field type.
const word emptyType
An empty patch field type.
const word zeroValueType
A zeroValue patch field type.
List< label > labelList
A List of labels.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
UList< label > labelUList
A UList of labels.
Macros for creating pointPatchField types.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
Foam::argList args(argc, argv)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.