From 6c0812d62a698815b22818dcd7d30cc09f5a2057 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 26 May 2004 00:33:37 +0000
Subject: [PATCH] - added some progress info during the 2nd order mesh
 generation (so that   the interface does not freeze for too long)

- cosmetic changes to some other progress messages
---
 Mesh/1D_Mesh.cpp      |  4 ++--
 Mesh/2D_Mesh.cpp      | 12 +++++++-----
 Mesh/2D_Recombine.cpp |  5 ++---
 Mesh/3D_Extrude.cpp   |  8 ++++----
 Mesh/3D_Mesh.cpp      |  4 ++--
 Mesh/3D_Mesh_Old.cpp  |  4 ++--
 Mesh/3D_SMesh.cpp     |  4 ++--
 Mesh/SecondOrder.cpp  | 10 ++++++++--
 8 files changed, 29 insertions(+), 22 deletions(-)

diff --git a/Mesh/1D_Mesh.cpp b/Mesh/1D_Mesh.cpp
index bb8b0bb569..725c2c354d 100644
--- a/Mesh/1D_Mesh.cpp
+++ b/Mesh/1D_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 1D_Mesh.cpp,v 1.39 2004-05-25 04:10:04 geuzaine Exp $
+// $Id: 1D_Mesh.cpp,v 1.40 2004-05-26 00:33:37 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -142,7 +142,7 @@ void Maillage_Curve(void *data, void *dummy)
     return;
   }
 
-  Msg(STATUS3, "Meshing Curve %d", c->Num);
+  Msg(STATUS3, "Meshing curve %d", c->Num);
 
   Points = List_Create(10, 10, sizeof(IntPoint));
   c->l = Integration(c->ubeg, c->uend, F_One, Points, 1.e-4);
diff --git a/Mesh/2D_Mesh.cpp b/Mesh/2D_Mesh.cpp
index 03db21b978..6a5455677e 100644
--- a/Mesh/2D_Mesh.cpp
+++ b/Mesh/2D_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Mesh.cpp,v 1.57 2004-05-25 04:10:04 geuzaine Exp $
+// $Id: 2D_Mesh.cpp,v 1.58 2004-05-26 00:33:37 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -804,7 +804,7 @@ void Maillage_Surface(void *data, void *dum)
     Tree_Delete(s->Vertices);
   s->Vertices = Tree_Create(sizeof(Vertex *), compareVertex);
 
