Base class for mesh-to-mesh calculation methods. More...
#include <meshToMeshMethod.H>


Public Member Functions | |
| TypeName ("meshToMeshMethod") | |
| Run-time type information. | |
| declareRunTimeSelectionTable (autoPtr, meshToMeshMethod, components,(const polyMesh &src, const polyMesh &tgt),(src, tgt)) | |
| Declare runtime constructor selection table. | |
| meshToMeshMethod (const polyMesh &src, const polyMesh &tgt) | |
| Construct from source and target meshes. | |
| virtual | ~meshToMeshMethod () |
| Destructor. | |
| virtual void | calculate (labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, pointListList &srcToTgtVec, labelListList &tgtToSrcAddr, scalarListList &tgtToSrcWght, pointListList &tgtToSrcVec)=0 |
| Calculate addressing and weights and optionally offset vectors. | |
| const polyMesh & | src () const |
| Return const access to the source mesh. | |
| const polyMesh & | tgt () const |
| Return const access to the target mesh. | |
| scalar | V () const |
| Return const access to the overlap volume. | |
| void | writeConnectivity (const polyMesh &mesh1, const polyMesh &mesh2, const labelListList &mesh1ToMesh2Addr) const |
| Write the connectivity (debugging). | |
Static Public Member Functions | |
| static autoPtr< meshToMeshMethod > | New (const word &methodName, const polyMesh &src, const polyMesh &tgt) |
| Selector. | |
Protected Member Functions | |
| labelList | maskCells () const |
| Return src cell IDs for the overlap region. | |
| virtual bool | intersect (const label srcCelli, const label tgtCelli) const |
| Return the true if cells intersect. | |
| virtual scalar | interVol (const label srcCelli, const label tgtCelli) const |
| Return the intersection volume between two cells. | |
| virtual Tuple2< scalar, point > | interVolAndCentroid (const label srcCellI, const label tgtCellI) |
| Return the intersection volume and centroid between two cells. | |
| virtual void | appendNbrCells (const label tgtCelli, const polyMesh &mesh, const labelUList &visitedTgtCells, DynamicList< label > &nbrTgtCellIDs) const |
| Append target cell neighbour cells to cellIDs list. | |
| virtual bool | initialise (labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, labelListList &tgtToTgtAddr, scalarListList &tgtToTgtWght) const |
Protected Attributes | |
| const polyMesh & | src_ |
| Reference to the source mesh. | |
| const polyMesh & | tgt_ |
| Reference to the target mesh. | |
| scalar | V_ |
| Cell total volume in overlap region [m3]. | |
Static Protected Attributes | |
| static scalar | tolerance_ = 1e-6 |
| Tolerance used in volume overlap calculations. | |
Base class for mesh-to-mesh calculation methods.
Definition at line 47 of file meshToMeshMethod.H.
|
virtual |
Destructor.
Definition at line 228 of file meshToMeshMethod.C.
|
protected |
Return src cell IDs for the overlap region.
Definition at line 40 of file meshToMeshMethod.C.
References cells, Foam::endl(), boundBox::inflate(), boundBox::overlaps(), Foam::Pout, src_, and tgt_.
Referenced by cellVolumeWeightMethod::calculate(), correctedCellVolumeWeightMethod::calculate(), directMethod::calculate(), and mapNearestMethod::calculate().


|
protectedvirtual |
Return the true if cells intersect.
Reimplemented in directMethod.
Definition at line 66 of file meshToMeshMethod.C.
References src_, tgt_, and tolerance_.
Referenced by cellVolumeWeightMethod::findInitialSeeds(), and cellVolumeWeightMethod::setNextCells().

|
protectedvirtual |
Return the intersection volume between two cells.
Definition at line 90 of file meshToMeshMethod.C.
References tetOverlapVolume::cellCellOverlapVolumeMinDecomp(), src_, and tgt_.
Referenced by cellVolumeWeightMethod::calculateAddressing().


|
protectedvirtual |
Return the intersection volume and centroid between two cells.
Definition at line 114 of file meshToMeshMethod.C.
References tetOverlapVolume::cellCellOverlapMomentMinDecomp(), Tuple2< T1, T2 >::first(), Tuple2< T1, T2 >::second(), src_, tgt_, and Foam::Zero.
Referenced by correctedCellVolumeWeightMethod::calculateAddressing().


|
protectedvirtual |
Append target cell neighbour cells to cellIDs list.
Definition at line 149 of file meshToMeshMethod.C.
References UList< T >::contains(), mesh, and DynamicList< T, SizeMin >::push_uniq().
Referenced by cellVolumeWeightMethod::calculateAddressing(), correctedCellVolumeWeightMethod::calculateAddressing(), and mapNearestMethod::findNearestCell().


|
protectedvirtual |
Definition at line 170 of file meshToMeshMethod.C.
References Foam::endl(), Foam::Pout, List< T >::setSize(), src_, and tgt_.
Referenced by cellVolumeWeightMethod::calculate(), correctedCellVolumeWeightMethod::calculate(), directMethod::calculate(), and mapNearestMethod::calculate().


