oversetFvMeshBase Class Reference

Support for overset functionality. More...

Inheritance diagram for oversetFvMeshBase:
Collaboration diagram for oversetFvMeshBase:

Public Member Functions

 TypeName ("oversetFvMeshBase")
 Runtime type information. More...
 
 oversetFvMeshBase (const fvMesh &mesh, const bool doInit=true)
 Construct from IOobject. More...
 
virtual ~oversetFvMeshBase ()
 Destructor. More...
 
const fvMeshPrimitiveLduAddressingprimitiveLduAddr () const
 Return extended ldu addressing. More...
 
virtual const lduAddressinglduAddr () const
 Return ldu addressing. If active: is (extended) More...
 
virtual lduInterfacePtrsList interfaces () const
 Return a list of pointers for each patch. More...
 
const labelListreverseFaceMap () const
 Return old to new face addressing. More...
 
bool active () const
 Return true if using extended addressing. More...
 
void active (const bool f) const
 Enable/disable extended addressing. More...
 
template<class Type >
void addInterpolation (fvMatrix< Type > &m, const scalarField &normalisation, const bool setHoleCellValue, const Type &holeCellValue) const
 Manipulate the matrix to add the interpolation/set hole. More...
 
virtual bool update ()
 Update the mesh for both mesh motion and topology change. More...
 
virtual bool interpolateFields ()
 Update fields when mesh is updated. More...
 
virtual bool writeObject (IOstreamOption streamOpt, const bool writeOnProc) const
 Write using stream options. More...
 
template<class Type >
tmp< scalarFieldnormalisation (const fvMatrix< Type > &m) const
 Determine normalisation for interpolation. This equals the original diagonal except stabilised for zero diagonals (possible in hole cells) More...
 
template<class Type >
Foam::tmp< Foam::scalarFieldnormalisation (const fvMatrix< Type > &m) const
 
template<class Type >
Foam::SolverPerformance< Type > solveOverset (fvMatrix< Type > &m, const dictionary &dict) const
 

Static Public Member Functions

template<class GeoField >
static void checkCoupledBC (const GeoField &fld)
 Debug: check halo swap is ok. More...
 
template<class GeoField , class PatchType >
static void correctBoundaryConditions (typename GeoField::Boundary &bfld, const bool typeOnly)
 Correct boundary conditions of certain type (typeOnly = true) More...
 

Protected Member Functions

virtual bool updateAddressing () const
 Calculate the extended lduAddressing. More...
 
template<class Type >
void write (Ostream &, const fvMatrix< Type > &, const lduAddressing &, const lduInterfacePtrsList &) const
 Debug: print matrix. More...
 
template<class Type >
void scaleConnection (Field< Type > &coeffs, const labelUList &types, const scalarList &factor, const bool setHoleCellValue, const label celli, const label facei) const
 Freeze values at holes. More...
 
template<class Type >
SolverPerformance< Type > solveOverset (fvMatrix< Type > &m, const dictionary &) const
 Solve given dictionary with settings. More...
 
scalar cellAverage (const labelList &types, const labelList &nbrTypes, const scalarField &norm, const scalarField &nbrNorm, const label celli, bitSet &isFront) const
 Average norm of valid neighbours. More...
 
void writeAgglomeration (const GAMGAgglomeration &agglom) const
 Debug: dump agglomeration. More...
 

Static Protected Member Functions

template<class GeoField >
static void correctCoupledBoundaryConditions (GeoField &fld)
 Debug: correct coupled bc. More...
 

Protected Attributes

const fvMeshmesh_
 Reference to mesh. More...
 
bool active_
 Select base addressing (false) or locally stored extended. More...
 
autoPtr< fvMeshPrimitiveLduAddressinglduPtr_
 Extended addressing (extended with local interpolation stencils) More...
 
PtrList< const lduPrimitiveProcessorInterfaceremoteStencilInterfaces_
 Added (processor)lduInterfaces for remote bits of stencil. More...
 
lduInterfacePtrsList allInterfaces_
 Interfaces for above mesh. Contains both original and above added processorLduInterfaces. More...
 
