Loading...
Searching...
No Matches
oversetFvMeshBase Class Reference

Support for overset functionality. More...

#include <oversetFvMeshBase.H>

Inheritance diagram for oversetFvMeshBase:
Collaboration diagram for oversetFvMeshBase:

Public Member Functions

 TypeName ("oversetFvMeshBase")
 Runtime type information.
 oversetFvMeshBase (const fvMesh &mesh, const bool doInit=true)
 Construct from IOobject.
virtual ~oversetFvMeshBase ()
 Destructor.
const fvMeshPrimitiveLduAddressingprimitiveLduAddr () const
 Return extended ldu addressing.
virtual const lduAddressinglduAddr () const
 Return ldu addressing. If active: is (extended).
virtual lduInterfacePtrsList interfaces () const
 Return a list of pointers for each patch.
const labelListreverseFaceMap () const
 Return old to new face addressing.
bool active () const
 Return true if using extended addressing.
void active (const bool f) const
 Enable/disable extended addressing.
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.
void clearOut ()
 Clear out local storage.
virtual bool update ()
 Update the mesh for both mesh motion and topology change.
virtual bool interpolateFields ()
 Update fields when mesh is updated.
virtual bool writeObject (IOstreamOption streamOpt, const bool writeOnProc) const
 Write using stream options.
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).
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.
template<class GeoField, class PatchType, bool TypeOnly>
static void correctBoundaryConditions (typename GeoField::Boundary &bfld)
 Correct boundary conditions of certain type (TypeOnly = true) or explicitly not of the type (TypeOnly = false).

Protected Member Functions

virtual bool updateAddressing () const
 Calculate the extended lduAddressing.
template<class Type>
void write (Ostream &, const fvMatrix< Type > &, const lduAddressing &, const lduInterfacePtrsList &) const
 Debug: print matrix.
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.
template<class Type>
SolverPerformance< Type > solveOverset (fvMatrix< Type > &m, const dictionary &) const
 Solve given dictionary with settings.
scalar cellAverage (const labelUList &types, const labelUList &nbrTypes, const scalarField &norm, const scalarField &nbrNorm, const label celli, bitSet &isFront) const
 Average norm of valid neighbours.
void writeAgglomeration (const GAMGAgglomeration &agglom) const
 Debug: dump agglomeration.

Static Protected Member Functions

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

Protected Attributes

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

Detailed Description

Support for overset functionality.

Source files

Definition at line 51 of file oversetFvMeshBase.H.

Constructor & Destructor Documentation

◆ oversetFvMeshBase()

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

Construct from IOobject.

Definition at line 514 of file oversetFvMeshBase.C.

References active_, mesh, mesh_, and MeshObject< fvMesh, MoveableMeshObject, cellCellStencilObject >::New().

Here is the call graph for this function:

◆ ~oversetFvMeshBase()

~oversetFvMeshBase ( )
virtual

Destructor.

Definition at line 526 of file oversetFvMeshBase.C.

Member Function Documentation

◆ updateAddressing()

◆ write()

◆ scaleConnection()

template<class Type>
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 32 of file oversetFvMeshBaseTemplates.C.

References f(), cellCellStencil::HOLE, cellCellStencil::INTERPOLATED, and cellCellStencil::SPECIAL.

Referenced by addInterpolation().

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

◆ solveOverset() [1/2]

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

Solve given dictionary with settings.

References fld().

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

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

◆ correctCoupledBoundaryConditions()

template<class GeoField>
void correctCoupledBoundaryConditions ( GeoField & fld)
staticprotected

Debug: correct coupled bc.

Definition at line 976 of file oversetFvMeshBaseTemplates.C.

References fld().

Referenced by checkCoupledBC().

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

◆ cellAverage()

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

Average norm of valid neighbours.

Definition at line 353 of file oversetFvMeshBase.C.

References mesh_, and bitSet::set().

Referenced by normalisation().

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

◆ writeAgglomeration()

◆ TypeName()

TypeName ( "oversetFvMeshBase" )

Runtime type information.

References mesh.

◆ primitiveLduAddr()

const Foam::fvMeshPrimitiveLduAddressing & primitiveLduAddr ( ) const

Return extended ldu addressing.

Definition at line 564 of file oversetFvMeshBase.C.

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

Referenced by 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 532 of file oversetFvMeshBase.C.

References active_, lduPtr_, mesh_, and updateAddressing().

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

Here is the call graph for this function:
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 548 of file oversetFvMeshBase.C.

References active_, allInterfaces_, lduPtr_, mesh_, and updateAddressing().

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

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

