[MOAB-dev] r1293 - in MOAB/branches/3.0: . tools/mbperf tools/spheredecomp tools/surfplot

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Sep 26 09:48:33 CDT 2007


Author: kraftche
Date: 2007-09-26 09:48:33 -0500 (Wed, 26 Sep 2007)
New Revision: 1293

Modified:
   MOAB/branches/3.0/MBOrientedBoxTreeTool.cpp
   MOAB/branches/3.0/tools/mbperf/mbperf.cpp
   MOAB/branches/3.0/tools/spheredecomp/SphereDecomp.cpp
   MOAB/branches/3.0/tools/surfplot/Makefile.am
   MOAB/branches/3.0/tools/surfplot/surfplot.cpp
Log:
Backport bug fixes to 3.0 branch:
 - surface bug in MBOrientedBoxTreeTool::sphere_intersect_triangles
 - build issues with seldom-used tools



Modified: MOAB/branches/3.0/MBOrientedBoxTreeTool.cpp
===================================================================
--- MOAB/branches/3.0/MBOrientedBoxTreeTool.cpp	2007-09-25 23:48:35 UTC (rev 1292)
+++ MOAB/branches/3.0/MBOrientedBoxTreeTool.cpp	2007-09-26 14:48:33 UTC (rev 1293)
@@ -516,6 +516,7 @@
       rval = get_moab_instance()->get_entities_by_type( node, MBENTITYSET, sets );
       if (!sets.empty())
         surf = sets.front();
+      sets.clear();
     }
     
       // check if sphere intersects box

Modified: MOAB/branches/3.0/tools/mbperf/mbperf.cpp
===================================================================
--- MOAB/branches/3.0/tools/mbperf/mbperf.cpp	2007-09-25 23:48:35 UTC (rev 1292)
+++ MOAB/branches/3.0/tools/mbperf/mbperf.cpp	2007-09-26 14:48:33 UTC (rev 1293)
@@ -525,7 +525,7 @@
   // create a sequence to hold the node coordinates
   // get the current number of entities and start at the next slot
   std::vector<double*> coord_arrays;
-  MBErrorCode result = readMeshIface->get_node_arrays(3, num_verts, 1, vstart, coord_arrays);
+  MBErrorCode result = readMeshIface->get_node_arrays(3, num_verts, 1, 0, vstart, coord_arrays);
   assert(MB_SUCCESS == result && 1 == vstart &&
          coord_arrays[0] && coord_arrays[1] && coord_arrays[2]);
     // memcpy the coordinate data into place
@@ -534,7 +534,7 @@
   memcpy(coord_arrays[2], &coords[2*num_verts], sizeof(double)*num_verts);
   
   MBEntityHandle *conn = 0;
-  result = readMeshIface->get_element_array(num_elems, 8, MBHEX, 1, estart, conn);
+  result = readMeshIface->get_element_array(num_elems, 8, MBHEX, 1, 0, estart, conn);
   assert(MB_SUCCESS == result);
   memcpy(conn, connect, num_elems*8*sizeof(MBEntityHandle));
   result = readMeshIface->update_adjacencies(estart, num_elems, 8, conn);

Modified: MOAB/branches/3.0/tools/spheredecomp/SphereDecomp.cpp
===================================================================
--- MOAB/branches/3.0/tools/spheredecomp/SphereDecomp.cpp	2007-09-25 23:48:35 UTC (rev 1292)
+++ MOAB/branches/3.0/tools/spheredecomp/SphereDecomp.cpp	2007-09-26 14:48:33 UTC (rev 1293)
@@ -431,8 +431,11 @@
   result = mbImpl->get_connectivity(&this_ent, 1, this_conn); RR;
   
     // get relative orientation
+  std::vector<int> conn_tet_indices(this_conn.size());
+  for (size_t i = 0; i < this_conn.size(); ++i)
+    conn_tet_indices[i] = std::find(tet_conn, tet_conn+4, this_conn[i]) - tet_conn;
   int sense, side_no, offset;
-  int success = MBCN::SideNumber(tet_conn, MBTET, &this_conn[0],
+  int success = MBCN::SideNumber(MBTET, &conn_tet_indices[0],
                                  this_conn.size(), dim, side_no, sense, offset);
   if (-1 == success) return MB_FAILURE;
   

Modified: MOAB/branches/3.0/tools/surfplot/Makefile.am
===================================================================
--- MOAB/branches/3.0/tools/surfplot/Makefile.am	2007-09-25 23:48:35 UTC (rev 1292)
+++ MOAB/branches/3.0/tools/surfplot/Makefile.am	2007-09-26 14:48:33 UTC (rev 1293)
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = foreign
 DEFS = $(DEFINES)
-INCLUDES += -I$(top_builddir) -I$(top_builddir)
+INCLUDES += -I$(top_srcdir) -I$(top_builddir)
 bin_PROGRAMS = mbsurfplot
 mbsurfplot_SOURCES = surfplot.cpp
 LDADD = $(top_builddir)/libMOAB.la

Modified: MOAB/branches/3.0/tools/surfplot/surfplot.cpp
===================================================================
--- MOAB/branches/3.0/tools/surfplot/surfplot.cpp	2007-09-25 23:48:35 UTC (rev 1292)
+++ MOAB/branches/3.0/tools/surfplot/surfplot.cpp	2007-09-26 14:48:33 UTC (rev 1293)
@@ -4,6 +4,7 @@
 #include <iostream>
 #include <fstream>
 #include <limits>
+#include <math.h>
 
 /* Exit values */
 #define USAGE_ERROR 1




More information about the moab-dev mailing list