-  Msg(STATUS3, "Meshing Surface %d", s->Num);
+  Msg(STATUS3, "Meshing surface %d", s->Num);
 
   if(MeshTransfiniteSurface(s) ||
      MeshEllipticSurface(s) ||
@@ -836,7 +836,7 @@ void Maillage_Surface(void *data, void *dum)
       Mesh_Shewchuk(s);
     
     if(CTX.mesh.nb_smoothing) {
-      Msg(STATUS3, "Mesh smoothing");
+      Msg(STATUS3, "Smoothing surface %d", s->Num);
       tnxe = Tree_Create(sizeof(NXE), compareNXE);
       create_NXE(s->Vertices, s->Simplexes, tnxe);
       for(int i = 0; i < CTX.mesh.nb_smoothing; i++)
@@ -844,9 +844,11 @@ void Maillage_Surface(void *data, void *dum)
       delete_NXE(tnxe);
     }
     
-    if(s->Recombine)
+    if(s->Recombine){
+      Msg(STATUS3, "Recombining surface %d", s->Num);
       Recombine(s->Vertices, s->Simplexes, s->Quadrangles, s->RecombineAngle);
-    
+    }
+
     s->Typ = TypSurface;
     
     if(s->Typ != MSH_SURF_PLAN) {
diff --git a/Mesh/2D_Recombine.cpp b/Mesh/2D_Recombine.cpp
index 28557a7406..d29622abfb 100644
--- a/Mesh/2D_Recombine.cpp
+++ b/Mesh/2D_Recombine.cpp
@@ -1,4 +1,4 @@
-// $Id: 2D_Recombine.cpp,v 1.20 2004-05-25 23:16:26 geuzaine Exp $
+// $Id: 2D_Recombine.cpp,v 1.21 2004-05-26 00:33:37 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -130,7 +130,6 @@ int Recombine(Tree_T * Vertices, Tree_T * Simplexes, Tree_T * Quadrangles,
 
     // Smoothing
     if(CTX.mesh.nb_smoothing) {
-      Msg(STATUS3, "Mesh smoothing");
       tnxe = Tree_Create(sizeof(NXE), compareNXE);
       create_NXE(Vertices, Simplexes, tnxe);
       for(int i = 0; i < CTX.mesh.nb_smoothing; i++)
@@ -163,7 +162,7 @@ int Recombine(Tree_T * Vertices, Tree_T * Simplexes, Tree_T * Quadrangles,
   }
   List_Delete(SimplexesToRemove);
 
-  Msg(STATUS2, "Recombined %d Quadrangles", ntot);
+  Msg(STATUS2, "Recombined %d quadrangles", ntot);
 
   return ntot;
 }
diff --git a/Mesh/3D_Extrude.cpp b/Mesh/3D_Extrude.cpp
index b1a8310bc1..cd5efff80f 100644
--- a/Mesh/3D_Extrude.cpp
+++ b/Mesh/3D_Extrude.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Extrude.cpp,v 1.78 2004-05-25 04:42:02 geuzaine Exp $
+// $Id: 3D_Extrude.cpp,v 1.79 2004-05-26 00:33:37 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -1102,7 +1102,7 @@ int Extrude_Mesh(Tree_T * Volumes)
     if(ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == EXTRUDED_ENTITY) {
       s = FindSurface(ep->geo.Source, THEM);
       if(s) {
-        Msg(STATUS3, "Meshing Volume %d", NUM);
+        Msg(STATUS3, "Meshing volume %d", NUM);
         Extrude_Surface1(s);
       }
     }
@@ -1139,7 +1139,7 @@ int Extrude_Mesh(Tree_T * Volumes)
     if(ep && ep->mesh.ExtrudeMesh && ep->geo.Mode == EXTRUDED_ENTITY) {
       s = FindSurface(ep->geo.Source, THEM);
       if(s) {
-        Msg(STATUS3, "Meshing Volume %d", NUM);
+        Msg(STATUS3, "Meshing volume %d", NUM);
         Extrude_Surface3(s);
       }
     }
@@ -1164,7 +1164,7 @@ int Extrude_Mesh(Tree_T * Volumes)
     Tree_Action(s->Simplexes, Free_NegativeSimplex);
     Tree_Delete(s->Simplexes);
     s->Simplexes = tmp;
-    Msg(STATUS3, "Coherence Surface %d", s->Num);
+    Msg(STATUS3, "Coherence surface %d", s->Num);
     Extrude_Mesh(s);
   }
 
diff --git a/Mesh/3D_Mesh.cpp b/Mesh/3D_Mesh.cpp
index 651258930a..75d0243c12 100644
--- a/Mesh/3D_Mesh.cpp
+++ b/Mesh/3D_Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Mesh.cpp,v 1.59 2004-05-25 04:10:04 geuzaine Exp $
+// $Id: 3D_Mesh.cpp,v 1.60 2004-05-26 00:33:37 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -1034,7 +1034,7 @@ void Maillage_Volume(void *data, void *dum)
 
 #if 0 // this is wrong
     if(CTX.mesh.nb_smoothing) {
-      Msg(STATUS3, "Laplacian smoothing");
+      Msg(STATUS3, "Smoothing volume %d", v->Num);
       tnxe = Tree_Create (sizeof (NXE), compareNXE);
       create_NXE (v->Vertices, v->Simplexes, tnxe);
       for (int i = 0; i < CTX.mesh.nb_smoothing; i++)
diff --git a/Mesh/3D_Mesh_Old.cpp b/Mesh/3D_Mesh_Old.cpp
index 6df782ed05..10da2f8160 100644
--- a/Mesh/3D_Mesh_Old.cpp
+++ b/Mesh/3D_Mesh_Old.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Mesh_Old.cpp,v 1.12 2004-05-25 04:10:04 geuzaine Exp $
+// $Id: 3D_Mesh_Old.cpp,v 1.13 2004-05-26 00:33:37 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -895,7 +895,7 @@ void Maillage_Volume(void *data, void *dum)
 
     if(CTX.mesh.nb_smoothing) {
       /*
-         Msg(STATUS3, "Laplacian smoothing");
+         Msg(STATUS3, "Smoothing volume %d", v->Num);
          tnxe = Tree_Create (sizeof (NXE), compareNXE);
          create_NXE (v->Vertices, v->Simplexes, tnxe);
          for (int i = 0; i < CTX.mesh.nb_smoothing; i++)
diff --git a/Mesh/3D_SMesh.cpp b/Mesh/3D_SMesh.cpp
index 5d7427ca59..3f87cfb036 100644
--- a/Mesh/3D_SMesh.cpp
+++ b/Mesh/3D_SMesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_SMesh.cpp,v 1.22 2004-05-12 22:51:07 geuzaine Exp $
+// $Id: 3D_SMesh.cpp,v 1.23 2004-05-26 00:33:37 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -214,7 +214,7 @@ int MeshTransfiniteVolume(Volume * vol)
   if(List_Nbr(vol->TrsfPoints) != nbp)
     return 0;
 
-  Msg(STATUS3, "Meshing Volume %d", vol->Num);
+  Msg(STATUS3, "Meshing volume %d", vol->Num);
 
   for(i = 0; i < 6; i++)
     G[i] = NULL;
diff --git a/Mesh/SecondOrder.cpp b/Mesh/SecondOrder.cpp
index e96239c2c9..bf5cc43ebf 100644
--- a/Mesh/SecondOrder.cpp
+++ b/Mesh/SecondOrder.cpp
@@ -1,4 +1,4 @@
-// $Id: SecondOrder.cpp,v 1.24 2004-05-25 23:16:27 geuzaine Exp $
+// $Id: SecondOrder.cpp,v 1.25 2004-05-26 00:33:37 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -428,7 +428,9 @@ void Degre1()
 void Degre2_Curve(void *a, void *b)
 {
   Curve *c = *(Curve**)a;
-  if(c->Dirty) return;
+  if(c->Dirty || c->Num < 0) return;
+
+  Msg(STATUS3, "Second order curve %d", c->Num);
 
   edges->AddSimplexTree(c->Simplexes);
   THEC = c;
@@ -441,6 +443,8 @@ void Degre2_Surface(void *a, void *b)
   Surface *s = *(Surface**)a;
   if(s->Dirty) return;
 
+  Msg(STATUS3, "Second order surface %d", s->Num);
+
   edges->AddSimplexTree(s->Simplexes);
   edges->AddQuadrangleTree(s->Quadrangles);
   THEC = NULL;
@@ -456,6 +460,8 @@ void Degre2_Volume(void *a, void *b)
   Volume *v = *(Volume**)a;
   if(v->Dirty) return;
 
+  Msg(STATUS3, "Second order volume %d", v->Num);
+
   edges->AddSimplexTree(v->Simplexes);
   edges->AddHexahedronTree(v->Hexahedra);
   edges->AddPrismTree(v->Prisms);
-- 
GitLab