[MOAB-dev] r5999 - in MOAB/trunk: src/parallel test/parallel tools/mbcslam

iulian at mcs.anl.gov iulian at mcs.anl.gov
Wed Feb 13 11:06:40 CST 2013


Author: iulian
Date: 2013-02-13 11:06:39 -0600 (Wed, 13 Feb 2013)
New Revision: 5999

Modified:
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/test/parallel/par_intx_sph.cpp
   MOAB/trunk/tools/mbcslam/CslamUtils.cpp
   MOAB/trunk/tools/mbcslam/Intx2Mesh.cpp
   MOAB/trunk/tools/mbcslam/Intx2Mesh.hpp
   MOAB/trunk/tools/mbcslam/Intx2MeshInPlane.cpp
   MOAB/trunk/tools/mbcslam/Intx2MeshOnSphere.cpp
Log:
issues with the robustness of the intersection
check for duplicated nodes in a new polygon that will get created
add more input options for test of parallel intersection on a sphere, for
input file and the size of the initial cube (that decides the radius of the sphere)
check for NaN in the angle computation, using the trick that a!=a if a is 
NaN (might be compiler dependent); at least for gnu compiler is fine.


Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2013-02-13 17:00:27 UTC (rev 5998)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2013-02-13 17:06:39 UTC (rev 5999)
@@ -8790,7 +8790,7 @@
           {
             double * pj = &pos_from_owner[3*j];
             double dist2 = (pk[0]-pj[0])*(pk[0]-pj[0])+(pk[1]-pj[1])*(pk[1]-pj[1]) + (pk[2]-pj[2])*(pk[2]-pj[2]);
-            if (dist2<tolerance*tolerance)
+            if (dist2<tolerance)
             {
               pk[0]=pj[0]; pk[1]=pj[1]; pk[2]= pj[2];// correct it!
               found =true;

Modified: MOAB/trunk/test/parallel/par_intx_sph.cpp
===================================================================
--- MOAB/trunk/test/parallel/par_intx_sph.cpp	2013-02-13 17:00:27 UTC (rev 5998)
+++ MOAB/trunk/test/parallel/par_intx_sph.cpp	2013-02-13 17:06:39 UTC (rev 5999)
@@ -39,7 +39,10 @@
 #endif
 
 using namespace moab;
-double EPS1=0.2;
+// some input data
+double EPS1=0.2; // this is for box error
+std::string input_mesh_file("Homme_2pt.h5m"); // input file, partitioned correctly
+double CubeSide = 6.; // the above file starts with cube side 6; radius depends on cube side
 void test_intx_in_parallel();
 void test_intx_in_parallel_elem_based();
 
@@ -54,10 +57,18 @@
     int index=1;
     while (index<argc)
     {
-      if (!strcmp( argv[index], "-eps"))
+      if (!strcmp( argv[index], "-eps")) // this is for box error
       {
         EPS1=atof(argv[++index]);
       }
+      if (!strcmp( argv[index], "-input"))
+      {
+        input_mesh_file=argv[++index];
+      }
+      if (!strcmp( argv[index], "-cube"))
+      {
+        CubeSide=atof(argv[++index]);
+      }
       index++;
     }
   }
@@ -81,7 +92,7 @@


More information about the moab-dev mailing list