directMethod Class Reference

Direct (one-to-one cell correspondence) mesh-to-mesh interpolation class. More...

Inheritance diagram for directMethod:
Collaboration diagram for directMethod:

Public Member Functions

 TypeName ("direct")
 Run-time type information. More...
 
 directMethod (const polyMesh &src, const polyMesh &tgt)
 Construct from source and target meshes. More...
 
 directMethod (const directMethod &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~directMethod ()
 Destructor. More...
 
virtual const wordAMImethod () const
 Return the corresponding AMI method for patch interpolation. More...
 
virtual void calculate (labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, labelListList &tgtToTgtAddr, scalarListList &tgtToTgtWght)
 Calculate addressing and weights. More...
 
void operator= (const directMethod &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from meshToMeshMethod
 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...
 
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...
 

Protected Member Functions

virtual bool intersect (const label srcCelli, const label tgtCelli) const
 Return the true if cells intersect. More...
 
virtual bool findInitialSeeds (const labelList &srcCellIDs, const boolList &mapFlag, const label startSeedI, label &srcSeedI, label &tgtSeedI) const
 Find indices of overlapping cells in src and tgt meshes - returns. More...
 
virtual void calculateAddressing (labelListList &srcToTgtCellAddr, scalarListList &srcToTgtCellWght, labelListList &tgtToSrcCellAddr, scalarListList &tgtToSrcCellWght, const label srcSeedI, const label tgtSeedI, const labelList &srcCellIDs, boolList &mapFlag, label &startSeedI)
 Calculate the mesh-to-mesh addressing and weights. More...
 
virtual void appendToDirectSeeds (boolList &mapFlag, labelList &srcTgtSeed, DynamicList< label > &srcSeeds, label &srcSeedI, label &tgtSeedI) const
 Append to list of src mesh seed indices. More...
 
- Protected Member Functions inherited from meshToMeshMethod
labelList maskCells () const
 Return src cell IDs for the overlap region. 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
 

Additional Inherited Members

- Static Public Member Functions inherited from meshToMeshMethod
static autoPtr< meshToMeshMethodNew (const word &methodName, const polyMesh &src, const polyMesh &tgt)
 Selector. More...
 
- Protected Attributes inherited from meshToMeshMethod
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 inherited from meshToMeshMethod
static scalar tolerance_ = 1e-6
 Tolerance used in volume overlap calculations. More...
 

Detailed Description

Direct (one-to-one cell correspondence) mesh-to-mesh interpolation class.

Volume conservative.

Source files

Definition at line 50 of file directMethod.H.

Constructor & Destructor Documentation

◆ directMethod() [1/2]

directMethod ( const polyMesh src,
const polyMesh tgt 
)

Construct from source and target meshes.

Definition at line 225 of file directMethod.C.

Referenced by directMethod::appendToDirectSeeds().

Here is the caller graph for this function:

◆ directMethod() [2/2]

directMethod ( const directMethod )
delete

Disallow default bitwise copy construction.

◆ ~directMethod()

~directMethod ( )
virtual

Destructor.

Definition at line 236 of file directMethod.C.

Member Function Documentation

◆ intersect()

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

Return the true if cells intersect.

Reimplemented from meshToMeshMethod.

Definition at line 43 of file directMethod.C.

References polyMesh::FACE_PLANES, and directMethod::findInitialSeeds().

Here is the call graph for this function:

◆ findInitialSeeds()

bool findInitialSeeds ( const labelList srcCellIDs,
const boolList mapFlag,
const label  startSeedI,
label srcSeedI,
label tgtSeedI 
) const
protectedvirtual

Find indices of overlapping cells in src and tgt meshes - returns.

true if found a matching pair

Definition at line 58 of file directMethod.C.

References directMethod::calculateAddressing(), Foam::endl(), Foam::Pout, and List< T >::size().

Referenced by directMethod::intersect().

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

◆ calculateAddressing()

void calculateAddressing ( labelListList srcToTgtCellAddr,
scalarListList srcToTgtCellWght,
labelListList tgtToSrcCellAddr,
scalarListList tgtToSrcCellWght,
const label  srcSeedI,
const label  tgtSeedI,
const labelList srcCellIDs,
boolList mapFlag,
label startSeedI 
)
protectedvirtual

Calculate the mesh-to-mesh addressing and weights.

Definition at line 99 of file directMethod.C.

References directMethod::appendToDirectSeeds(), forAll, and List< T >::transfer().

Referenced by directMethod::findInitialSeeds().

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

◆ appendToDirectSeeds()

void appendToDirectSeeds ( boolList mapFlag,
labelList srcTgtSeed,
DynamicList< label > &  srcSeeds,
label srcSeedI,
label tgtSeedI 
) const
protectedvirtual

Append to list of src mesh seed indices.

Definition at line 165 of file directMethod.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), directMethod::directMethod(), forAll, found, DynamicList< T, SizeInc, SizeMult, SizeDiv >::remove(), and List< T >::size().

Referenced by directMethod::calculateAddressing().

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

◆ TypeName()

TypeName ( "direct"  )

Run-time type information.

◆ AMImethod()

const Foam::word & AMImethod ( ) const
virtual

Return the corresponding AMI method for patch interpolation.

Implements meshToMeshMethod.

Definition at line 241 of file directMethod.C.

References directMethod::calculate().

Here is the call graph for this function:

◆ calculate()

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

Calculate addressing and weights.

Implements meshToMeshMethod.

Definition at line 248 of file directMethod.C.

Referenced by directMethod::AMImethod().

Here is the caller graph for this function:

◆ operator=()

void operator= ( const directMethod )
delete

Disallow default bitwise assignment.


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