meshToMeshMethod Class Referenceabstract

Base class for mesh-to-mesh calculation methods. More...

Inheritance diagram for meshToMeshMethod:
Collaboration diagram for meshToMeshMethod:

Public Member Functions

 TypeName ("meshToMeshMethod")
 Run-time type information. More...
 
 declareRunTimeSelectionTable (autoPtr, meshToMeshMethod, components,(const polyMesh &src, const polyMesh &tgt),(src, tgt))
 Declare runtime constructor selection table. More...
 
 meshToMeshMethod (const polyMesh &src, const polyMesh &tgt)
 Construct from source and target meshes. More...
 
 meshToMeshMethod (const meshToMeshMethod &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~meshToMeshMethod ()
 Destructor. More...
 
virtual void calculate (labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, labelListList &tgtToTgtAddr, scalarListList &tgtToTgtWght)=0
 Calculate addressing and weights. More...
 
const polyMeshsrc () const
 Return const access to the source mesh. More...
 
const polyMeshtgt () const
 Return const access to the target mesh. More...
 
scalar V () const
 Return const access to the overlap volume. More...
 
void writeConnectivity (const polyMesh &mesh1, const polyMesh &mesh2, const labelListList &mesh1ToMesh2Addr) const
 Write the connectivity (debugging) More...
 
void operator= (const meshToMeshMethod &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

static autoPtr< meshToMeshMethodNew (const word &methodName, const polyMesh &src, const polyMesh &tgt)
 Selector. More...
 

Protected Member Functions

labelList maskCells () const
 Return src cell IDs for the overlap region. More...
 
virtual bool intersect (const label srcCelli, const label tgtCelli) const
 Return the true if cells intersect. More...
 
virtual scalar interVol (const label srcCelli, const label tgtCelli) const
 Return the intersection volume between two cells. More...
 
virtual void appendNbrCells (const label tgtCelli, const polyMesh &mesh, const DynamicList< label > &visitedTgtCells, DynamicList< label > &nbrTgtCellIDs) const
 Append target cell neighbour cells to cellIDs list. More...
 
virtual bool initialise (labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, labelListList &tgtToTgtAddr, scalarListList &tgtToTgtWght) const
 

Protected Attributes

const polyMeshsrc_
 Reference to the source mesh. More...
 
const polyMeshtgt_
 Reference to the target mesh. More...
 
scalar V_
 Cell total volume in overlap region [m^3]. More...
 

Static Protected Attributes

static scalar tolerance_ = 1e-6
 Tolerance used in volume overlap calculations. More...
 

Detailed Description

Base class for mesh-to-mesh calculation methods.

Source files

Definition at line 48 of file meshToMeshMethod.H.

Constructor & Destructor Documentation

◆ meshToMeshMethod() [1/2]

meshToMeshMethod ( const polyMesh src,
const polyMesh tgt 
)

Construct from source and target meshes.

Definition at line 186 of file meshToMeshMethod.C.

References Foam::endl(), and Foam::Pout.

Referenced by meshToMeshMethod::initialise().

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

◆ meshToMeshMethod() [2/2]

meshToMeshMethod ( const meshToMeshMethod )
delete

Disallow default bitwise copy construction.

◆ ~meshToMeshMethod()

~meshToMeshMethod ( )
virtual

Destructor.

Definition at line 209 of file meshToMeshMethod.C.

References meshToMeshMethod::writeConnectivity().

Here is the call graph for this function:

Member Function Documentation

◆ maskCells()

Foam::labelList maskCells ( ) const
protected

Return src cell IDs for the overlap region.

Definition at line 44 of file meshToMeshMethod.C.

References List< T >::append(), cells, Foam::endl(), forAll, boundBox::inflate(), meshToMeshMethod::intersect(), Foam::max(), Foam::min(), boundBox::overlaps(), points, Foam::Pout, and List< T >::size().

Here is the call graph for this function:

◆ intersect()

bool intersect ( const label  srcCelli,
const label  tgtCelli 
) const
protectedvirtual

Return the true if cells intersect.

Reimplemented in directMethod.

Definition at line 78 of file meshToMeshMethod.C.

References tetOverlapVolume::cellCellOverlapMinDecomp(), and meshToMeshMethod::interVol().

Referenced by meshToMeshMethod::maskCells().

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

◆ interVol()

Foam::scalar interVol ( const label  srcCelli,
const label  tgtCelli 
) const
protectedvirtual

Return the intersection volume between two cells.

Definition at line 102 of file meshToMeshMethod.C.

References meshToMeshMethod::appendNbrCells(), and tetOverlapVolume::cellCellOverlapVolumeMinDecomp().

Referenced by meshToMeshMethod::intersect().

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

◆ appendNbrCells()

void appendNbrCells ( const label  tgtCelli,
const polyMesh mesh,
const DynamicList< label > &  visitedTgtCells,
DynamicList< label > &  nbrTgtCellIDs 
) const
protectedvirtual

Append target cell neighbour cells to cellIDs list.

Definition at line 125 of file meshToMeshMethod.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), primitiveMesh::cellCells(), Foam::findIndex(), forAll, and meshToMeshMethod::initialise().

Referenced by meshToMeshMethod::interVol().

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

◆ initialise()

bool initialise ( labelListList srcToTgtAddr,
scalarListList srcToTgtWght,
labelListList tgtToTgtAddr,
scalarListList tgtToTgtWght 
) const
protectedvirtual

Definition at line 152 of file meshToMeshMethod.C.

References Foam::endl(), meshToMeshMethod::meshToMeshMethod(), Foam::Pout, and List< T >::setSize().

Referenced by meshToMeshMethod::appendNbrCells().

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

◆ TypeName()

TypeName ( "meshToMeshMethod"  )

Run-time type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
meshToMeshMethod  ,
components  ,
(const polyMesh &src, const polyMesh &tgt ,
(src, tgt  
)

Declare runtime constructor selection table.

◆ New()

Foam::autoPtr< Foam::meshToMeshMethod > New ( const word methodName,
const polyMesh src,
const polyMesh tgt 
)
static

Selector.

Definition at line 31 of file meshToMeshMethodNew.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, and Foam::nl.

Referenced by meshToMesh::mapAndOpTgtToSrc().

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

◆ calculate()

virtual void calculate ( labelListList srcToTgtAddr,
scalarListList srcToTgtWght,
labelListList tgtToTgtAddr,
scalarListList tgtToTgtWght 
)
pure virtual

Calculate addressing and weights.

Implemented in mapNearestMethod, directMethod, and cellVolumeWeightMethod.

Referenced by meshToMesh::mapAndOpTgtToSrc().

Here is the caller graph for this function:

◆ src()

const Foam::polyMesh & src ( ) const
inline

Return const access to the source mesh.

Definition at line 26 of file meshToMeshMethodI.H.

References meshToMeshMethod::src_.

◆ tgt()

const Foam::polyMesh & tgt ( ) const
inline

Return const access to the target mesh.

Definition at line 32 of file meshToMeshMethodI.H.

References meshToMeshMethod::tgt_.

◆ V()

Foam::scalar V ( ) const
inline

Return const access to the overlap volume.

Definition at line 38 of file meshToMeshMethodI.H.

References meshToMeshMethod::V_.

Referenced by meshToMesh::mapAndOpTgtToSrc().

Here is the caller graph for this function:

◆ writeConnectivity()

void writeConnectivity ( const polyMesh mesh1,
const polyMesh mesh2,
const labelListList mesh1ToMesh2Addr 
) const

◆ operator=()

void operator= ( const meshToMeshMethod )
delete

Disallow default bitwise assignment.

Member Data Documentation

◆ src_

const polyMesh& src_
protected

Reference to the source mesh.

Definition at line 56 of file meshToMeshMethod.H.

Referenced by meshToMeshMethod::src().

◆ tgt_

const polyMesh& tgt_
protected

Reference to the target mesh.

Definition at line 59 of file meshToMeshMethod.H.

Referenced by meshToMeshMethod::tgt().

◆ V_

scalar V_
protected

Cell total volume in overlap region [m^3].

Definition at line 62 of file meshToMeshMethod.H.

Referenced by meshToMeshMethod::V().

◆ tolerance_

Foam::scalar tolerance_ = 1e-6
staticprotected

Tolerance used in volume overlap calculations.

Definition at line 65 of file meshToMeshMethod.H.


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