From c89313fa357c1c5b5fd4e11dc8f05f430e2c1d9a Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 28 Jun 2004 00:56:07 +0000
Subject: [PATCH] optimize netgen mesh import (much much faster now for large
 meshes)

---
 Mesh/3D_Mesh_Netgen.cpp | 12 +++++-------
 doc/texinfo/gmsh.texi   |  6 ++++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Mesh/3D_Mesh_Netgen.cpp b/Mesh/3D_Mesh_Netgen.cpp
index c80f3e7bf4..85bfd9f8a2 100644
--- a/Mesh/3D_Mesh_Netgen.cpp
+++ b/Mesh/3D_Mesh_Netgen.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Mesh_Netgen.cpp,v 1.3 2004-06-27 00:20:25 geuzaine Exp $
+// $Id: 3D_Mesh_Netgen.cpp,v 1.4 2004-06-28 00:56:07 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -76,17 +76,15 @@ Netgen::Netgen(Volume *vol, int importVolumeMesh)
     _vertices = Tree2List(_vol->Vertices);
   }
   else{
-    // Transfert all surface vertices we must *not* add 2 times the
+    // Transfer all surface vertices we must *not* add 2 times the
     // same vertex (the same vertex can belong to several surfaces)
-    _vertices = List_Create(100, 100, sizeof(Vertex*));
+    Tree_T *tree = Tree_Create(sizeof(Vertex*), compareVertex);
     for(int i = 0; i < List_Nbr(_vol->Surfaces); i++) {
       Surface *s;
       List_Read(_vol->Surfaces, i, &s);
-      List_T *vlist = Tree2List(s->Vertices);
-      for(int j = 0; j < List_Nbr(vlist); j++) 
-	List_Insert(_vertices, List_Pointer(vlist, j), compareVertex);
-      List_Delete(vlist);
+      Tree_Unit(tree, s->Vertices);
     }
+    _vertices = Tree2List(tree);
   }
   List_Sort(_vertices, compareVertex);
 
diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi
index a26f8bbb2a..2bf52ca830 100644
--- a/doc/texinfo/gmsh.texi
+++ b/doc/texinfo/gmsh.texi
@@ -1,5 +1,5 @@
 \input texinfo.tex @c -*-texinfo-*-
-@c $Id: gmsh.texi,v 1.120 2004-06-21 20:53:38 geuzaine Exp $
+@c $Id: gmsh.texi,v 1.121 2004-06-28 00:56:07 geuzaine Exp $
 @c
 @c Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 @c
@@ -725,7 +725,9 @@ To see the practical use of such expressions, have a look at the first
 couple of examples in @ref{Tutorial}. Note that, in order to lighten the
 syntax, you can always omit the braces @code{@{@}} enclosing an
 @var{expression-list} if this @var{expression-list} only contains a single
-item.
+item. Also note that a braced @var{expression-list} can be preceded by a
+minus sign in order to change the sign of all the
+@var{expression-list-item}s.
 
 @c .........................................................................
 @c Character expressions
-- 
GitLab