Base class for mesh-to-mesh calculation methods. More...
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 polyMesh & | src () const |
Return const access to the source mesh. More... | |
const polyMesh & | tgt () 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< meshToMeshMethod > | New (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 polyMesh & | src_ |
Reference to the source mesh. More... | |
const polyMesh & | tgt_ |
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... | |
Base class for mesh-to-mesh calculation methods.
Definition at line 48 of file meshToMeshMethod.H.
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().
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 209 of file meshToMeshMethod.C.
References meshToMeshMethod::writeConnectivity().
|
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().
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().
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().
|
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().
|
protectedvirtual |
Definition at line 152 of file meshToMeshMethod.C.
References Foam::endl(), meshToMeshMethod::meshToMeshMethod(), Foam::Pout, and List< T >::setSize().
Referenced by meshToMeshMethod::appendNbrCells().
TypeName | ( | "meshToMeshMethod" | ) |
Run-time type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
meshToMeshMethod | , | ||
components | , | ||
(const polyMesh &src, const polyMesh &tgt) | , | ||
(src, tgt) | |||
) |
Declare runtime constructor selection table.
|
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().
|
pure virtual |
Calculate addressing and weights.
Implemented in mapNearestMethod, directMethod, and cellVolumeWeightMethod.
Referenced by meshToMesh::mapAndOpTgtToSrc().
|
inline |
Return const access to the source mesh.
Definition at line 26 of file meshToMeshMethodI.H.
References meshToMeshMethod::src_.
|
inline |
Return const access to the target mesh.
Definition at line 32 of file meshToMeshMethodI.H.
References meshToMeshMethod::tgt_.
|
inline |
Return const access to the overlap volume.
Definition at line 38 of file meshToMeshMethodI.H.
References meshToMeshMethod::V_.
Referenced by meshToMesh::mapAndOpTgtToSrc().
void writeConnectivity | ( | const polyMesh & | mesh1, |
const polyMesh & | mesh2, | ||
const labelListList & | mesh1ToMesh2Addr | ||
) | const |
Write the connectivity (debugging)
Definition at line 216 of file meshToMeshMethod.C.
References Foam::constant::universal::c, primitiveMesh::cellCentres(), primitiveMesh::cells(), Foam::endl(), polyMesh::faces(), forAll, UPstream::myProcNo(), Foam::name(), IOobject::name(), primitiveMesh::nCells(), Foam::nl, p, UPstream::parRun(), cell::points(), polyMesh::points(), Foam::Pout, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by meshToMesh::mapAndOpTgtToSrc(), and meshToMeshMethod::~meshToMeshMethod().
|
delete |
Disallow default bitwise assignment.
|
protected |
Reference to the source mesh.
Definition at line 56 of file meshToMeshMethod.H.
Referenced by meshToMeshMethod::src().
|
protected |
Reference to the target mesh.
Definition at line 59 of file meshToMeshMethod.H.
Referenced by meshToMeshMethod::tgt().
|
protected |
Cell total volume in overlap region [m^3].
Definition at line 62 of file meshToMeshMethod.H.
Referenced by meshToMeshMethod::V().
|
staticprotected |
Tolerance used in volume overlap calculations.
Definition at line 65 of file meshToMeshMethod.H.