38 #ifndef meshToMeshMethod_H 39 #define meshToMeshMethod_H 101 const label tgtCelli,
151 const word& methodName,
186 inline scalar
V()
const;
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_
Reference to the source mesh.
declareRunTimeSelectionTable(autoPtr, meshToMeshMethod, components,(const polyMesh &src, const polyMesh &tgt),(src, tgt))
Declare runtime constructor selection table.
scalar V() const
Return const access to the overlap volume.
virtual ~meshToMeshMethod()
Destructor.
void writeConnectivity(const polyMesh &mesh1, const polyMesh &mesh2, const labelListList &mesh1ToMesh2Addr) const
Write the connectivity (debugging)
const polyMesh & src() const
Return const access to the source mesh.
virtual scalar interVol(const label srcCelli, const label tgtCelli) const
Return the intersection volume between two cells.
static scalar tolerance_
Tolerance used in volume overlap calculations.
const polyMesh & tgt() const
Return const access to the target mesh.
A class for handling words, derived from Foam::string.
labelList maskCells() const
Return src cell IDs for the overlap region.
const polyMesh & tgt_
Reference to the target mesh.
virtual bool initialise(labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, labelListList &tgtToTgtAddr, scalarListList &tgtToTgtWght) const
Base class for mesh-to-mesh calculation methods.
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.
virtual Tuple2< scalar, point > interVolAndCentroid(const label srcCellI, const label tgtCellI)
Return the intersection volume and centroid between two cells.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
scalar V_
Cell total volume in overlap region [m3].
Mesh consisting of general polyhedral cells.
TypeName("meshToMeshMethod")
Run-time type information.
virtual bool intersect(const label srcCelli, const label tgtCelli) const
Return the true if cells intersect.
static autoPtr< meshToMeshMethod > New(const word &methodName, const polyMesh &src, const polyMesh &tgt)
Selector.