From a61c5e5c4c07f642d52fb1531ff31a93d98823a4 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 14 Feb 2019 12:01:56 +0100
Subject: [PATCH] better messages

---
 Geo/GModel.cpp       | 6 +++---
 Geo/discreteFace.cpp | 8 +++++---
 Mesh/meshGFace.cpp   | 6 ++++--
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp
index 67490a5c96..07f2ed20a9 100644
--- a/Geo/GModel.cpp
+++ b/Geo/GModel.cpp
@@ -1839,12 +1839,12 @@ static void _associateEntityWithElementVertices(GEntity *ge,
 
 void GModel::createGeometryOfDiscreteEntities()
 {
-  Msg::StatusBar(true, "Creating geometry of discrete entities...");
-  double t1 = Cpu();
-
   createTopologyFromMeshNew();
   exportDiscreteGEOInternals();
 
+  Msg::StatusBar(true, "Creating geometry of discrete entities...");
+  double t1 = Cpu();
+
   Msg::Info(" - Creating the geometry of discrete surfaces");
   for(fiter it = firstFace(); it != lastFace(); ++it) {
     if((*it)->geomType() == GEntity::DiscreteSurface)
diff --git a/Geo/discreteFace.cpp b/Geo/discreteFace.cpp
index c58e7e0de1..462d84ba25 100644
--- a/Geo/discreteFace.cpp
+++ b/Geo/discreteFace.cpp
@@ -504,8 +504,9 @@ void discreteFace::mesh(bool verbose)
   std::vector<GEdge *> const tmp = l_edges;
   int _tagtemp = tag();
 
-  Msg::Info("Meshing discrete surface %d: the atlas contains %d map(s)",
-            tag(), _parametrizations.size());
+  Msg::Info("Meshing discrete surface %d: the atlas contains %d map%s",
+            tag(), _parametrizations.size(),
+            (_parametrizations.size() > 1) ? "s" : "");
 
   for(size_t i = 0; i < _parametrizations.size(); i++) {
     //    setTag(i);
@@ -978,7 +979,8 @@ HXTStatus discreteFace::reparametrize_through_hxt()
 				    c2v, boundaries))
     Msg::Warning("Impossible to compute the topology of the %d partitions", nc);
 
-  Msg::Info("Surface %d split in %d part(s)", tag(), _parametrizations.size());
+  Msg::Info("Surface %d split in %d part%s", tag(), _parametrizations.size(),
+            (_parametrizations.size() > 1) ? "s" : "");
 
   for(size_t i = 0; i < _parametrizations.size(); i++) {
     Less_Edge le;
diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index 69e4a07a36..fa0b0d60a8 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -1489,7 +1489,8 @@ bool meshGenerator(GFace *gf, int RECUR_ITER, bool repairSelfIntersecting1dMesh,
   }
 
   if(RECUR_ITER > 0)
-    Msg::Info(":-) All edges recovered after %d iteration(s)", RECUR_ITER);
+    Msg::Info(":-) All edges recovered after %d iteration%s", RECUR_ITER,
+              (RECUR_ITER > 1) ? "s" : "");
 
   Msg::Debug("Boundary edges recovered for surface %d", gf->tag());
 
@@ -2530,7 +2531,8 @@ static bool meshGeneratorPeriodic(GFace *gf, int RECUR_ITER,
   }
 
   if(RECUR_ITER > 0)
-    Msg::Info(":-) All edges recovered after %d iteration(s)", RECUR_ITER);
+    Msg::Info(":-) All edges recovered after %d iteration%s", RECUR_ITER,
+              (RECUR_ITER > 1) ? "s" : "");
 
   // look for a triangle that has a negative node and recursively tag all
   // exterior triangles
-- 
GitLab