From 1b7bfcd86489acd0aba5b388af4c31e56ba8836d Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 25 Jan 2008 21:37:08 +0000
Subject: [PATCH] fix optimize_netgen option

---
 Common/CommandLine.cpp | 4 ++--
 Common/Context.h       | 2 +-
 Common/Options.cpp     | 8 ++++----
 Mesh/Generator.cpp     | 4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp
index 86fc0a43f3..749fc1418d 100644
--- a/Common/CommandLine.cpp
+++ b/Common/CommandLine.cpp
@@ -1,4 +1,4 @@
-// $Id: CommandLine.cpp,v 1.112 2008-01-19 22:05:59 geuzaine Exp $
+// $Id: CommandLine.cpp,v 1.113 2008-01-25 21:37:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -242,7 +242,7 @@ void Get_Options(int argc, char *argv[])
         i++;
       }
       else if(!strcmp(argv[i] + 1, "optimize_netgen")) {
-        CTX.mesh.optimizeNetgen = 1;
+        CTX.mesh.optimize_netgen = 1;
         i++;
       }
       else if(!strcmp(argv[i] + 1, "nopopup")) {
diff --git a/Common/Context.h b/Common/Context.h
index d5a5390c3b..dd6e8a60a8 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -178,7 +178,7 @@ public :
     double label_frequency;
     int point_type; // flat or 3D
     double point_size, line_width;
-    int optimize, optimizeNetgen, refine_steps;
+    int optimize, optimize_netgen, refine_steps;
     int quality_type, label_type;
     double quality_inf, quality_sup, radius_inf, radius_sup;
     double scaling_factor, lc_factor, rand_factor, lc_integration_precision,lc_min;
diff --git a/Common/Options.cpp b/Common/Options.cpp
index eaf0ede58e..aac281d825 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.377 2008-01-20 11:20:58 geuzaine Exp $
+// $Id: Options.cpp,v 1.378 2008-01-25 21:37:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -4223,12 +4223,12 @@ double opt_mesh_optimize(OPT_ARGS_NUM)
 double opt_mesh_optimize_netgen(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
-    CTX.mesh.optimize =(int) val;
+    CTX.mesh.optimize_netgen =(int) val;
 #if defined(HAVE_FLTK)
   if(WID && (action & GMSH_GUI))
-    WID->mesh_butt[24]->value(CTX.mesh.optimizeNetgen);
+    WID->mesh_butt[24]->value(CTX.mesh.optimize_netgen);
 #endif
-  return CTX.mesh.optimize;
+  return CTX.mesh.optimize_netgen;
 }
 
 double opt_mesh_refine_steps(OPT_ARGS_NUM)
diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp
index c43979925d..86a2f4b925 100644
--- a/Mesh/Generator.cpp
+++ b/Mesh/Generator.cpp
@@ -1,4 +1,4 @@
-// $Id: Generator.cpp,v 1.129 2008-01-19 22:06:03 geuzaine Exp $
+// $Id: Generator.cpp,v 1.130 2008-01-25 21:37:08 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -403,7 +403,7 @@ void GenerateMesh(int ask)
   if(m->getMeshStatus() == 3 && CTX.mesh.optimize)
     OptimizeMesh(m);
   // Optimize quality with netgen
-  if(m->getMeshStatus() == 3 && CTX.mesh.optimizeNetgen)
+  if(m->getMeshStatus() == 3 && CTX.mesh.optimize_netgen)
     OptimizeMeshNetgen(m);
   
   // Create high order elements
-- 
GitLab