labelListList stencilFaces_
 Corresponding faces (in above lduPtr) to the stencil. More...
 
labelListList stencilPatches_
 Corresponding patches (in above lduPtr) to the stencil. More...
 
labelList reverseFaceMap_
 From old to new face labels. More...
 

Detailed Description

Support for overset functionality.

Source files

Definition at line 52 of file oversetFvMeshBase.H.

Constructor & Destructor Documentation

◆ oversetFvMeshBase()

oversetFvMeshBase ( const fvMesh mesh,
const bool  doInit = true 
)

Construct from IOobject.

Definition at line 512 of file oversetFvMeshBase.C.

References oversetFvMeshBase::mesh_, and MeshObject< Mesh, MeshObjectType, Type >::New().

Here is the call graph for this function:

◆ ~oversetFvMeshBase()

~oversetFvMeshBase ( )
virtual

Destructor.

Definition at line 524 of file oversetFvMeshBase.C.

Member Function Documentation

◆ updateAddressing()

◆ write()

◆ scaleConnection()

void scaleConnection ( Field< Type > &  coeffs,
const labelUList types,
const scalarList factor,
const bool  setHoleCellValue,
const label  celli,
const label  facei 
) const
protected

Freeze values at holes.

template<class Type> void freezeHoles(fvMatrix<Type>&) const;

Scale coefficient depending on cell type

Definition at line 33 of file oversetFvMeshBaseTemplates.C.

References f().

Here is the call graph for this function:

◆ solveOverset() [1/2]

SolverPerformance<Type> solveOverset ( fvMatrix< Type > &  m,
const dictionary  
) const
protected

Solve given dictionary with settings.

◆ correctCoupledBoundaryConditions()

void correctCoupledBoundaryConditions ( GeoField &  fld)
staticprotected

Debug: correct coupled bc.

Definition at line 983 of file oversetFvMeshBaseTemplates.C.

References coupled, UPstream::defaultCommsType, fld, forAll, UPstream::nonBlocking, UPstream::nRequests(), and UPstream::waitRequests().

Here is the call graph for this function:

◆ cellAverage()

Foam::scalar cellAverage ( const labelList types,
const labelList nbrTypes,
const scalarField norm,
const scalarField nbrNorm,
const label  celli,
bitSet isFront 
) const
protected

Average norm of valid neighbours.

Definition at line 354 of file oversetFvMeshBase.C.

References bitSet::set().

Here is the call graph for this function:

◆ writeAgglomeration()

◆ TypeName()

TypeName ( "oversetFvMeshBase"  )

Runtime type information.

◆ primitiveLduAddr()

const Foam::fvMeshPrimitiveLduAddressing & primitiveLduAddr ( ) const

Return extended ldu addressing.

Definition at line 562 of file oversetFvMeshBase.C.

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

Referenced by oversetFvMeshBase::active().

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

◆ lduAddr()

const Foam::lduAddressing & lduAddr ( ) const
virtual

Return ldu addressing. If active: is (extended)

primitiveLduAddr

Reimplemented in dynamicOversetFvMesh, and staticOversetFvMesh.

Definition at line 530 of file oversetFvMeshBase.C.

Referenced by dynamicOversetFvMesh::lduAddr(), and staticOversetFvMesh::lduAddr().

Here is the caller graph for this function:

◆ interfaces()

Foam::lduInterfacePtrsList interfaces ( ) const
virtual

Return a list of pointers for each patch.

with only those pointing to interfaces being set. If active: return additional remoteStencilInterfaces_

Reimplemented in dynamicOversetFvMesh, and staticOversetFvMesh.

Definition at line 546 of file oversetFvMeshBase.C.

Referenced by dynamicOversetFvMesh::interfaces(), and staticOversetFvMesh::interfaces().

Here is the caller graph for this function:

◆ reverseFaceMap()

const labelList& reverseFaceMap ( ) const
inline

Return old to new face addressing.

Definition at line 243 of file oversetFvMeshBase.H.

References oversetFvMeshBase::reverseFaceMap_.

◆ active() [1/2]

bool active ( ) const
inline

