[MOAB-dev] r5684 - MOAB/trunk/tools/mbcoupler
    iulian at mcs.anl.gov 
    iulian at mcs.anl.gov
       
    Tue Aug  7 15:24:16 CDT 2012
    
    
  
Author: iulian
Date: 2012-08-07 15:24:16 -0500 (Tue, 07 Aug 2012)
New Revision: 5684
Modified:
   MOAB/trunk/tools/mbcoupler/ElemUtil.cpp
   MOAB/trunk/tools/mbcoupler/mbcoupler_test.cpp
Log:
we should differentiate between epsilons used in the coupler.
One epsilon should be used for Newton Raphson iterations, and another epsilon
for errors introduced by curved boundary errors.
Right now, fix the NR epsilon to 1.e-6.
Modified: MOAB/trunk/tools/mbcoupler/ElemUtil.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/ElemUtil.cpp	2012-08-07 19:20:43 UTC (rev 5683)
+++ MOAB/trunk/tools/mbcoupler/ElemUtil.cpp	2012-08-07 20:24:16 UTC (rev 5684)
@@ -434,6 +434,10 @@
   }// Map::set_vertices()
   //
   CartVect Map::ievaluate(const CartVect& x, double tol, const CartVect& x0) const {
+    // TODO: should differentiate between epsilons used for
+    // Newton Raphson iteration, and epsilons used for curved boundary geometry errors
+    // right now, fix the tolerance used for NR
+    tol = 1.0e-6;
     const double error_tol_sqr = tol*tol;
     double det;
     CartVect xi = x0;
@@ -442,7 +446,7 @@
 
     int iters=0;
     while (delta % delta > error_tol_sqr) {
-      if(++iters>50)
+      if(++iters>10)
         throw Map::EvaluationError();
 
       J = jacobian(xi);
@@ -593,9 +597,9 @@
   {
     // linear tet space is a tetra with vertices (0,0,0), (1,0,0), (0,1,0), (0, 0, 1)
     // first check if outside bigger box, then below the plane x+y+z=1
-    return ( xi[0]>=-tol) && (xi[0]<=1.+tol) &&
-        ( xi[1]>=-tol) && (xi[1]<=1.+tol) &&
-        ( xi[2]>-tol) && (xi[2]<=1.+tol) &&
+    return ( xi[0]>=-tol)  &&
+        ( xi[1]>=-tol)  &&
+        ( xi[2]>=-tol)  &&
         ( xi[0]+xi[1]+xi[2] < 1.0+tol);
   }
   // SpectralHex
Modified: MOAB/trunk/tools/mbcoupler/mbcoupler_test.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/mbcoupler_test.cpp	2012-08-07 19:20:43 UTC (rev 5683)
+++ MOAB/trunk/tools/mbcoupler/mbcoupler_test.cpp	2012-08-07 20:24:16 UTC (rev 5684)
@@ -603,7 +603,7 @@
 
 
     // locate those points in the source mesh
-  result = mbc.locate_points(&vpos[0], numPointsOfInterest, 0, 1.e-10);
+  result = mbc.locate_points(&vpos[0], numPointsOfInterest, 0, 5.e-10);
   PRINT_LAST_ERROR;
 
   pointloc_time = MPI_Wtime();
    
    
More information about the moab-dev
mailing list