Honor MULTZ- when determining TRANSZ over pinched cells (pinch all).

Previously, a barrier between cells in Z-direction was only honored if
it was done using MULTZ. We disregarded MULTZ- completely when
calculating the TRANZ over pinched cells.

Now we also take into account MULTZ-.
This commit is contained in:
Markus Blatt 2022-12-13 12:02:17 +01:00
parent 44aaaf319e
commit f6ae49fec4

View File

@ -621,22 +621,24 @@ applyAllZMultipliers_(Scalar& trans,
assert(insideFaceIdx==5); // as insideCartElemIdx < outsideCartElemIdx holds for the Z column
assert(outsideCartElemIdx > insideCartElemIdx);
auto lastCartElemIdx = outsideCartElemIdx - cartDims[0]*cartDims[1];
// Last multiplier
Scalar mult = transMult.getMultiplier(lastCartElemIdx , FaceDir::ZPlus);
// Last multiplier using (Z+)*(Z-)
Scalar mult = transMult.getMultiplier(lastCartElemIdx , FaceDir::ZPlus) *
transMult.getMultiplier(outsideCartElemIdx , FaceDir::ZMinus);
if ( !pinchTop )
{
// pick the smallest multiplier for Z+ while looking down the pillar until reaching the other end of the connection
// While Z- is not all used here.
for(auto cartElemIdx = insideCartElemIdx; cartElemIdx < lastCartElemIdx;
cartElemIdx += cartDims[0]*cartDims[1])
// pick the smallest multiplier using (Z+)*(Z-) while looking down
// the pillar until reaching the other end of the connection
for(auto cartElemIdx = insideCartElemIdx; cartElemIdx < lastCartElemIdx;)
{
mult = std::min(mult, transMult.getMultiplier(cartElemIdx, FaceDir::ZPlus));
auto multiplier = transMult.getMultiplier(cartElemIdx, FaceDir::ZPlus);
cartElemIdx += cartDims[0]*cartDims[1];
multiplier *= transMult.getMultiplier(cartElemIdx, FaceDir::ZMinus);
mult = std::min(mult, multiplier);
}
}
trans *= mult;
applyMultipliers_(trans, outsideFaceIdx, outsideCartElemIdx, transMult);
}
else
{