Return true if using extended addressing.

Definition at line 251 of file oversetFvMeshBase.H.

References oversetFvMeshBase::active_.

◆ active() [2/2]

void active ( const bool  f) const
inline

◆ addInterpolation()

◆ update()

bool update ( )
virtual

Update the mesh for both mesh motion and topology change.

Reimplemented in dynamicOversetFvMesh, and staticOversetFvMesh.

Definition at line 574 of file oversetFvMeshBase.C.

Referenced by staticOversetFvMesh::staticOversetFvMesh(), staticOversetFvMesh::update(), and dynamicOversetFvMesh::update().

Here is the caller graph for this function:

◆ interpolateFields()

bool interpolateFields ( )
virtual

Update fields when mesh is updated.

Definition at line 592 of file oversetFvMeshBase.C.

References cellCellStencil::interpolate(), MeshObject< Mesh, MeshObjectType, Type >::New(), cellCellStencilObject::nonInterpolatedFields(), and overlap.

Here is the call graph for this function:

◆ writeObject()

◆ checkCoupledBC()

void checkCoupledBC ( const GeoField &  fld)
static

Debug: check halo swap is ok.

Definition at line 1017 of file oversetFvMeshBaseTemplates.C.

References Foam::endl(), fld, forAll, OSstream::name(), and Foam::Pout.

Here is the call graph for this function:

◆ correctBoundaryConditions()

void correctBoundaryConditions ( typename GeoField::Boundary &  bfld,
const bool  typeOnly 
)
static

Correct boundary conditions of certain type (typeOnly = true)

or explicitly not of the type (typeOnly = false)

Definition at line 71 of file oversetFvMeshBaseTemplates.C.

References forAll.

Referenced by trackingInverseDistance::update(), cellVolumeWeight::update(), and inverseDistance::update().

Here is the caller graph for this function:

◆ normalisation() [1/2]

tmp<scalarField> normalisation ( const fvMatrix< Type > &  m) const

Determine normalisation for interpolation. This equals the original diagonal except stabilised for zero diagonals (possible in hole cells)

◆ normalisation() [2/2]

◆ solveOverset() [2/2]

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

◆ active_

bool active_
mutableprotected

Select base addressing (false) or locally stored extended.

lduAddressing (true)

Definition at line 81 of file oversetFvMeshBase.H.

Referenced by oversetFvMeshBase::active().

◆ lduPtr_

autoPtr<fvMeshPrimitiveLduAddressing> lduPtr_
mutableprotected

Extended addressing (extended with local interpolation stencils)

Definition at line 86 of file oversetFvMeshBase.H.

Referenced by oversetFvMeshBase::updateAddressing().

◆ remoteStencilInterfaces_

PtrList<const lduPrimitiveProcessorInterface> remoteStencilInterfaces_
mutableprotected

Added (processor)lduInterfaces for remote bits of stencil.

Definition at line 92 of file oversetFvMeshBase.H.

Referenced by oversetFvMeshBase::updateAddressing().

◆ allInterfaces_

lduInterfacePtrsList allInterfaces_
mutableprotected

Interfaces for above mesh. Contains both original and above added processorLduInterfaces.

Definition at line 98 of file oversetFvMeshBase.H.

Referenced by oversetFvMeshBase::active(), and oversetFvMeshBase::updateAddressing().

◆ stencilFaces_

labelListList stencilFaces_
mutableprotected

Corresponding faces (in above lduPtr) to the stencil.

Definition at line 103 of file oversetFvMeshBase.H.

Referenced by oversetFvMeshBase::updateAddressing().

◆ stencilPatches_

labelListList stencilPatches_
mutableprotected

Corresponding patches (in above lduPtr) to the stencil.

Definition at line 108 of file oversetFvMeshBase.H.

Referenced by oversetFvMeshBase::updateAddressing().

◆ reverseFaceMap_

labelList reverseFaceMap_
mutableprotected

From old to new face labels.

Definition at line 113 of file oversetFvMeshBase.H.

Referenced by oversetFvMeshBase::reverseFaceMap(), and oversetFvMeshBase::updateAddressing().


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