Go to the documentation of this file.
37 correctedCellVolumeWeightMethod,
59 label srcCellI = srcSeedI;
60 label tgtCellI = tgtSeedI;
78 seedCells[srcCellI] = tgtCellI;
87 visitedTgtCells.
clear();
90 nbrTgtCells.
append(tgtCellI);
91 appendNbrCells(tgtCellI, tgt_, visitedTgtCells, nbrTgtCells);
95 tgtCellI = nbrTgtCells.
remove();
96 visitedTgtCells.
append(tgtCellI);
105 if (vol.
first()/srcVol[srcCellI] > tolerance_)
108 srcToTgtAddr[srcCellI].
append(tgtCellI);
110 srcToTgtVec[srcCellI].
append(vol.
second()-tgtCc[tgtCellI]);
112 tgtToSrcAddr[tgtCellI].
append(srcCellI);
114 tgtToSrcVec[tgtCellI].
append(vol.
second()-srcCc[srcCellI]);
116 appendNbrCells(tgtCellI, tgt_, visitedTgtCells, nbrTgtCells);
122 while (!nbrTgtCells.empty());
124 mapFlag[srcCellI] =
false;
138 while (srcCellI != -1);
141 forAll(srcToTgtCellAddr, i)
143 srcToTgtCellAddr[i].
transfer(srcToTgtAddr[i]);
144 srcToTgtCellWght[i].
transfer(srcToTgtWght[i]);
145 srcToTgtCellVec[i].
transfer(srcToTgtVec[i]);
148 forAll(tgtToSrcCellAddr, i)
150 tgtToSrcCellAddr[i].
transfer(tgtToSrcAddr[i]);
151 tgtToSrcCellWght[i].
transfer(tgtToSrcWght[i]);
152 tgtToSrcCellVec[i].
transfer(tgtToSrcVec[i]);
160 forAll(srcToTgtCellAddr, cellI)
162 scalar srcVol = src_.cellVolumes()[cellI];
163 scalar tgtVol =
sum(srcToTgtCellWght[cellI]);
165 if (
mag(srcVol) > ROOTVSMALL &&
mag((tgtVol-srcVol)/srcVol) > 1
e-6)
168 <<
"At cell " << cellI <<
" cc:"
169 << src_.cellCentres()[cellI]
171 <<
" total overlap volume:" << tgtVol
176 forAll(tgtToSrcCellAddr, cellI)
178 scalar tgtVol = tgt_.cellVolumes()[cellI];
179 scalar srcVol =
sum(tgtToSrcCellWght[cellI]);
181 if (
mag(tgtVol) > ROOTVSMALL &&
mag((srcVol-tgtVol)/tgtVol) > 1
e-6)
184 <<
"At cell " << cellI <<
" cc:"
185 << tgt_.cellCentres()[cellI]
187 <<
" total overlap volume:" << srcVol
247 boolList mapFlag(src_.nCells(),
false);
253 label startSeedI = 0;
#define forAll(list, i)
Loop across all elements in list.
const Type2 & second() const
Return second.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
const Type1 & first() const
Return first.
void transfer(List< T > &)
Transfer the contents of the argument List into this 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.
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
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.
virtual void calculate(labelListList &srcToTgtAddr, scalarListList &srcToTgtWght, pointListList &srcToTgtVec, labelListList &tgtToSrcAddr, scalarListList &tgtToSrcWght, pointListList &tgtToSrcVec)
Calculate addressing and weights and optionally offset vectors.
void append(const T &)
Append an element at the end of the list.
void clear()
Clear the addressed list, i.e. set the size to zero.
virtual ~correctedCellVolumeWeightMethod()
Destructor.
Macros for easy insertion into run-time selection tables.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
void setSize(const label)
Reset size of List.
correctedCellVolumeWeightMethod(const correctedCellVolumeWeightMethod &)
Disallow default bitwise copy construct.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Cell-volume-weighted mesh-to-mesh interpolation class.
const dimensionedScalar e
Elementary charge.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
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.
A 2-tuple for storing two objects of different types.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.