From 653ec821eaeb6475c7d1320a5d367dd1fb7a63ad Mon Sep 17 00:00:00 2001
From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be>
Date: Tue, 18 Mar 2008 14:43:53 +0000
Subject: [PATCH] *** empty log message ***

---
 Mesh/Field.cpp            |  3 ++-
 Mesh/meshGEdge.cpp        |  7 +++++--
 demos/gen_earth_100km.geo | 25 +++----------------------
 3 files changed, 10 insertions(+), 25 deletions(-)

diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp
index 1c2ac8f6d0..bc379f12ff 100644
--- a/Mesh/Field.cpp
+++ b/Mesh/Field.cpp
@@ -1,4 +1,4 @@
-// $Id: Field.cpp,v 1.18 2008-03-18 11:41:08 remacle Exp $
+// $Id: Field.cpp,v 1.19 2008-03-18 14:43:53 remacle Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -192,6 +192,7 @@ class StructuredField : public Field{
 public :
   StructuredField(){
 		options["FileName"]=new FieldOptionString(file_name,&update_needed);
+		data=NULL;
 	}
 	const char *get_name(){
 		return "Structured";
diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp
index f709232732..a6a7bb299e 100644
--- a/Mesh/meshGEdge.cpp
+++ b/Mesh/meshGEdge.cpp
@@ -1,4 +1,4 @@
-// $Id: meshGEdge.cpp,v 1.55 2008-02-17 08:48:01 geuzaine Exp $
+// $Id: meshGEdge.cpp,v 1.56 2008-03-18 14:43:53 remacle Exp $
 //
 // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
 //
@@ -27,6 +27,7 @@
 #include "Message.h"
 #include "List.h"
 #include "Context.h"
+#include "GModel.h"
 
 extern Context_T CTX;
 
@@ -298,7 +299,9 @@ void meshGEdge::operator() (GEdge *ge)
   double t_end = bounds.high();
   
   // first compute the length of the curve by integrating one
-  double length = Integration(ge, t_begin, t_end, F_One, Points, 1.e-8);
+	SPoint3 p1=ge->model()->bounds().min();
+	SPoint3 p2=ge->model()->bounds().max();
+  double length = Integration(ge, t_begin, t_end, F_One, Points, 1.e-8*p1.distance(p2));
   ge->setLength(length);
   // Send a messsage to the GMSH environment
 
diff --git a/demos/gen_earth_100km.geo b/demos/gen_earth_100km.geo
index 874d910108..9155c4dd27 100644
--- a/demos/gen_earth_100km.geo
+++ b/demos/gen_earth_100km.geo
@@ -12,25 +12,6 @@ Field[3].LcMax = 300e3;
 Field[3].DistMax = 1000e3;
 Field[3].DistMin = 300e3;
 Field[3].IField = 2;
-Background Field = 3;
-Background Field = 2;
-Background Field = 3;
-Background Field = 1;
-Background Field = 2;
-Background Field = 3;
-Background Field = 2;
-Background Field = 2;
-Background Field = 2;
-Background Field = 2;
-Background Field = 3;
-Background Field = 2;
-Background Field = -1;
-Background Field = 3;
-Background Field = 1;
-Background Field = 2;
-Background Field = 3;
-Background Field = 2;
-Background Field = 1;
-Background Field = 2;
-Background Field = -1;
-Background Field = 3;
+Field[4]=MathEval;
+Field[4].F = "100e3";
+Background Field = 4;
-- 
GitLab