pointPatchField< Type > Class Template Referenceabstract

Abstract base class for point-mesh patch fields. More...

Inheritance diagram for pointPatchField< Type >:

Public Types

typedef Type value_type
 
typedef pointPatch Patch
 
typedef calculatedPointPatchField< Type > Calculated
 

Public Member Functions

 TypeName ("pointPatchField")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, pointPatchField, pointPatch,(const pointPatch &p, const DimensionedField< Type, pointMesh > &iF),(p, iF))
 
 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))
 
 declareRunTimeSelectionTable (autoPtr, pointPatchField, dictionary,(const pointPatch &p, const DimensionedField< Type, pointMesh > &iF, const dictionary &dict),(p, iF, dict))
 
 pointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &)
 Construct from patch and internal field. More...
 
 pointPatchField (const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 pointPatchField (const pointPatchField< Type > &, const pointPatch &, const DimensionedField< Type, pointMesh > &, const pointPatchFieldMapper &)
 Construct by mapping given pointPatchField<Type> onto a new patch. More...
 
 pointPatchField (const pointPatchField< Type > &)=delete
 Disallow copy without setting internal field reference. More...
 
autoPtr< pointPatchField< Type > > clone () const
 Disallow clone without setting internal field reference. More...
 
 pointPatchField (const pointPatchField< Type > &, const DimensionedField< Type, pointMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual autoPtr< pointPatchField< Type > > clone (const DimensionedField< Type, pointMesh > &iF) const =0
 Construct and return a clone setting internal field reference. More...
 
virtual autoPtr< pointPatchField< Type > > clone (const pointPatch &patch, const DimensionedField< Type, pointMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual ~pointPatchField ()
 Destructor. More...
 
label size () const
 Return size. More...
 
virtual bool fixesValue () const
 Return true if this patch field fixes a value. More...
 
virtual bool coupled () const
 Return true if this patch field is coupled. More...
 
bool overridesConstraint () const
 Return true if this overrides the underlying constraint type. More...
 
const objectRegistrydb () const
 Return local objectRegistry. More...
 
const pointPatchpatch () const
 Return patch. More...
 
const DimensionedField< Type, pointMesh > & internalField () const
 Return dimensioned internal field reference. More...
 
const Field< Type > & primitiveField () const
 Return internal field reference. More...
 
bool updated () const
 Return true if the boundary condition has already been updated. More...
 
tmp< Field< Type > > patchInternalField () const
 Return field created from appropriate internal field values. More...
 
template<class Type1 >
tmp< Field< Type1 > > patchInternalField (const Field< Type1 > &iF) const
 Return field created from appropriate internal field values. More...
 
template<class Type1 >
tmp< Field< Type1 > > patchInternalField (const Field< Type1 > &iF, const labelList &meshPoints) const
 Return field created from selected internal field values. More...
 
template<class Type1 >
void addToInternalField (Field< Type1 > &iF, const Field< Type1 > &pF) const
 Given the internal field and a patch field,. More...
 
template<class Type1 >
void addToInternalField (Field< Type1 > &iF, const Field< Type1 > &pF, const labelList &points) const
 Given the internal field and a patch field,. More...
 
template<class Type1 >
void setInternalField (Field< Type1 > &iF, const Field< Type1 > &pF, const labelList &meshPoints) const
 Given the internal field and a patch field,. More...
 
template<class Type1 >
void setInternalField (Field< Type1 > &iF, const Field< Type1 > &pF) const
 Given the internal field and a patch field,. More...
 
virtual void map (const pointPatchField< Type > &, const pointPatchFieldMapper &)
 Map the given pointPatchField onto this pointPatchField. More...
 
virtual void reset (const pointPatchField< Type > &)
 Reset the pointPatchField to the given pointPatchField. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void initEvaluate (const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
 Initialise evaluation of the patch field (do nothing) More...
 
virtual void evaluate (const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
 Evaluate the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 
virtual void operator= (const pointPatchField< Type > &)
 
virtual void operator= (pointPatchField< Type > &&)
 
virtual void operator+= (const pointPatchField< Type > &)
 
virtual void operator-= (const pointPatchField< Type > &)
 
virtual void operator*= (const pointPatchField< scalar > &)
 
virtual void operator/= (const pointPatchField< scalar > &)
 
virtual void operator= (const Field< Type > &)
 
virtual void operator+= (const Field< Type > &)
 
virtual void operator-= (const Field< Type > &)
 
virtual void operator*= (const Field< scalar > &)
 
virtual void operator/= (const Field< scalar > &)
 
virtual void operator= (const Type &)
 
virtual void operator+= (const Type &)
 
virtual void operator-= (const Type &)
 
virtual void operator*= (const scalar)
 
virtual void operator/= (const scalar)
 
virtual void operator== (const pointPatchField< Type > &)
 
virtual void operator== (const Field< Type > &)
 
virtual void operator== (const Type &)
 
template<class Type2 >
Foam::autoPtr< Foam::pointPatchField< Type > > NewCalculatedType (const pointPatchField< Type2 > &pf)
 
template<class Type1 >
Foam::tmp< Foam::Field< Type1 > > patchInternalField (const Field< Type1 > &iF, const labelList &meshPoints) const
 
template<class Type1 >
Foam::tmp< Foam::Field< Type1 > > patchInternalField (const Field< Type1 > &iF) const
 

Static Public Member Functions

static autoPtr< pointPatchField< Type > > New (const word &, const pointPatch &, const DimensionedField< Type, pointMesh > &)
 Return a pointer to a new patchField created on freestore given. More...
 
static autoPtr< pointPatchField< Type > > New (const word &, const word &actualPatchType, const pointPatch &, const DimensionedField< Type, pointMesh > &)
 Return a pointer to a new patchField created on freestore given. More...
 
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. More...
 
static autoPtr< pointPatchField< Type > > New (const pointPatch &, const DimensionedField< Type, pointMesh > &, const dictionary &)
 Return a pointer to a new patchField created on freestore. More...
 
template<class Type2 >
static autoPtr< pointPatchField< Type > > NewCalculatedType (const pointPatchField< Type2 > &)
 Return a pointer to a new calculatedPointPatchField created on. More...
 
static const wordcalculatedType ()
 Return the type of the calculated form of pointPatchField. More...
 

Static Public Attributes

static int disallowGenericPointPatchField
 Debug switch to disallow the use of genericPointPatchField. More...
 

Friends

Ostreamoperator (Ostream &, const pointPatchField< Type > &)
 

Detailed Description

template<class Type>
class Foam::pointPatchField< Type >

Abstract base class for point-mesh patch fields.

The base-field does not store values as they are part of the "internal field". There are derived classes to store constraint values e.g. fixedValuePointPatchField derived from the generic valuePointPatchField which ensures the values in the "internal field" are reset to the fixed-values by applying the stored values.

Source files

Definition at line 78 of file pointPatchField.H.

Member Typedef Documentation

◆ value_type

typedef Type value_type

Definition at line 95 of file pointPatchField.H.

◆ Patch

typedef pointPatch Patch

Definition at line 96 of file pointPatchField.H.

◆ Calculated

Definition at line 97 of file pointPatchField.H.

Constructor & Destructor Documentation

◆ pointPatchField() [1/5]

pointPatchField ( const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF 
)

Construct from patch and internal field.

Definition at line 33 of file pointPatchField.C.

◆ pointPatchField() [2/5]

pointPatchField ( const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF,
const dictionary dict 
)

Construct from patch, internal field and dictionary.

Definition at line 46 of file pointPatchField.C.

◆ pointPatchField() [3/5]

pointPatchField ( const pointPatchField< Type > &  ptf,
const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF,
const pointPatchFieldMapper  
)

Construct by mapping given pointPatchField<Type> onto a new patch.

Definition at line 60 of file pointPatchField.C.

◆ pointPatchField() [4/5]

pointPatchField ( const pointPatchField< Type > &  )
delete

Disallow copy without setting internal field reference.

◆ pointPatchField() [5/5]

pointPatchField ( const pointPatchField< Type > &  ptf,
const DimensionedField< Type, pointMesh > &  iF 
)

Construct as copy setting internal field reference.

Definition at line 75 of file pointPatchField.C.

◆ ~pointPatchField()

virtual ~pointPatchField ( )
inlinevirtual

Destructor.

Definition at line 257 of file pointPatchField.H.

Member Function Documentation

◆ TypeName()

TypeName ( "pointPatchField< Type >"  )

Runtime type information.

◆ declareRunTimeSelectionTable() [1/3]

declareRunTimeSelectionTable ( autoPtr  ,
pointPatchField< Type >  ,
pointPatch  ,
(const pointPatch &p, const DimensionedField< Type, pointMesh > &iF)  ,
(p, iF)   
)

◆ declareRunTimeSelectionTable() [2/3]

declareRunTimeSelectionTable ( autoPtr  ,
pointPatchField< Type >  ,
patchMapper  ,
(const pointPatchField< Type > &ptf, const pointPatch &p, const DimensionedField< Type, pointMesh > &iF, const pointPatchFieldMapper &m)  ,
(dynamic_cast< const pointPatchFieldType & >(ptf), p, iF, m)   
)

◆ declareRunTimeSelectionTable() [3/3]

declareRunTimeSelectionTable ( autoPtr  ,
pointPatchField< Type >  ,
dictionary  ,
(const pointPatch &p, const DimensionedField< Type, pointMesh > &iF, const dictionary &dict ,
(p, iF, dict  
)

◆ clone() [1/3]

autoPtr<pointPatchField<Type> > clone ( ) const
inline

Disallow clone without setting internal field reference.

Definition at line 179 of file pointPatchField.H.

References NotImplemented.

◆ clone() [2/3]

◆ clone() [3/3]

virtual autoPtr<pointPatchField<Type> > clone ( const pointPatch patch,
const DimensionedField< Type, pointMesh > &  iF 
) const
inlinevirtual

Construct and return a clone setting internal field reference.

Reimplemented in processorPointPatchField< Type >.

Definition at line 199 of file pointPatchField.H.

References NotImplemented.

◆ New() [1/4]

Foam::autoPtr< Foam::pointPatchField< Type > > New ( const word patchFieldType,
const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF 
)
static

Return a pointer to a new patchField created on freestore given.

patch and internal field (does not set the patch field values)

Definition at line 86 of file pointPatchFieldNew.C.

References Foam::compressible::New(), p, and Foam::patchFieldType().

Here is the call graph for this function:

◆ New() [2/4]

Foam::autoPtr< Foam::pointPatchField< Type > > New ( const word patchFieldType,
const word actualPatchType,
const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF 
)
static

Return a pointer to a new patchField created on freestore given.

patch and internal field (does not set the patch field values). Allows override of constraint type

Definition at line 29 of file pointPatchFieldNew.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, InfoInFunction, IOobject::name(), Foam::nl, p, and Foam::patchFieldType().

Here is the call graph for this function:

◆ New() [3/4]

Foam::autoPtr< Foam::pointPatchField< Type > > New ( const pointPatchField< Type > &  ptf,
const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF,
const pointPatchFieldMapper pfMapper 
)
static

Return a pointer to a new patchField created on freestore from.

a given pointPatchField mapped onto a new patch

Definition at line 172 of file pointPatchFieldNew.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, InfoInFunction, IOobject::name(), Foam::nl, and p.

Here is the call graph for this function:

◆ New() [4/4]

Foam::autoPtr< Foam::pointPatchField< Type > > New ( const pointPatch p,
const DimensionedField< Type, pointMesh > &  iF,
const dictionary dict 
)
static

Return a pointer to a new patchField created on freestore.

from dictionary

Definition at line 98 of file pointPatchFieldNew.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, InfoInFunction, IOobject::name(), Foam::nl, p, and Foam::patchFieldType().

Here is the call graph for this function:

◆ NewCalculatedType() [1/2]

static autoPtr<pointPatchField<Type> > NewCalculatedType ( const pointPatchField< Type2 > &  )
static

Return a pointer to a new calculatedPointPatchField created on.

freestore without setting patchField values

◆ calculatedType()

const Foam::word & calculatedType
static

Return the type of the calculated form of pointPatchField.

Definition at line 31 of file calculatedPointPatchField.C.

◆ size()

label size ( ) const
inline

Return size.

Definition at line 276 of file pointPatchField.H.

References pointPatchField< Type >::patch(), and pointPatch::size().

Referenced by genericPointPatchField< Type >::genericPointPatchField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fixesValue()

virtual bool fixesValue ( ) const
inlinevirtual

Return true if this patch field fixes a value.

Reimplemented in fixedValuePointPatchField< Type >, and fixedValuePointPatchField< vector >.

Definition at line 282 of file pointPatchField.H.

◆ coupled()

virtual bool coupled ( ) const
inlinevirtual

Return true if this patch field is coupled.

Reimplemented in processorCyclicPointPatchField< Type >, processorPointPatchField< Type >, and coupledPointPatchField< Type >.

Definition at line 288 of file pointPatchField.H.

◆ overridesConstraint()

bool overridesConstraint ( ) const
inline

Return true if this overrides the underlying constraint type.

Definition at line 294 of file pointPatchField.H.

References Foam::type().

Here is the call graph for this function:

◆ db()

Return local objectRegistry.

Definition at line 90 of file pointPatchField.C.

Referenced by surfaceSlipDisplacementPointPatchVectorField::surfaces(), and uniformFixedValuePointPatchField< Type >::uniformFixedValuePointPatchField().

Here is the caller graph for this function:

◆ patch()

◆ internalField()

◆ primitiveField()

const Field<Type>& primitiveField ( ) const
inline

Return internal field reference.

Definition at line 328 of file pointPatchField.H.

Referenced by surfaceSlipDisplacementPointPatchVectorField::evaluate().

Here is the caller graph for this function:

◆ updated()

bool updated ( ) const
inline

◆ patchInternalField() [1/5]

Foam::tmp< Foam::Field< Type > > patchInternalField

Return field created from appropriate internal field values.

Definition at line 110 of file pointPatchField.C.

Referenced by surfaceSlipDisplacementPointPatchVectorField::evaluate(), and pointConstraints::setPatchFields().

Here is the caller graph for this function:

◆ patchInternalField() [2/5]

tmp<Field<Type1> > patchInternalField ( const Field< Type1 > &  iF) const

Return field created from appropriate internal field values.

given internal field reference

◆ patchInternalField() [3/5]

tmp<Field<Type1> > patchInternalField ( const Field< Type1 > &  iF,
const labelList meshPoints 
) const

Return field created from selected internal field values.

given internal field reference

◆ addToInternalField() [1/2]

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

Definition at line 153 of file pointPatchField.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::constant::atomic::mp, and List< T >::size().

Here is the call graph for this function:

◆ addToInternalField() [2/2]

void addToInternalField ( Field< Type1 > &  iF,
const Field< Type1 > &  pF,
const labelList points 
) const

Given the internal field and a patch field,.

add selected elements of the patch field to the internal field

Definition at line 190 of file pointPatchField.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::constant::atomic::mp, points, and List< T >::size().

Here is the call graph for this function:

◆ setInternalField() [1/2]

void setInternalField ( Field< Type1 > &  iF,
const Field< Type1 > &  pF,
const labelList meshPoints 
) const

Given the internal field and a patch field,.

set the patch field in the internal field

Definition at line 229 of file pointPatchField.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and List< T >::size().

Referenced by surfaceSlipDisplacementPointPatchVectorField::evaluate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setInternalField() [2/2]

void setInternalField ( Field< Type1 > &  iF,
const Field< Type1 > &  pF 
) const

Given the internal field and a patch field,.

set the patch field in the internal field

Definition at line 264 of file pointPatchField.C.

◆ map()

virtual void map ( const pointPatchField< Type > &  ,
const pointPatchFieldMapper  
)
inlinevirtual

◆ reset()

virtual void reset ( const pointPatchField< Type > &  )
inlinevirtual

Reset the pointPatchField to the given pointPatchField.

Used for mesh to mesh mapping

Reimplemented in valuePointPatchField< Type >, genericPointPatchField< Type >, and timeVaryingMappedFixedValuePointPatchField< Type >.

Definition at line 410 of file pointPatchField.H.

◆ updateCoeffs()

◆ initEvaluate()

virtual void initEvaluate ( const Pstream::commsTypes  commsType = Pstream::commsTypes::blocking)
inlinevirtual

Initialise evaluation of the patch field (do nothing)

Definition at line 424 of file pointPatchField.H.

◆ evaluate()

◆ write()

◆ operator=() [1/4]

virtual void operator= ( const pointPatchField< Type > &  )
inlinevirtual

Reimplemented in valuePointPatchField< Type >.

Definition at line 447 of file pointPatchField.H.

◆ operator=() [2/4]

virtual void operator= ( pointPatchField< Type > &&  )
inlinevirtual

Definition at line 448 of file pointPatchField.H.

◆ operator+=() [1/3]

virtual void operator+= ( const pointPatchField< Type > &  )
inlinevirtual

Definition at line 449 of file pointPatchField.H.

◆ operator-=() [1/3]

virtual void operator-= ( const pointPatchField< Type > &  )
inlinevirtual

Definition at line 450 of file pointPatchField.H.

◆ operator*=() [1/3]

virtual void operator*= ( const pointPatchField< scalar > &  )
inlinevirtual

Definition at line 451 of file pointPatchField.H.

◆ operator/=() [1/3]

virtual void operator/= ( const pointPatchField< scalar > &  )
inlinevirtual

Definition at line 452 of file pointPatchField.H.

◆ operator=() [3/4]

virtual void operator= ( const Field< Type > &  )
inlinevirtual

Reimplemented in valuePointPatchField< Type >, and fixedValuePointPatchField< Type >.

Definition at line 454 of file pointPatchField.H.

◆ operator+=() [2/3]

virtual void operator+= ( const Field< Type > &  )
inlinevirtual

Definition at line 455 of file pointPatchField.H.

◆ operator-=() [2/3]

virtual void operator-= ( const Field< Type > &  )
inlinevirtual

Definition at line 456 of file pointPatchField.H.

◆ operator*=() [2/3]

virtual void operator*= ( const Field< scalar > &  )
inlinevirtual

Definition at line 458 of file pointPatchField.H.

◆ operator/=() [2/3]

virtual void operator/= ( const Field< scalar > &  )
inlinevirtual

Definition at line 459 of file pointPatchField.H.

◆ operator=() [4/4]

virtual void operator= ( const Type &  )
inlinevirtual

Reimplemented in valuePointPatchField< Type >, and fixedValuePointPatchField< Type >.

Definition at line 461 of file pointPatchField.H.

◆ operator+=() [3/3]

virtual void operator+= ( const Type &  )
inlinevirtual

Definition at line 462 of file pointPatchField.H.

◆ operator-=() [3/3]

virtual void operator-= ( const Type &  )
inlinevirtual

Definition at line 463 of file pointPatchField.H.

◆ operator*=() [3/3]

virtual void operator*= ( const  scalar)
inlinevirtual

Definition at line 464 of file pointPatchField.H.

◆ operator/=() [3/3]

virtual void operator/= ( const  scalar)
inlinevirtual

Definition at line 465 of file pointPatchField.H.

◆ operator==() [1/3]

virtual void operator== ( const pointPatchField< Type > &  )
inlinevirtual

Reimplemented in valuePointPatchField< Type >.

Definition at line 472 of file pointPatchField.H.

◆ operator==() [2/3]

virtual void operator== ( const Field< Type > &  )
inlinevirtual

Reimplemented in valuePointPatchField< Type >.

Definition at line 473 of file pointPatchField.H.

◆ operator==() [3/3]

virtual void operator== ( const Type &  )
inlinevirtual

Reimplemented in valuePointPatchField< Type >.

Definition at line 474 of file pointPatchField.H.

◆ NewCalculatedType() [2/2]

Foam::autoPtr<Foam::pointPatchField<Type> > NewCalculatedType ( const pointPatchField< Type2 > &  pf)

Definition at line 89 of file calculatedPointPatchField.C.

References Field< Type >::null(), and pointPatchField< Type >::patch().

Here is the call graph for this function:

◆ patchInternalField() [4/5]

Foam::tmp<Foam::Field<Type1> > patchInternalField ( const Field< Type1 > &  iF,
const labelList meshPoints 
) const

Definition at line 119 of file pointPatchField.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and List< T >::size().

Here is the call graph for this function:

◆ patchInternalField() [5/5]

Foam::tmp<Foam::Field<Type1> > patchInternalField ( const Field< Type1 > &  iF) const

Definition at line 142 of file pointPatchField.C.

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream ,
const pointPatchField< Type > &   
)
friend

Member Data Documentation

◆ disallowGenericPointPatchField

int disallowGenericPointPatchField
static

Debug switch to disallow the use of genericPointPatchField.

Definition at line 104 of file pointPatchField.H.


The documentation for this class was generated from the following files: