38 #ifndef cellsToCells_H
39 #define cellsToCells_H
134 const label tgtCelli,
266 const label srcCelli,
Pre-declare SubField and related Field type.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Class to calculate interpolative addressing and weights between the cells of two overlapping meshes.
cellsToCells()
Construct null.
tmp< Field< Type > > tgtToSrc(const Field< Type > &tgtFld) const
Interpolate a target cell field to the source with no left.
label singleProcess_
Index of processor that holds all of both sides, or -1.
virtual void normalise(const polyMesh &mesh, labelListList &localOtherCells, scalarListList &weights) const =0
Normalise the weights for a given mesh.
autoPtr< distributionMap > srcMapPtr_
Map from source patch cells to target-local source patch cells.
bool isSingleProcess() const
Is this intersection on a single process?
labelListList tgtLocalSrcCells_
For each target cell, the coupled local source cells.
autoPtr< polyMesh > localTgtMeshPtr_
The target mesh, distributed locally to the source.
virtual ~cellsToCells()
Destructor.
autoPtr< List< remote > > localTgtProcCellsPtr_
When running in parallel, a map from local target cell index to.
labelList maskCells(const polyMesh &srcMesh, const polyMesh &tgtMesh) const
Return src cell IDs for the overlap region.
TypeName("cellsToCells")
Run-time type information.
scalar update(const polyMesh &srcMesh, const polyMesh &tgtMesh)
Update addressing and weights for the given meshes. Returns the.
tmp< Field< Type > > srcToTgt(const Field< Type > &srcFld) const
Interpolate a source cell field to the target with no left.
virtual scalar calculate(const polyMesh &srcMesh, const polyMesh &tgtMesh)=0
Calculate the addressing and weights.
void appendNbrCells(const label tgtCelli, const polyMesh &mesh, const DynamicList< label > &visitedTgtCells, DynamicList< label > &nbrTgtCellIDs) const
Append target cell neighbour cells to cellIDs list.
remote srcToTgtPoint(const polyMesh &tgtMesh, const label srcCelli, const point &p) const
Find the target processor and cell associated with a point in a.
PackedBoolList srcCoupled() const
Return a list indicating which source cells are coupled.
static autoPtr< cellsToCells > New(const word &cellsToCellsType)
Select from name.
labelListList tgtMeshSendCells(const polyMesh &srcMesh, const polyMesh &tgtMesh) const
Determine which target cells need to be sent to the source.
scalarListList tgtWeights_
For each target cell, the coupled source weights.
declareRunTimeSelectionTable(autoPtr, cellsToCells, word,(),())
Declare runtime constructor selection table.
void trimLocalTgt()
Trim the local target addressing and mesh so that communication.
label singleProcess() const
Index of the processor holding all cells of the cellsToCells,.
labelListList srcLocalTgtCells_
For each source cell, the coupled local target cells.
scalarListList srcWeights_
For each source cell, the coupled target weights.
PackedBoolList tgtCoupled() const
Return a list indicating which target cells are coupled.
autoPtr< List< remote > > localSrcProcCellsPtr_
When running in parallel, a map from local source cell index to.
autoPtr< distributionMap > tgtMapPtr_
Map from target patch cells to source-local target patch cells.
void operator=(const cellsToCells &)=delete
Disallow default bitwise assignment.
void initialise(const polyMesh &srcMesh, const polyMesh &tgtMesh)
Initialise the addressing and weights.
static List< remote > distributeMesh(const distributionMap &map, const polyMesh &mesh, autoPtr< polyMesh > &localMeshPtr)
Distribute a mesh given its distribution map.
Class containing processor-to-processor mapping information.
Mesh consisting of general polyhedral cells.
Struct for keeping processor, element (cell, face, point) index.
A class for managing temporary objects.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Macros to ease declaration of run-time selection tables.