| TypeName | ( | "meshToMeshMethod" | ) |
Run-time type information.
|
static |
Selector.
Definition at line 26 of file meshToMeshMethodNew.C.
References DebugInfo, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInLookup, src(), and tgt().

|
pure virtual |
Calculate addressing and weights and optionally offset vectors.
Implemented in cellVolumeWeightMethod, correctedCellVolumeWeightMethod, directMethod, mapNearestMethod, and waveMethod.
|
inline |
Return const access to the source mesh.
Definition at line 21 of file meshToMeshMethodI.H.
References src_.
Referenced by waveMethod::calculate(), cellVolumeWeightMethod::cellVolumeWeightMethod(), correctedCellVolumeWeightMethod::correctedCellVolumeWeightMethod(), declareRunTimeSelectionTable(), directMethod::directMethod(), mapNearestMethod::mapNearestMethod(), meshToMeshMethod(), New(), cellVolumeWeightMethod::TypeName(), correctedCellVolumeWeightMethod::TypeName(), directMethod::TypeName(), mapNearestMethod::TypeName(), waveMethod::TypeName(), and waveMethod::waveMethod().

|
inline |
Return const access to the target mesh.
Definition at line 27 of file meshToMeshMethodI.H.
References tgt_.
Referenced by waveMethod::calculate(), cellVolumeWeightMethod::cellVolumeWeightMethod(), correctedCellVolumeWeightMethod::correctedCellVolumeWeightMethod(), declareRunTimeSelectionTable(), directMethod::directMethod(), mapNearestMethod::mapNearestMethod(), meshToMeshMethod(), New(), cellVolumeWeightMethod::TypeName(), correctedCellVolumeWeightMethod::TypeName(), directMethod::TypeName(), mapNearestMethod::TypeName(), waveMethod::TypeName(), and waveMethod::waveMethod().

|
inline |
Return const access to the overlap volume.
Definition at line 33 of file meshToMeshMethodI.H.
References V_.
| void writeConnectivity | ( | const polyMesh & | mesh1, |
| const polyMesh & | mesh2, | ||
| const labelListList & | mesh1ToMesh2Addr ) const |
Write the connectivity (debugging).
Definition at line 234 of file meshToMeshMethod.C.
References primitiveMesh::cellCentres(), primitiveMesh::cells(), Foam::endl(), polyMesh::faces(), forAll, UPstream::myProcNo(), IOobject::name(), Foam::name(), primitiveMesh::nCells(), Foam::nl, os(), p, UPstream::parRun(), polyMesh::points(), Foam::Pout, pts, src_, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

|
protected |
Reference to the source mesh.
Definition at line 57 of file meshToMeshMethod.H.
Referenced by directMethod::appendToDirectSeeds(), cellVolumeWeightMethod::calculate(), correctedCellVolumeWeightMethod::calculate(), directMethod::calculate(), mapNearestMethod::calculate(), waveMethod::calculate(), cellVolumeWeightMethod::calculateAddressing(), correctedCellVolumeWeightMethod::calculateAddressing(), directMethod::calculateAddressing(), mapNearestMethod::calculateAddressing(), cellVolumeWeightMethod::findInitialSeeds(), directMethod::findInitialSeeds(), mapNearestMethod::findInitialSeeds(), initialise(), directMethod::intersect(), intersect(), interVol(), interVolAndCentroid(), maskCells(), meshToMeshMethod(), cellVolumeWeightMethod::setNextCells(), mapNearestMethod::setNextNearestCells(), src(), and writeConnectivity().
|
protected |
Reference to the target mesh.
Definition at line 62 of file meshToMeshMethod.H.
Referenced by directMethod::appendToDirectSeeds(), waveMethod::calculate(), cellVolumeWeightMethod::calculateAddressing(), correctedCellVolumeWeightMethod::calculateAddressing(), directMethod::calculateAddressing(), mapNearestMethod::calculateAddressing(), cellVolumeWeightMethod::findInitialSeeds(), directMethod::findInitialSeeds(), mapNearestMethod::findInitialSeeds(), mapNearestMethod::findMappedSrcCell(), initialise(), directMethod::intersect(), intersect(), interVol(), interVolAndCentroid(), maskCells(), meshToMeshMethod(), and tgt().
|
protected |
Cell total volume in overlap region [m3].
Definition at line 67 of file meshToMeshMethod.H.
Referenced by cellVolumeWeightMethod::calculateAddressing(), correctedCellVolumeWeightMethod::calculateAddressing(), directMethod::calculateAddressing(), mapNearestMethod::calculateAddressing(), meshToMeshMethod(), and V().
|
staticprotected |
Tolerance used in volume overlap calculations.
Definition at line 72 of file meshToMeshMethod.H.
Referenced by cellVolumeWeightMethod::calculateAddressing(), correctedCellVolumeWeightMethod::calculateAddressing(), and intersect().