ENH: use gMinMax() instead of separate gMin(), gMax()

- for reciprocal values, gMinMax() first and then calculate the
  reciprocal, which avoids creating temporaries

STYLE: prefer MinMax to separate min/max accounting

COMP: namespace qualify min/max for deltaT, CourantNo, etc (#3348)
This commit is contained in:
Mark Olesen
2025-04-02 12:01:28 +02:00
parent a7e8a43f4a
commit 01727c84f1
84 changed files with 837 additions and 646 deletions

View File

@ -145,17 +145,22 @@ int main(int argc, char *argv[])
hexRef8 meshCutter(mesh);
// Some stats
Info<< "Read mesh:" << nl
<< " cells:" << mesh.globalData().nTotalCells() << nl
<< " faces:" << mesh.globalData().nTotalFaces() << nl
<< " points:" << mesh.globalData().nTotalPoints() << nl
<< " cellLevel :"
<< " min:" << gMin(meshCutter.cellLevel())
<< " max:" << gMax(meshCutter.cellLevel()) << nl
<< " pointLevel :"
<< " min:" << gMin(meshCutter.pointLevel())
<< " max:" << gMax(meshCutter.pointLevel()) << nl
<< endl;
{
auto cellLimits = gMinMax(meshCutter.cellLevel());
auto pointLimits = gMinMax(meshCutter.pointLevel());
Info<< "Read mesh:" << nl
<< " cells:" << mesh.globalData().nTotalCells() << nl
<< " faces:" << mesh.globalData().nTotalFaces() << nl
<< " points:" << mesh.globalData().nTotalPoints() << nl
<< " cellLevel :"
<< " min:" << cellLimits.min()
<< " max:" << cellLimits.max() << nl
<< " pointLevel :"
<< " min:" << pointLimits.min()
<< " max:" << pointLimits.max() << nl
<< endl;
}
// Maintain 2:1 ratio