Improbed Marooney Maneouvre debug message

This commit is contained in:
Hrvoje Jasak 2019-03-15 10:46:57 +00:00
parent 6fe4ba3aa3
commit 85e0d4f65e

View file

@ -1232,6 +1232,8 @@ void Foam::immersedBoundaryPolyPatch::calcCorrectedGeometry() const
const labelList& owner = mesh.faceOwner();
label nMarooneyCells = 0;
forAll (cutCells, cutCellI)
{
const label ccc = cutCells[cutCellI];
@ -1271,16 +1273,31 @@ void Foam::immersedBoundaryPolyPatch::calcCorrectedGeometry() const
// if (mag(curSumSf + ibSf[cutCellI]) > 1e-6*curSumMagSf)
if (mag(curSumSf + ibSf[cutCellI]) > primitiveMesh::closedThreshold_)
{
Info<< "Marooney Maneouvre for cell " << ccc
<< " error: " << mag(curSumSf + ibSf[cutCellI]) << " "
<< " S: " << curSumMagSf
<< " V: " << cutCellVolumes[cutCellI]
<< " Sf: " << ibSf[cutCellI] << endl;
// Info<< "Marooney Maneouvre for cell " << ccc
// << " error: " << mag(curSumSf + ibSf[cutCellI]) << " "
// << " S: " << curSumMagSf
// << " V: " << cutCellVolumes[cutCellI]
// << " Sf: " << ibSf[cutCellI] << endl;
nMarooneyCells++;
// Create IB face to ideally close the cell
ibSf[cutCellI] = -curSumSf;
}
}
if (debug)
{
if (nMarooneyCells > 0)
{
InfoIn
(
"void immersedBoundaryPolyPatch::calcCorrectedGeometry() const"
) << "Marooney Maneouvre used for " << nMarooneyCells
<< " out of " << cutCells.size()
<< endl;
}
}
}