71 DynamicList<label> changedFaces(
src.
nFaces()/100 + 100);
72 DynamicList<meshToMeshData> changedFacesInfo(changedFaces.size());
74 List<meshToMeshData> cellData(
src.
nCells());
75 List<meshToMeshData> faceData(
src.
nFaces());
77 meshToMeshData::trackData td(
tgt);
84 changedFacesInfo.clear();
87 for (; startCelli <
src.
nCells(); startCelli++)
89 if (!cellData[startCelli].valid(td))
94 if (!tgtBb.contains(cc))
98 cellData[startCelli] = meshToMeshData(-1);
106 label facei =
src.
cells()[startCelli][0];
107 changedFaces.
append(facei);
108 changedFacesInfo.append(meshToMeshData(tgtCelli));
114 cellData[startCelli] = meshToMeshData(-1);
125 FaceCellWave<meshToMeshData, meshToMeshData::trackData> calc
142 srcToTgtAddr[celli] = cellData[celli].tgtCell();
159 Foam::waveMethod::waveMethod
189 calculate(src_, tgt_, srcToTgt);
190 srcToTgtAddr.
setSize(srcToTgt.size());
191 srcToTgtWght.
setSize(srcToTgt.size());
192 forAll(srcToTgtAddr, celli)
194 srcToTgtAddr[celli].
setSize(1);
195 srcToTgtAddr[celli][0] = srcToTgt[celli];
196 srcToTgtWght[celli].
setSize(1);
197 srcToTgtWght[celli][0] = src_.cellVolumes()[celli];
203 calculate(tgt_, src_, tgtToSrc);
204 tgtToSrcAddr.
setSize(tgtToSrc.size());
205 tgtToSrcWght.
setSize(tgtToSrc.size());
206 forAll(tgtToSrcAddr, celli)
208 tgtToSrcAddr[celli].
setSize(1);
209 tgtToSrcAddr[celli][0] = tgtToSrc[celli];
210 tgtToSrcWght[celli].
setSize(1);
211 tgtToSrcWght[celli][0] = tgt_.cellVolumes()[celli];
void append(const T &val)
Append an element at the end of the list.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
static void calculate(const polyMesh &src, const polyMesh &tgt, labelList &srcToTgtAddr)
Calculate addressing.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool & parRun() noexcept
Test if this a parallel run.
const cellList & cells() const
label nFaces() const noexcept
Number of mesh faces.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Macros for easy insertion into run-time selection tables.
const polyMesh & src() const
Return const access to the source mesh.
#define forAll(list, i)
Loop across all elements in list.
bool returnReduceAnd(const bool value, const label comm=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
void setSize(const label n)
Alias for resize()
const polyMesh & tgt() const
Return const access to the target mesh.
Direct (one-to-one cell correspondence) mesh-to-mesh interpolation class.
const globalMeshData & globalData() const
Return parallel info.
const vectorField & cellCentres() const
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
Base class for mesh-to-mesh calculation methods.
label nTotalCells() const noexcept
Return total number of cells in decomposed mesh.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
const indexedOctree< treeDataCell > & cellTree() const
Return the cell search tree.
vector point
Point is a vector.
label nCells() const noexcept
Number of mesh cells.
virtual ~waveMethod()
Destructor.
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.