faPatchField< Type > Class Template Reference

faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes covering all possible ways in which they might be used. The first level of derivation is to basic patchFields which cover zero-gradient, fixed-gradient, fixed-value and mixed conditions. The next level of derivation covers all the specialised typed with specific evaluation procedures, particularly with respect to specific fields. More...

Inheritance diagram for faPatchField< Type >:
[legend]

Public Types

typedef faPatch Patch
 
typedef calculatedFaPatchField< Type > Calculated
 

Public Member Functions

 TypeName ("faPatchField")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (tmp, faPatchField, patch,(const faPatch &p, const DimensionedField< Type, areaMesh > &iF),(p, iF))
 
 declareRunTimeSelectionTable (tmp, faPatchField, patchMapper,(const faPatchField< Type > &ptf, const faPatch &p, const DimensionedField< Type, areaMesh > &iF, const faPatchFieldMapper &m),(dynamic_cast< const faPatchFieldType & >(ptf), p, iF, m))
 
 declareRunTimeSelectionTable (tmp, faPatchField, dictionary,(const faPatch &p, const DimensionedField< Type, areaMesh > &iF, const dictionary &dict),(p, iF, dict))
 
 faPatchField (const faPatch &, const DimensionedField< Type, areaMesh > &)
 Construct from patch and internal field. More...
 
 faPatchField (const faPatch &, const DimensionedField< Type, areaMesh > &, const Field< Type > &)
 Construct from patch and internal field and patch field. More...
 
 faPatchField (const faPatch &, const DimensionedField< Type, areaMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 faPatchField (const faPatchField< Type > &, const faPatch &, const DimensionedField< Type, areaMesh > &, const faPatchFieldMapper &)
 Construct by mapping the given faPatchField onto a new patch. More...
 
 faPatchField (const faPatchField< Type > &)
 Construct as copy. More...
 
virtual tmp< faPatchField< Type > > clone () const
 Construct and return a clone. More...
 
 faPatchField (const faPatchField< Type > &, const DimensionedField< Type, areaMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< faPatchField< Type > > clone (const DimensionedField< Type, areaMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual ~faPatchField ()=default
 Destructor. More...
 
const objectRegistrydb () const
 Return local objectRegistry. More...
 
const faPatchpatch () const
 Return patch. More...
 
const DimensionedField< Type, areaMesh > & internalField () const
 Return dimensioned internal field reference. More...
 
const Field< Type > & primitiveField () const
 Return internal field reference. More...
 
const wordpatchType () const
 Optional patch type. More...
 
wordpatchType ()
 Optional patch type. 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 updated () const
 Return true if the boundary condition has already been updated. More...
 
virtual void autoMap (const faPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const faPatchField< Type > &, const labelList &)
 Reverse map the given faPatchField onto this faPatchField. More...
 
virtual tmp< Field< Type > > snGrad () const
 Return patch-normal gradient. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual tmp< Field< Type > > patchInternalField () const
 Return internal field next to patch as patch field. More...
 
virtual tmp< Field< Type > > patchNeighbourField () const
 Return patchField on the opposite patch of a coupled patch. More...
 
virtual void initEvaluate (const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
 Initialise the evaluation of the patch field. More...
 
virtual void evaluate (const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
 Evaluate the patch field, sets Updated to false. More...
 
virtual tmp< Field< Type > > valueInternalCoeffs (const tmp< Field< scalar >> &) const
 
virtual tmp< Field< Type > > valueBoundaryCoeffs (const tmp< Field< scalar >> &) const
 
virtual tmp< Field< Type > > gradientInternalCoeffs () const
 
virtual tmp< Field< Type > > gradientBoundaryCoeffs () const
 
virtual void write (Ostream &) const
 Write. More...
 
void check (const faPatchField< Type > &) const
 Check faPatchField<Type> against given faPatchField<Type> More...
 
virtual void operator= (const UList< Type > &)
 
virtual void operator= (const faPatchField< Type > &)
 
virtual void operator+= (const faPatchField< Type > &)
 
virtual void operator-= (const faPatchField< Type > &)
 
virtual void operator*= (const faPatchField< scalar > &)
 
virtual void operator/= (const faPatchField< scalar > &)
 
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 faPatchField< Type > &)
 
virtual void operator== (const Field< Type > &)
 
virtual void operator== (const Type &)
 
template<class Type2 >
Foam::tmp< Foam::faPatchField< Type > > NewCalculatedType (const faPatchField< Type2 > &pf)
 

Static Public Member Functions

static tmp< faPatchField< Type > > New (const word &patchFieldType, const word &actualPatchType, const faPatch &, const DimensionedField< Type, areaMesh > &)
 
static tmp< faPatchField< Type > > New (const word &patchFieldType, const faPatch &, const DimensionedField< Type, areaMesh > &)
 
static tmp< faPatchField< Type > > New (const faPatchField< Type > &, const faPatch &, const DimensionedField< Type, areaMesh > &, const faPatchFieldMapper &)
 
static tmp< faPatchField< Type > > New (const faPatch &, const DimensionedField< Type, areaMesh > &, const dictionary &)
 
template<class Type2 >
static tmp< faPatchField< Type > > NewCalculatedType (const faPatchField< Type2 > &)
 
static const wordcalculatedType ()
 Return the type of the calculated for of faPatchField. More...
 

Static Public Attributes

static int disallowGenericFaPatchField
 Debug switch to disallow the use of. More...
 

Friends

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

Detailed Description

template<class Type>
class Foam::faPatchField< Type >

faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes covering all possible ways in which they might be used. The first level of derivation is to basic patchFields which cover zero-gradient, fixed-gradient, fixed-value and mixed conditions. The next level of derivation covers all the specialised typed with specific evaluation procedures, particularly with respect to specific fields.

Author Zeljko Tukovic, FMENA Hrvoje Jasak, Wikki Ltd.

Source files

Definition at line 50 of file areaFieldsFwd.H.

Member Typedef Documentation

◆ Patch

typedef faPatch Patch

Definition at line 103 of file faPatchField.H.

◆ Calculated

Definition at line 104 of file faPatchField.H.

Constructor & Destructor Documentation

◆ faPatchField() [1/6]

faPatchField ( const faPatch p,
const DimensionedField< Type, areaMesh > &  iF 
)

Construct from patch and internal field.

Definition at line 36 of file faPatchField.C.

◆ faPatchField() [2/6]

faPatchField ( const faPatch p,
const DimensionedField< Type, areaMesh > &  iF,
const Field< Type > &  f 
)

Construct from patch and internal field and patch field.

Definition at line 51 of file faPatchField.C.

◆ faPatchField() [3/6]

faPatchField ( const faPatch p,
const DimensionedField< Type, areaMesh > &  iF,
const dictionary dict 
)

Construct from patch, internal field and dictionary.

Definition at line 84 of file faPatchField.C.

References dict, and p.

◆ faPatchField() [4/6]

faPatchField ( const faPatchField< Type > &  ptf,
const faPatch p,
const DimensionedField< Type, areaMesh > &  iF,
const faPatchFieldMapper mapper 
)

Construct by mapping the given faPatchField onto a new patch.

Definition at line 67 of file faPatchField.C.

◆ faPatchField() [5/6]

faPatchField ( const faPatchField< Type > &  ptf)

Construct as copy.

Definition at line 112 of file faPatchField.C.

◆ faPatchField() [6/6]

faPatchField ( const faPatchField< Type > &  ptf,
const DimensionedField< Type, areaMesh > &  iF 
)

Construct as copy setting internal field reference.

Definition at line 126 of file faPatchField.C.

◆ ~faPatchField()

virtual ~faPatchField ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "faPatchField< Type >"  )

Runtime type information.

◆ declareRunTimeSelectionTable() [1/3]

declareRunTimeSelectionTable ( tmp  ,
faPatchField< Type >  ,
patch  ,
(const faPatch &p, const DimensionedField< Type, areaMesh > &iF)  ,
(p, iF)   
)

◆ declareRunTimeSelectionTable() [2/3]

declareRunTimeSelectionTable ( tmp  ,
faPatchField< Type >  ,
patchMapper  ,
(const faPatchField< Type > &ptf, const faPatch &p, const DimensionedField< Type, areaMesh > &iF, const faPatchFieldMapper &m)  ,
(dynamic_cast< const faPatchFieldType & >(ptf), p, iF, m)   
)

◆ declareRunTimeSelectionTable() [3/3]

declareRunTimeSelectionTable ( tmp  ,
faPatchField< Type >  ,
dictionary  ,
(const faPatch &p, const DimensionedField< Type, areaMesh > &iF, const dictionary &dict ,
(p, iF, dict  
)

◆ clone() [1/2]

◆ clone() [2/2]

◆ New() [1/4]

Foam::tmp< Foam::faPatchField< Type > > New ( const word patchFieldType,
const word actualPatchType,
const faPatch p,
const DimensionedField< Type, areaMesh > &  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 33 of file faPatchFieldNew.C.

References DebugInFunction, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInLookup, p, and tmp< T >::ref().

Referenced by emptyFaPatchField< Type >::valueBoundaryCoeffs(), and emptyFaPatchField< Type >::valueInternalCoeffs().

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

◆ New() [2/4]

Foam::tmp< Foam::faPatchField< Type > > New ( const word patchFieldType,
const faPatch p,
const DimensionedField< Type, areaMesh > &  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 91 of file faPatchFieldNew.C.

References Foam::New(), and p.

Here is the call graph for this function:

◆ New() [3/4]

Foam::tmp< Foam::faPatchField< Type > > New ( const faPatchField< Type > &  ptf,
const faPatch p,
const DimensionedField< Type, areaMesh > &  iF,
const faPatchFieldMapper pfMapper 
)
static

Return a pointer to a new patchField created on freestore from a given faPatchField mapped onto a new patch

Definition at line 150 of file faPatchFieldNew.C.

References DebugInFunction, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInLookup, and p.

Here is the call graph for this function:

◆ New() [4/4]

Foam::tmp< Foam::faPatchField< Type > > New ( const faPatch p,
const DimensionedField< Type, areaMesh > &  iF,
const dictionary dict 
)
static

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

Definition at line 103 of file faPatchFieldNew.C.

References DebugInFunction, dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::nl, and p.

Here is the call graph for this function:

◆ NewCalculatedType() [1/2]

static tmp<faPatchField<Type> > NewCalculatedType ( const faPatchField< Type2 > &  )
static

Return a pointer to a new calculatedFaPatchField created on freestore without setting patchField values

◆ db()

const Foam::objectRegistry & db ( ) const

Return local objectRegistry.

Definition at line 142 of file faPatchField.C.

References IOobject::db().

Here is the call graph for this function:

◆ patch()

const faPatch& patch ( ) const
inline

Return patch.

Definition at line 279 of file faPatchField.H.

Referenced by contactAngleForce::correct(), faPatchField< Type >::NewCalculatedType(), faPatchField< Type >::operator*=(), and faPatchField< Type >::operator/=().

Here is the caller graph for this function:

◆ internalField()

const DimensionedField<Type, areaMesh>& internalField ( ) const
inline

Return dimensioned internal field reference.

Definition at line 285 of file faPatchField.H.

◆ primitiveField()

const Field<Type>& primitiveField ( ) const
inline

Return internal field reference.

Definition at line 291 of file faPatchField.H.

◆ patchType() [1/2]

const word& patchType ( ) const
inline

Optional patch type.

Definition at line 297 of file faPatchField.H.

◆ patchType() [2/2]

word& patchType ( )
inline

Optional patch type.

Definition at line 303 of file faPatchField.H.

◆ calculatedType()

const Foam::word & calculatedType ( )
static

Return the type of the calculated for of faPatchField.

Definition at line 35 of file calculatedFaPatchField.C.

◆ fixesValue()

virtual bool fixesValue ( ) const
inlinevirtual

Return true if this patch field fixes a value.

Needed to check if a level has to be specified while solving Poissons equations.

Reimplemented in mixedFaPatchField< Type >, fixedValueFaPatchField< Type >, fixedValueOutflowFaPatchField< Type >, and calculatedFaPatchField< Type >.

Definition at line 314 of file faPatchField.H.

◆ coupled()

virtual bool coupled ( ) const
inlinevirtual

Return true if this patch field is coupled.

Reimplemented in processorFaPatchField< Type >, and coupledFaPatchField< Type >.

Definition at line 320 of file faPatchField.H.

Referenced by faMatrix< Type >::addBoundarySource(), and faMatrix< Type >::relax().

Here is the caller graph for this function:

◆ updated()

bool updated ( ) const
inline

Return true if the boundary condition has already been updated.

Definition at line 326 of file faPatchField.H.

◆ autoMap()

void autoMap ( const faPatchFieldMapper m)
virtual

Map (and resize as needed) from self given a mapping object.

Reimplemented in mixedFaPatchField< Type >, fixedGradientFaPatchField< Type >, genericFaPatchField< Type >, and emptyFaPatchField< Type >.

Definition at line 177 of file faPatchField.C.

◆ rmap()

void rmap ( const faPatchField< Type > &  ptf,
const labelList addr 
)
virtual

◆ snGrad()

◆ updateCoeffs()

virtual void updateCoeffs ( )
inlinevirtual

Update the coefficients associated with the patch field.

Sets Updated to true

Reimplemented in timeVaryingUniformFixedValueFaPatchField< Type >, emptyFaPatchField< Type >, and inletOutletFaPatchField< Type >.

Definition at line 355 of file faPatchField.H.

◆ patchInternalField()

Foam::tmp< Foam::Field< Type > > patchInternalField ( ) const
virtual

Return internal field next to patch as patch field.

Definition at line 170 of file faPatchField.C.

◆ patchNeighbourField()

virtual tmp<Field<Type> > patchNeighbourField ( ) const
inlinevirtual

Return patchField on the opposite patch of a coupled patch.

Reimplemented in coupledFaPatchField< Type >, processorFaPatchField< Type >, and cyclicFaPatchField< Type >.

Definition at line 364 of file faPatchField.H.

References NotImplemented.

Referenced by faMatrix< Type >::addBoundarySource().

Here is the caller graph for this function:

◆ initEvaluate()

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

Initialise the evaluation of the patch field.

Reimplemented in processorFaPatchField< Type >, and coupledFaPatchField< Type >.

Definition at line 372 of file faPatchField.H.

◆ evaluate()

◆ valueInternalCoeffs()

virtual tmp<Field<Type> > valueInternalCoeffs ( const tmp< Field< scalar >> &  ) const
inlinevirtual

Return the matrix diagonal coefficients corresponding to the evaluation of the value of this patchField with given weights

Definition at line 388 of file faPatchField.H.

References NotImplemented.

Referenced by gaussConvectionScheme< Type >::famDiv().

Here is the caller graph for this function:

◆ valueBoundaryCoeffs()

virtual tmp<Field<Type> > valueBoundaryCoeffs ( const tmp< Field< scalar >> &  ) const
inlinevirtual

Return the matrix source coefficients corresponding to the evaluation of the value of this patchField with given weights

Definition at line 399 of file faPatchField.H.

References NotImplemented.

Referenced by gaussConvectionScheme< Type >::famDiv().

Here is the caller graph for this function:

◆ gradientInternalCoeffs()

virtual tmp<Field<Type> > gradientInternalCoeffs ( ) const
inlinevirtual

Return the matrix diagonal coefficients corresponding to the evaluation of the gradient of this patchField

Reimplemented in mixedFaPatchField< Type >, clampedPlateFaPatchField< Type >, fixedGradientFaPatchField< Type >, emptyFaPatchField< Type >, coupledFaPatchField< Type >, zeroGradientFaPatchField< Type >, genericFaPatchField< Type >, fixedValueFaPatchField< Type >, fixedValueOutflowFaPatchField< Type >, calculatedFaPatchField< Type >, transformFaPatchField< Type >, transformFaPatchField< Type >, and transformFaPatchField< Type >.

Definition at line 409 of file faPatchField.H.

References NotImplemented.

Referenced by gaussLaplacianScheme< Type >::famLaplacian().

Here is the caller graph for this function:

◆ gradientBoundaryCoeffs()

virtual tmp<Field<Type> > gradientBoundaryCoeffs ( ) const
inlinevirtual

Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchField

Reimplemented in mixedFaPatchField< Type >, clampedPlateFaPatchField< Type >, fixedGradientFaPatchField< Type >, emptyFaPatchField< Type >, coupledFaPatchField< Type >, zeroGradientFaPatchField< Type >, genericFaPatchField< Type >, fixedValueFaPatchField< Type >, fixedValueOutflowFaPatchField< Type >, calculatedFaPatchField< Type >, and transformFaPatchField< Type >.

Definition at line 417 of file faPatchField.H.

References NotImplemented.

Referenced by gaussLaplacianScheme< Type >::famLaplacian().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented in mixedFaPatchField< Type >, coupledFaPatchField< Type >, timeVaryingUniformFixedValueFaPatchField< Type >, clampedPlateFaPatchField< Type >, fixedGradientFaPatchField< Type >, fixedValueFaPatchField< Type >, fixedValueOutflowFaPatchField< Type >, calculatedFaPatchField< Type >, inletOutletFaPatchField< Type >, and genericFaPatchField< Type >.

Definition at line 207 of file faPatchField.C.

References os().

Referenced by clampedPlateFaPatchField< Type >::write().

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

◆ check()

void check ( const faPatchField< Type > &  ptf) const

Check faPatchField<Type> against given faPatchField<Type>

Definition at line 150 of file faPatchField.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ operator=() [1/3]

void operator= ( const UList< Type > &  ul)
virtual

Reimplemented in mixedFaPatchField< Type >, fixedValueFaPatchField< Type >, and fixedValueOutflowFaPatchField< Type >.

Definition at line 222 of file faPatchField.C.

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

Here is the caller graph for this function:

◆ operator=() [2/3]

void operator= ( const faPatchField< Type > &  ptf)
virtual

Reimplemented in mixedFaPatchField< Type >, fixedValueFaPatchField< Type >, fixedValueOutflowFaPatchField< Type >, and transformFaPatchField< Type >.

Definition at line 232 of file faPatchField.C.

References Foam::check().

Here is the call graph for this function:

◆ operator+=() [1/3]

void operator+= ( const faPatchField< Type > &  ptf)
virtual

Reimplemented in mixedFaPatchField< Type >, fixedValueFaPatchField< Type >, and fixedValueOutflowFaPatchField< Type >.

Definition at line 243 of file faPatchField.C.

References Foam::check().

Here is the call graph for this function:

◆ operator-=() [1/3]

void operator-= ( const faPatchField< Type > &  ptf)
virtual

Reimplemented in mixedFaPatchField< Type >, fixedValueFaPatchField< Type >, and fixedValueOutflowFaPatchField< Type >.

Definition at line 254 of file faPatchField.C.

References Foam::check().

Here is the call graph for this function:

◆ operator*=() [1/3]

void operator*= ( const faPatchField< scalar > &  ptf)
virtual

Reimplemented in mixedFaPatchField< Type >, fixedValueFaPatchField< Type >, and fixedValueOutflowFaPatchField< Type >.

Definition at line 265 of file faPatchField.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and faPatchField< Type >::patch().

Here is the call graph for this function:

◆ operator/=() [1/3]

void operator/= ( const faPatchField< scalar > &  ptf)
virtual

Reimplemented in mixedFaPatchField< Type >, fixedValueFaPatchField< Type >, and fixedValueOutflowFaPatchField< Type >.

Definition at line 282 of file faPatchField.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and faPatchField< Type >::patch().

Here is the call graph for this function:

◆ operator+=() [2/3]

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

◆ operator-=() [2/3]

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

◆ operator*=() [2/3]

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

◆ operator/=() [2/3]

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

◆ operator=() [3/3]

void operator= ( const Type &  t)
virtual

◆ operator+=() [3/3]

void operator+= ( const Type &  t)
virtual

◆ operator-=() [3/3]

void operator-= ( const Type &  t)
virtual

◆ operator*=() [3/3]

void operator*= ( const scalar  s)
virtual

◆ operator/=() [3/3]

void operator/= ( const scalar  s)
virtual

◆ operator==() [1/3]

void operator== ( const faPatchField< Type > &  ptf)
virtual

Definition at line 389 of file faPatchField.C.

◆ operator==() [2/3]

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

Definition at line 399 of file faPatchField.C.

◆ operator==() [3/3]

void operator== ( const Type &  t)
virtual

Definition at line 409 of file faPatchField.C.

◆ NewCalculatedType() [2/2]

Foam::tmp<Foam::faPatchField<Type> > NewCalculatedType ( const faPatchField< Type2 > &  pf)

Definition at line 103 of file calculatedFaPatchField.C.

References faPatchField< Type >::patch().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator

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

Member Data Documentation

◆ disallowGenericFaPatchField

int disallowGenericFaPatchField
static

Debug switch to disallow the use of.

Definition at line 111 of file faPatchField.H.


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