From 96f5d1a75a20a9ea81c9008f5df61de87c1f811c Mon Sep 17 00:00:00 2001
From: Emilie Marchandise <emilie.marchandise@uclouvain.be>
Date: Fri, 10 Sep 2010 15:11:47 +0000
Subject: [PATCH]

---
 Geo/GFaceCompound.cpp             |  2 +-
 Mesh/meshGFace.cpp                |  4 ++--
 benchmarks/2d/function_field.geo  |  8 +++----
 benchmarks/2d/square.geo          | 39 ++++++++++++++++++++-----------
 benchmarks/testsuite/linkrods.geo |  2 +-
 5 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp
index 76648d43e0..2dcaabc5d0 100644
--- a/Geo/GFaceCompound.cpp
+++ b/Geo/GFaceCompound.cpp
@@ -1925,7 +1925,7 @@ bool GFaceCompound::checkTopology() const
   if (_interior_loops.size() > 0)    D =  getSizeBB(_U0); 
   int AR1 = (int) checkAspectRatio();
   int AR2 = (int) ceil(H/D);
-  int AR = std::min(AR1, AR2);
+  int AR = std::max(AR1, AR2);
 
   if (G != 0 || Nb < 1){
     correctTopo = false;
diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index 24261361d5..38853d7263 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -789,7 +789,7 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER,
   }
  
   if (Msg::GetVerbosity() == 10){
-    GEdge *ge = new discreteEdge(gf->model(), 1000,0,0);
+    GEdge *ge = new discreteEdge(gf->model(), 1000, 0, 0);
     MElementOctree octree(gf->model());
     printf("Writing voronoi and skeleton.pos \n");
     doc.Voronoi();
@@ -1483,7 +1483,7 @@ void deMeshGFace::operator() (GFace *gf)
 }
 
 // for debugging, change value from -1 to -100;
-int debugSurface = -1; 
+int debugSurface = -100; 
 
 void meshGFace::operator() (GFace *gf)
 {
diff --git a/benchmarks/2d/function_field.geo b/benchmarks/2d/function_field.geo
index 6f9744a883..712eeda107 100644
--- a/benchmarks/2d/function_field.geo
+++ b/benchmarks/2d/function_field.geo
@@ -1,9 +1,9 @@
 
 lc = 0.5;
 Point(1) = {0, 0, 0, lc};
-Point(2) = {1, 0,  0, lc} ;
-Point(3) = {1, 1, 0, lc} ;
-Point(4) = {0, 1, 0, lc} ;
+Point(2) = {10, 0,  0, lc} ;
+Point(3) = {10, 10, 0, lc} ;
+Point(4) = {0, 10, 0, lc} ;
 Line(1) = {1,2} ;
 Line(2) = {3,2} ;
 Line(3) = {3,4} ;
@@ -12,5 +12,5 @@ Line Loop(5) = {4,1,-2,3} ;
 Plane Surface(6) = {5} ;
 
 Field[1] = MathEval;
-Field[1].F = "Cos(2*3.14*x)/5 + 0.21";
+Field[1].F = "1"; //Cos(2*3.14*x)/5 + 0.21";
 Background Field = 1;
diff --git a/benchmarks/2d/square.geo b/benchmarks/2d/square.geo
index 90e3adbf43..6fd3ccf526 100644
--- a/benchmarks/2d/square.geo
+++ b/benchmarks/2d/square.geo
@@ -1,9 +1,19 @@
+//Field[1] = Attractor;
+//Field[1].EdgesList = {1};
+//Field[1].NNodesByEdge = 10;
+//Background Field = 1;
 
-lc=0.3;
-Point(1) = {0, 0, 0,lc};
-Point(2) = {0, 1, 0,lc/1};
-Point(3) = {1, 1, 0,lc/1};
-Point(4) = {1, 0, 0,lc/1};
+Field[1] = MathEval;
+Field[1].F = "1.0"; //0.1*x+0.1";
+Background Field = 1;
+
+//Mesh.CharacteristicLengthFactor=1.0;
+
+lc=0.1;
+Point(1) = {0, 0, 0}; //,lc};
+Point(2) = {0, 10, 0}; //,lc};
+Point(3) = {10, 10, 0}; //,lc};
+Point(4) = {10, 0, 0}; //,lc};
 Line(1) = {2, 3};
 Line(2) = {3, 4};
 Line(3) = {4, 1};
@@ -12,13 +22,14 @@ Line(4) = {1, 2};
 Line Loop(5) = {1, 2, 3, 4};
 Plane Surface(10) = {5};
 
+//----------------------
+
+//Compound Line(10)={1,2,3,4};
+//Compound Surface(100)={10};
+
+Physical Surface(100)={10};
+//Physical Line(200)={10};
+
+
+
 
-Field[1] = Attractor;
-Field[1].EdgesList = {1};
-Field[2] = BoundaryLayer;
-Field[2].DistMax = 0.1;
-Field[2].DistMin = 0.002;
-Background Field = 2;
-Background Field = -1;
-Background Field = 1;
-Background Field = 2;
diff --git a/benchmarks/testsuite/linkrods.geo b/benchmarks/testsuite/linkrods.geo
index 6db316afea..ce3ba14bbb 100644
--- a/benchmarks/testsuite/linkrods.geo
+++ b/benchmarks/testsuite/linkrods.geo
@@ -9,4 +9,4 @@ Volume(2) = {1};
 Field[1] = MathEval;
 Field[1].F = "Cos(2*3.14*(x+y-z))*.05 + .06";
 Background Field = 1;
-Mesh.CharacteristicLengthFactor=1;
+//Mesh.CharacteristicLengthFactor=1;
-- 
GitLab