From 952d42512d932a90da9b889f9d275da93b6e7bc7 Mon Sep 17 00:00:00 2001
From: Kutalmis Bercin <kutalmis.bercin@esi-group.com>
Date: Fri, 9 Dec 2022 09:26:48 +0000
Subject: [PATCH] BUG: regionFaModels: report min/max for all processors (fixes
 #2655)

---
 src/regionFaModels/KirchhoffShell/KirchhoffShell.C         | 4 +---
 .../liquidFilm/kinematicThinFilm/kinematicThinFilm.C       | 6 ++----
 .../liquidFilm/liquidFilmModel/liquidFilmModel.C           | 7 +++----
 src/regionFaModels/thermalShell/thermalShell.C             | 2 +-
 4 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/src/regionFaModels/KirchhoffShell/KirchhoffShell.C b/src/regionFaModels/KirchhoffShell/KirchhoffShell.C
index 1bf1f511d7c..675f82f8de3 100644
--- a/src/regionFaModels/KirchhoffShell/KirchhoffShell.C
+++ b/src/regionFaModels/KirchhoffShell/KirchhoffShell.C
@@ -121,9 +121,7 @@ void KirchhoffShell::solveDisplacement()
         }
     }
 
-    Info<< "ws_vibrationShell: "
-        << "min = " << min(w_).value() << ", "
-        << "max = " << max(w_).value() << endl;
+    Info<< w_.name() << " min/max   = " << gMinMax(w_) << endl;
 
     // Restore old time in main time
     w_.oldTime() = w0;
diff --git a/src/regionFaModels/liquidFilm/kinematicThinFilm/kinematicThinFilm.C b/src/regionFaModels/liquidFilm/kinematicThinFilm/kinematicThinFilm.C
index f9a6c60533f..a688527b423 100644
--- a/src/regionFaModels/liquidFilm/kinematicThinFilm/kinematicThinFilm.C
+++ b/src/regionFaModels/liquidFilm/kinematicThinFilm/kinematicThinFilm.C
@@ -162,10 +162,8 @@ void kinematicThinFilm::evolveRegion()
         }
     }
 
-     Info<< "Film h min/max   = " << min(h_).value() << ", "
-        << max(h_).value() << endl;
-
-     Info<< "Film U min/max   = " << max(mag(Uf_)).value() << endl;
+    Info<< "Film h min/max   = " << gMinMax(h_) << nl
+        << "Film mag(U) min/max   = " << gMinMaxMag(Uf_) << endl;
 }
 
 
diff --git a/src/regionFaModels/liquidFilm/liquidFilmModel/liquidFilmModel.C b/src/regionFaModels/liquidFilm/liquidFilmModel/liquidFilmModel.C
index 9dc4615e765..9ef569e71ab 100644
--- a/src/regionFaModels/liquidFilm/liquidFilmModel/liquidFilmModel.C
+++ b/src/regionFaModels/liquidFilm/liquidFilmModel/liquidFilmModel.C
@@ -361,12 +361,11 @@ void liquidFilmModel::info()
     const DimensionedField<scalar, areaMesh>& sf = regionMesh().S();
 
     Info<< indent << "min/max(mag(Uf))    = "
-        << gMin(mag(Uf_.field())) << ", "
-        << gMax(mag(Uf_.field())) << nl
+        << gMinMaxMag(Uf_.field()) << nl
         << indent << "min/max(delta)     = "
-        << gMin(h_.field()) << ", " << gMax(h_.field()) << nl
+        << gMinMax(h_.field()) << nl
         << indent << "coverage           = "
-        << gSum(alpha()().field()*mag(sf.field()))/gSum(mag(sf.field())) <<  nl
+        << gSum(alpha()().field()*mag(sf.field()))/gSumMag(sf.field()) <<  nl
         << indent << "total mass         = "
         << gSum(availableMass_) << nl;
 
diff --git a/src/regionFaModels/thermalShell/thermalShell.C b/src/regionFaModels/thermalShell/thermalShell.C
index c0f58e33f7a..065a1d04632 100644
--- a/src/regionFaModels/thermalShell/thermalShell.C
+++ b/src/regionFaModels/thermalShell/thermalShell.C
@@ -178,7 +178,7 @@ void thermalShell::evolveRegion()
         solveEnergy();
     }
 
-    Info<< "T min/max   = " << min(T_) << ", " << max(T_) << endl;
+    Info<< T_.name() << " min/max   = " << gMinMax(T_) << endl;
 }
 
 
-- 
GitLab