Go to the documentation of this file.
40 correctedCellVolumeWeightMethod,
62 label srcCellI = srcSeedI;
63 label tgtCellI = tgtSeedI;
81 seedCells[srcCellI] = tgtCellI;
90 visitedTgtCells.
clear();
93 nbrTgtCells.
append(tgtCellI);
94 appendNbrCells(tgtCellI, tgt_, visitedTgtCells, nbrTgtCells);
98 tgtCellI = nbrTgtCells.remove();
99 visitedTgtCells.
append(tgtCellI);
108 if (vol.
first()/srcVol[srcCellI] > tolerance_)
111 srcToTgtAddr[srcCellI].
append(tgtCellI);
113 srcToTgtVec[srcCellI].
append(vol.
second()-tgtCc[tgtCellI]);
115 tgtToSrcAddr[tgtCellI].
append(srcCellI);
117 tgtToSrcVec[tgtCellI].
append(vol.
second()-srcCc[srcCellI]);
119 appendNbrCells(tgtCellI, tgt_, visitedTgtCells, nbrTgtCells);
125 while (!nbrTgtCells.empty());
127 mapFlag[srcCellI] =
false;
141 while (srcCellI != -1);
144 forAll(srcToTgtCellAddr, i)
146 srcToTgtCellAddr[i].
transfer(srcToTgtAddr[i]);
147 srcToTgtCellWght[i].
transfer(srcToTgtWght[i]);
148 srcToTgtCellVec[i].
transfer(srcToTgtVec[i]);
151 forAll(tgtToSrcCellAddr, i)
153 tgtToSrcCellAddr[i].
transfer(tgtToSrcAddr[i]);
154 tgtToSrcCellWght[i].
transfer(tgtToSrcWght[i]);
155 tgtToSrcCellVec[i].
transfer(tgtToSrcVec[i]);
163 forAll(srcToTgtCellAddr, cellI)
165 scalar srcVol = src_.cellVolumes()[cellI];
166 scalar tgtVol =
sum(srcToTgtCellWght[cellI]);
168 if (
mag(srcVol) > ROOTVSMALL &&
mag((tgtVol-srcVol)/srcVol) > 1
e-6)
171 <<
"At cell " << cellI <<
" cc:"
172 << src_.cellCentres()[cellI]
174 <<
" total overlap volume:" << tgtVol
179 forAll(tgtToSrcCellAddr, cellI)
181 scalar tgtVol = tgt_.cellVolumes()[cellI];
182 scalar srcVol =
sum(tgtToSrcCellWght[cellI]);
184 if (
mag(tgtVol) > ROOTVSMALL &&
mag((srcVol-tgtVol)/tgtVol) > 1
e-6)
187 <<
"At cell " << cellI <<
" cc:"
188 << tgt_.cellCentres()[cellI]
190 <<
" total overlap volume:" << srcVol
242 srcToTgtVec.
setSize(srcToTgtAddr.size());
243 tgtToSrcVec.
setSize(tgtToSrcAddr.size());
250 boolList mapFlag(src_.nCells(),
false);
256 label startSeedI = 0;
int debug
Static debugging option.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
void append(const T &val)
Append an element at the end of the list.
void calculateAddressing(labelListList &srcToTgtCellAddr, scalarListList &srcToTgtCellWght, pointListList &srcToTgtCellVec, labelListList &tgtToSrcCellAddr, scalarListList &tgtToSrcCellWght, pointListList &tgtToSrcCellVec, const label srcSeedI, const label tgtSeedI, const labelList &srcCellIDs, boolList &mapFlag, label &startSeedI)
Calculate the mesh-to-mesh addressing and weights.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
UIndirectList< bool > boolUIndList
UIndirectList of bools.
virtual void calculate(labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, pointListList &srcToTgtVec, labelListList &tgtToSrcAddr, scalarListList &tgtToSrcWght, pointListList &tgtToSrcVec)
Calculate addressing and weights and optionally offset vectors.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
void clear()
Clear the addressed list, i.e. set the size to zero.
void transfer(List< T > &list)
virtual ~correctedCellVolumeWeightMethod()
Destructor.
Macros for easy insertion into run-time selection tables.
correctedCellVolumeWeightMethod(const correctedCellVolumeWeightMethod &)=delete
No copy construct.
Cell-volume-weighted mesh-to-mesh interpolation class.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
Elementary charge.
void clear()
Clear the list, i.e. set size to zero.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
const T2 & second() const noexcept
Return second.
void setSize(const label newSize)
Alias for resize(const label)
defineTypeNameAndDebug(combustionModel, 0)
const T1 & first() const noexcept
Return first.
#define WarningInFunction
Report a warning using Foam::Warning.