Map nearest mesh-to-mesh interpolation class. More...
#include <mapNearestMethod.H>


Public Member Functions | |
| TypeName ("mapNearest") | |
| Run-time type information. | |
| mapNearestMethod (const polyMesh &src, const polyMesh &tgt) | |
| Construct from source and target meshes. | |
| virtual | ~mapNearestMethod () |
| Destructor. | |
| virtual void | calculate (labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, pointListList &srcToTgtVec, labelListList &tgtToSrcAddr, scalarListList &tgtToSrcWght, pointListList &tgtToSrcVec) |
| Calculate addressing and weights and optionally offset vectors. | |
| Public Member Functions inherited from meshToMeshMethod | |
| 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. | |
| 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). | |
Protected Member Functions | |
| 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. | |
| 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. | |
| virtual void | findNearestCell (const polyMesh &mesh1, const polyMesh &mesh2, const label cell1, label &cell2) const |
| Find the nearest cell on mesh2 for cell1 on mesh1. | |
| virtual void | setNextNearestCells (label &startSeedI, label &srcCelli, label &tgtCelli, boolList &mapFlag, const labelList &srcCellIDs) const |
| Set the next cells for the marching front algorithm. | |
| virtual label | findMappedSrcCell (const label tgtCelli, const List< DynamicList< label > > &tgtToSrc) const |
| Find a source cell mapped to target cell tgtCelli. | |
| mapNearestMethod (const mapNearestMethod &)=delete | |
| No copy construct. | |
| void | operator= (const mapNearestMethod &)=delete |
| No copy assignment. | |
| Protected Member Functions inherited from meshToMeshMethod | |
| 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 |
Additional Inherited Members | |
| Static Public Member Functions inherited from meshToMeshMethod | |
| static autoPtr< meshToMeshMethod > | New (const word &methodName, const polyMesh &src, const polyMesh &tgt) |
| Selector. | |
| Protected Attributes inherited from meshToMeshMethod | |
| 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 inherited from meshToMeshMethod | |
| static scalar | tolerance_ = 1e-6 |
| Tolerance used in volume overlap calculations. | |
Map nearest mesh-to-mesh interpolation class.
Not volume conservative.
Definition at line 52 of file mapNearestMethod.H.
|
protecteddelete |
No copy construct.
References mapNearestMethod().
Referenced by mapNearestMethod(), and operator=().


Construct from source and target meshes.
Definition at line 331 of file mapNearestMethod.C.
References meshToMeshMethod::src(), and meshToMeshMethod::tgt().

|
virtual |
Destructor.
Definition at line 343 of file mapNearestMethod.C.
|
protectedvirtual |
Find indices of overlapping cells in src and tgt meshes - returns.
true if found a matching pair
Definition at line 38 of file mapNearestMethod.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, PointIndexHit< PointType >::hit(), PointIndexHit< PointType >::index(), Foam::Pout, UList< T >::size(), meshToMeshMethod::src_, and meshToMeshMethod::tgt_.
Referenced by calculate(), and setNextNearestCells().


|
protectedvirtual |
Calculate the mesh-to-mesh addressing and weights.
Definition at line 88 of file mapNearestMethod.C.
References DynamicList< T, SizeMin >::append(), List< T >::append(), DynamicList< T, SizeMin >::clear(), findMappedSrcCell(), findNearestCell(), forAll, Foam::magSqr(), setNextNearestCells(), UList< T >::size(), meshToMeshMethod::src_, meshToMeshMethod::tgt_, List< T >::transfer(), and meshToMeshMethod::V_.
Referenced by calculate().


|
protectedvirtual |
Find the nearest cell on mesh2 for cell1 on mesh1.
Definition at line 200 of file mapNearestMethod.C.
References meshToMeshMethod::appendNbrCells(), UList< T >::back(), primitiveMesh::cellCentres(), Vector< Cmpt >::distSqr(), UList< T >::empty(), DynamicList< T, SizeMin >::pop_back(), and DynamicList< T, SizeMin >::push_back().
Referenced by calculateAddressing().


|
protectedvirtual |
Set the next cells for the marching front algorithm.
Definition at line 239 of file mapNearestMethod.C.
References findInitialSeeds(), forAll, UList< T >::size(), and meshToMeshMethod::src_.
Referenced by calculateAddressing().


|
protectedvirtual |
Find a source cell mapped to target cell tgtCelli.
Definition at line 282 of file mapNearestMethod.C.
References UList< T >::back(), UList< T >::empty(), UList< T >::found(), DynamicList< T, SizeMin >::pop_back(), DynamicList< T, SizeMin >::push_back(), and meshToMeshMethod::tgt_.
Referenced by calculateAddressing().


|
protecteddelete |
| TypeName | ( | "mapNearest" | ) |
Run-time type information.
References meshToMeshMethod::src(), and meshToMeshMethod::tgt().

|
virtual |
Calculate addressing and weights and optionally offset vectors.
Implements meshToMeshMethod.
Definition at line 349 of file mapNearestMethod.C.
References calculateAddressing(), findInitialSeeds(), meshToMeshMethod::initialise(), meshToMeshMethod::maskCells(), and meshToMeshMethod::src_.
