mappedFvPatchField< Type > Class Template Reference

Base class for mapped patch fields. More...

Inheritance diagram for mappedFvPatchField< Type >:
Collaboration diagram for mappedFvPatchField< Type >:

Public Member Functions

 TypeName ("mappedValue")
 Runtime type information. More...
 
 mappedFvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 mappedFvPatchField (const mappedFvPatchField< Type > &, const fvPatch &, const DimensionedField< Type, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given mappedFvPatchField. More...
 
 mappedFvPatchField (const mappedFvPatchField< Type > &)=delete
 Disallow copy without setting internal field reference. More...
 
 mappedFvPatchField (const mappedFvPatchField< Type > &, const DimensionedField< Type, volMesh > &)
 Copy constructor setting internal field reference. More...
 
virtual ~mappedFvPatchField ()
 Destructor. More...
 
virtual void clearOut ()
 Clear the mapper if present. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Protected Member Functions

const mappedPatchBasemapper () const
 Return the mapping engine. More...
 
const fvPatchField< Type > & nbrPatchField () const
 Return the neighbouring patch field. More...
 
tmp< Field< Type > > mappedValues (const Field< Type > &nbrPatchField) const
 Return the mapped values, given the neighbouring field. More...
 

Protected Attributes

const fvPatchp_
 Reference to the patch. More...
 
const DimensionedField< Type, volMesh > & iF_
 Reference to the internal field. More...
 
const word fieldName_
 The field to map. More...
 
const bool setAverage_
 If true adjust the sampled field to maintain an average value. More...
 
const Type average_
 Average value the sampled field is adjusted to. More...
 
autoPtr< mappedPatchBasemapperPtr_
 The mapping engine. More...
 

Detailed Description

template<class Type>
class Foam::mappedFvPatchField< Type >

Base class for mapped patch fields.

Usage
Property Description Required Default value
field name of field to be mapped no this field name
setAverage set the average value? no yes if average is specified, no otherwise
average average value to apply if setAverage is true

This boundary condition will usually be applied to a patch which is of mappedPatchBase type, and which holds all the necessary mapping information. It can also create its own mapping data which overrides that in the mapped patch, or so that it can be applied to a non-mapped patch. This is triggered by the presence of controls relating to mappedPatchBase (i.e., neighbourRegion, neighbourPatch, etc ...).

See also
Foam::mappedValueFvPatchField Foam::mappedPatchBase Foam::mappedPolyPatch Foam::mappedFvPatch
Source files

Definition at line 91 of file mappedFvPatchField.H.

Constructor & Destructor Documentation

◆ mappedFvPatchField() [1/4]

mappedFvPatchField ( const fvPatch p,
const DimensionedField< Type, volMesh > &  iF,
const dictionary dict 
)

Construct from patch, internal field and dictionary.

Definition at line 103 of file mappedFvPatchField.C.

◆ mappedFvPatchField() [2/4]

mappedFvPatchField ( const mappedFvPatchField< Type > &  ptf,
const fvPatch p,
const DimensionedField< Type, volMesh > &  iF,
const fvPatchFieldMapper mapper 
)

Construct by mapping given mappedFvPatchField.

onto a new patch

Definition at line 153 of file mappedFvPatchField.C.

◆ mappedFvPatchField() [3/4]

mappedFvPatchField ( const mappedFvPatchField< Type > &  )
delete

Disallow copy without setting internal field reference.

◆ mappedFvPatchField() [4/4]

mappedFvPatchField ( const mappedFvPatchField< Type > &  ptf,
const DimensionedField< Type, volMesh > &  iF 
)

Copy constructor setting internal field reference.

Definition at line 176 of file mappedFvPatchField.C.

◆ ~mappedFvPatchField()

virtual ~mappedFvPatchField ( )
inlinevirtual

Destructor.

Definition at line 169 of file mappedFvPatchField.H.

Member Function Documentation

◆ mapper()

const Foam::mappedPatchBase & mapper
protected

Return the mapping engine.

Definition at line 33 of file mappedFvPatchField.C.

◆ nbrPatchField()

const Foam::fvPatchField< Type > & nbrPatchField
protected

Return the neighbouring patch field.

Definition at line 44 of file mappedFvPatchField.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), and IOobject::name().

Here is the call graph for this function:

◆ mappedValues()

Foam::tmp< Foam::Field< Type > > mappedValues ( const Field< Type > &  nbrPatchField) const
protected

Return the mapped values, given the neighbouring field.

Definition at line 63 of file mappedFvPatchField.C.

References Foam::gSum(), Foam::mag(), and tmp< T >::ref().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "mappedValue"  )

Runtime type information.

◆ clearOut()

void clearOut
virtual

Clear the mapper if present.

Definition at line 199 of file mappedFvPatchField.C.

Referenced by mappedFilmPressureFvPatchScalarField::map(), mappedValueFvPatchField< Type >::map(), mappedFilmPressureFvPatchScalarField::reset(), and mappedValueFvPatchField< Type >::reset().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented in mappedValueAndPatchInternalValueFvPatchField< Type >, mappedValueFvPatchField< Type >, and mappedFilmPressureFvPatchScalarField.

Definition at line 209 of file mappedFvPatchField.C.

References IOstream::name(), Foam::writeEntry(), and Foam::writeEntryIfDifferent().

Referenced by mappedFilmPressureFvPatchScalarField::write(), and mappedValueFvPatchField< Type >::write().

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

Member Data Documentation

◆ p_

const fvPatch& p_
protected

Reference to the patch.

Definition at line 98 of file mappedFvPatchField.H.

◆ iF_

const DimensionedField<Type, volMesh>& iF_
protected

Reference to the internal field.

Definition at line 101 of file mappedFvPatchField.H.

◆ fieldName_

const word fieldName_
protected

The field to map.

Definition at line 104 of file mappedFvPatchField.H.

◆ setAverage_

const bool setAverage_
protected

If true adjust the sampled field to maintain an average value.

Definition at line 107 of file mappedFvPatchField.H.

◆ average_

const Type average_
protected

Average value the sampled field is adjusted to.

Definition at line 110 of file mappedFvPatchField.H.

◆ mapperPtr_

autoPtr<mappedPatchBase> mapperPtr_
protected

The mapping engine.

Definition at line 113 of file mappedFvPatchField.H.


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