38#ifndef meshToMeshMethod_H
39#define meshToMeshMethod_H
101 const label tgtCelli,
151 const word& methodName,
186 inline scalar
V()
const;
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Base class for mesh-to-mesh calculation methods.
const polyMesh & tgt_
Reference to the target mesh.
scalar V() const
Return const access to the overlap volume.
const polyMesh & src() const
Return const access to the source mesh.
void writeConnectivity(const polyMesh &mesh1, const polyMesh &mesh2, const labelListList &mesh1ToMesh2Addr) const
Write the connectivity (debugging)
const polyMesh & src_
Reference to the source mesh.
static scalar tolerance_
Tolerance used in volume overlap calculations.
virtual scalar interVol(const label srcCelli, const label tgtCelli) const
Return the intersection volume between two cells.
const polyMesh & tgt() const
Return const access to the target mesh.
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.
labelList maskCells() const
Return src cell IDs for the overlap region.
declareRunTimeSelectionTable(autoPtr, meshToMeshMethod, components,(const polyMesh &src, const polyMesh &tgt),(src, tgt))
Declare runtime constructor selection table.
scalar V_
Cell total volume in overlap region [m3].
TypeName("meshToMeshMethod")
Run-time type information.
virtual void calculate(labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, pointListList &srcToTgtVec, labelListList &tgtToSrcAddr, scalarListList &tgtToSrcWght, pointListList &tgtToSrcVec)=0
Calculate addressing and weights and optionally offset vectors.
virtual ~meshToMeshMethod()
Destructor.
virtual bool intersect(const label srcCelli, const label tgtCelli) const
Return the true if cells intersect.
virtual bool initialise(labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, labelListList &tgtToTgtAddr, scalarListList &tgtToTgtWght) const
virtual Tuple2< scalar, point > interVolAndCentroid(const label srcCellI, const label tgtCellI)
Return the intersection volume and centroid between two cells.
static autoPtr< meshToMeshMethod > New(const word &methodName, const polyMesh &src, const polyMesh &tgt)
Selector.
Mesh consisting of general polyhedral cells.
A class for handling words, derived from Foam::string.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.