◆ reverseFaceMap()

const labelList & reverseFaceMap ( ) const
inline

Return old to new face addressing.

Definition at line 242 of file oversetFvMeshBase.H.

References reverseFaceMap_.

◆ active() [1/2]

bool active ( ) const
inline

Return true if using extended addressing.

Definition at line 250 of file oversetFvMeshBase.H.

References active_.

Referenced by solveOverset().

Here is the caller graph for this function:

◆ active() [2/2]

void active ( const bool f) const
inline

Enable/disable extended addressing.

Definition at line 258 of file oversetFvMeshBase.H.

References active_, allInterfaces_, DebugInfo, Foam::endl(), f(), fvMeshPrimitiveLduAddressing::lowerAddr(), mesh_, primitiveLduAddr(), and UList< T >::size().

Here is the call graph for this function:

◆ addInterpolation()

◆ clearOut()

void clearOut ( )

Clear out local storage.

Definition at line 576 of file oversetFvMeshBase.C.

References lduPtr_.

Referenced by cellCellStencilObject::movePoints().

Here is the caller graph for this function:

◆ update()

bool update ( )
virtual

Update the mesh for both mesh motion and topology change.

Reimplemented in dynamicOversetFvMesh, and staticOversetFvMesh.

Definition at line 584 of file oversetFvMeshBase.C.

References interpolateFields(), and updateAddressing().

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

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

◆ interpolateFields()

bool interpolateFields ( )
virtual

Update fields when mesh is updated.

Definition at line 602 of file oversetFvMeshBase.C.

References HashSet< Key, Hash >::insert(), mesh_, MeshObject< fvMesh, MoveableMeshObject, cellCellStencilObject >::New(), overlap, and dictionary::toc().

Referenced by update().

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

◆ writeObject()

◆ checkCoupledBC()

template<class GeoField>
void checkCoupledBC ( const GeoField & fld)
static

Debug: check halo swap is ok.

Definition at line 984 of file oversetFvMeshBaseTemplates.C.

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

Here is the call graph for this function:

◆ correctBoundaryConditions()

template<class GeoField, class PatchType, bool TypeOnly>
void correctBoundaryConditions ( typename GeoField::Boundary & bfld)
static

Correct boundary conditions of certain type (TypeOnly = true) or explicitly not of the type (TypeOnly = false).

Definition at line 70 of file oversetFvMeshBaseTemplates.C.

References Foam::isA().

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

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

◆ normalisation() [1/2]

template<class Type>
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).

Referenced by addInterpolation(), and solveOverset().

Here is the caller graph for this function:

◆ normalisation() [2/2]

◆ solveOverset() [2/2]

Member Data Documentation

◆ mesh_

◆ active_

bool active_
mutableprotected

Select base addressing (false) or locally stored extended.

lduAddressing (true)

Definition at line 80 of file oversetFvMeshBase.H.

Referenced by active(), active(), interfaces(), lduAddr(), and oversetFvMeshBase().

◆ lduPtr_

autoPtr<fvMeshPrimitiveLduAddressing> lduPtr_
mutableprotected

Extended addressing (extended with local interpolation stencils).

Definition at line 85 of file oversetFvMeshBase.H.

Referenced by clearOut(), interfaces(), lduAddr(), primitiveLduAddr(), and updateAddressing().

◆ remoteStencilInterfaces_

PtrList<const lduPrimitiveProcessorInterface> remoteStencilInterfaces_
mutableprotected

Added (processor)lduInterfaces for remote bits of stencil.

Definition at line 91 of file oversetFvMeshBase.H.

Referenced by updateAddressing().

◆ allInterfaces_

lduInterfacePtrsList allInterfaces_
mutableprotected

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

Definition at line 97 of file oversetFvMeshBase.H.

Referenced by active(), addInterpolation(), interfaces(), and updateAddressing().

◆ stencilFaces_

labelListList stencilFaces_
mutableprotected

Corresponding faces (in above lduPtr) to the stencil.

Definition at line 102 of file oversetFvMeshBase.H.

Referenced by addInterpolation(), and updateAddressing().

◆ stencilPatches_

labelListList stencilPatches_
mutableprotected

Corresponding patches (in above lduPtr) to the stencil.

Definition at line 107 of file oversetFvMeshBase.H.

Referenced by addInterpolation(), and updateAddressing().

◆ reverseFaceMap_

labelList reverseFaceMap_
mutableprotected

From old to new face labels.

Definition at line 112 of file oversetFvMeshBase.H.

Referenced by addInterpolation(), reverseFaceMap(), and updateAddressing().


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