Go to the documentation of this file.
47 return tgt_.pointInCell
49 src_.cellCentres()[srcCellI],
60 const label startSeedI,
65 const cellList& srcCells = src_.cells();
66 const faceList& srcFaces = src_.faces();
69 for (
label i = startSeedI; i < srcCellIDs.
size(); i++)
71 label srcI = srcCellIDs[i];
75 const point srcCtr(srcCells[srcI].centre(srcPts, srcFaces));
76 label tgtI = tgt_.cellTree().findInside(srcCtr);
90 Pout<<
"could not find starting seed" <<
endl;
103 const label srcSeedI,
104 const label tgtSeedI,
121 label srcCellI = srcSeedI;
122 label tgtCellI = tgtSeedI;
127 srcToTgt[srcCellI].
append(tgtCellI);
128 tgtToSrc[tgtCellI].
append(srcCellI);
131 mapFlag[srcCellI] =
false;
134 V_ += srcVc[srcCellI];
146 while (srcCellI >= 0);
149 forAll(srcToTgtCellAddr, i)
151 srcToTgtCellWght[i] =
scalarList(srcToTgt[i].size(), srcVc[i]);
152 srcToTgtCellAddr[i].
transfer(srcToTgt[i]);
155 forAll(tgtToSrcCellAddr, i)
157 tgtToSrcCellWght[i] =
scalarList(tgtToSrc[i].size(), tgtVc[i]);
158 tgtToSrcCellAddr[i].
transfer(tgtToSrc[i]);
172 const labelList& srcNbr = src_.cellCells()[srcSeedI];
173 const labelList& tgtNbr = tgt_.cellCells()[tgtSeedI];
177 label srcI = srcNbr[i];
179 if (mapFlag[srcI] && (srcTgtSeed[srcI] == -1))
187 label tgtI = tgtNbr[j];
194 srcTgtSeed[srcI] = tgtI;
204 mapFlag[srcI] =
false;
211 srcSeedI = srcSeeds.
remove();
212 tgtSeedI = srcTgtSeed[srcSeedI];
268 boolList mapFlag(src_.nCells(),
false);
274 label startSeedI = 0;
List< scalar > scalarList
A List of scalars.
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.
#define forAll(list, i)
Loop across all elements in list.
virtual ~directMethod()
Destructor.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
virtual void appendToDirectSeeds(boolList &mapFlag, labelList &srcTgtSeed, DynamicList< label > &srcSeeds, label &srcSeedI, label &tgtSeedI) const
Append to list of src mesh seed indices.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Mesh consisting of general polyhedral cells.
Base class for mesh-to-mesh calculation methods.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
void append(const T &)
Append an element at the end of the list.
directMethod(const directMethod &)
Disallow default bitwise copy construct.
Raster intersect(const Raster &rast1, const Raster &rast2)
Macros for easy insertion into run-time selection tables.
virtual bool intersect(const label srcCellI, const label tgtCellI) const
Return the true if cells intersect.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
virtual void calculate(labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, pointListList &srcToTgtVec, labelListList &tgtToSrcAddr, scalarListList &tgtToSrcWght, pointListList &tgtToSrcVec)
Calculate addressing and weights and optionally offset vectors.
prefixOSstream Pout(cout, "Pout")
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
T remove()
Remove and return the top element.
A List with indirect addressing.
void size(const label)
Override size to be inconsistent with allocated storage.
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.
defineTypeNameAndDebug(combustionModel, 0)