[MOAB-dev] r1449 - in MOAB/trunk: . mhdf/src tools/dagmc
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Fri Dec 7 15:17:55 CST 2007
Author: kraftche
Date: 2007-12-07 15:17:55 -0600 (Fri, 07 Dec 2007)
New Revision: 1449
Modified:
MOAB/trunk/MBOrientedBoxTreeTool.cpp
MOAB/trunk/mhdf/src/tags.c
MOAB/trunk/tools/dagmc/cgm2moab.cc
Log:
bug fixes from Byron
Modified: MOAB/trunk/MBOrientedBoxTreeTool.cpp
===================================================================
--- MOAB/trunk/MBOrientedBoxTreeTool.cpp 2007-12-07 21:10:23 UTC (rev 1448)
+++ MOAB/trunk/MBOrientedBoxTreeTool.cpp 2007-12-07 21:17:55 UTC (rev 1449)
@@ -321,6 +321,8 @@
{
MBErrorCode rval;
int count = sets.size();
+ if (0 == count)
+ return MB_FAILURE;
// calculate box
MBOrientedBox box;
Modified: MOAB/trunk/mhdf/src/tags.c
===================================================================
--- MOAB/trunk/mhdf/src/tags.c 2007-12-07 21:10:23 UTC (rev 1448)
+++ MOAB/trunk/mhdf/src/tags.c 2007-12-07 21:17:55 UTC (rev 1449)
@@ -65,7 +65,7 @@
return sgn == H5T_SGN_NONE ? H5T_NATIVE_UINT : H5T_NATIVE_INT;
else if (sizeof( long ) == size)
return sgn == H5T_SGN_NONE ? H5T_NATIVE_ULONG : H5T_NATIVE_LONG;
- else if (sizeof( long long ) == size)
+ else if (H5Tget_size(H5T_NATIVE_LLONG) == size)
return sgn == H5T_SGN_NONE ? H5T_NATIVE_ULLONG : H5T_NATIVE_LLONG;
mhdf_setFail( status, "Invalid size for integer type: %d", size );
Modified: MOAB/trunk/tools/dagmc/cgm2moab.cc
===================================================================
--- MOAB/trunk/tools/dagmc/cgm2moab.cc 2007-12-07 21:10:23 UTC (rev 1448)
+++ MOAB/trunk/tools/dagmc/cgm2moab.cc 2007-12-07 21:17:55 UTC (rev 1449)
@@ -307,7 +307,7 @@
// Special case for point curve
if (points.size() < 2) {
- if (start_vtx != end_vtx || curve->measure() > GEOMETRY_RESABS) {
+ if (start_vtx != end_vtx || curve->measure() > gqe->get_sme_resabs_tolerance()) {
std::cerr << "Warning: No facetting for curve " << edge->id() << std::endl;
continue;
}
@@ -318,15 +318,15 @@
continue;
}
- const bool closed = (points.front() - points.back()).length() < GEOMETRY_RESABS;
+ const bool closed = (points.front() - points.back()).length() < gqe->get_sme_resabs_tolerance();
if (closed != (start_vtx == end_vtx)) {
std::cerr << "Warning: topology and geometry inconsistant for possibly closed curve "
<< edge->id() << std::endl;
}
// check proximity of vertices to end coordinates
- if ((start_vtx->coordinates() - points.front()).length() > GEOMETRY_RESABS
- || ( end_vtx->coordinates() - points.back() ).length() > GEOMETRY_RESABS) {
+ if ((start_vtx->coordinates() - points.front()).length() > gqe->get_sme_resabs_tolerance()
+ || ( end_vtx->coordinates() - points.back() ).length() > gqe->get_sme_resabs_tolerance()) {
std::cerr << "Warning: vertices not at ends of curve " << edge->id() << std::endl;
}
@@ -392,7 +392,7 @@
CubitVector vpos( data.point_list()[j].x,
data.point_list()[j].y,
data.point_list()[j].z );
- if ((pos - vpos).length_squared() < GEOMETRY_RESABS*GEOMETRY_RESABS) {
+ if ((pos - vpos).length_squared() < gqe->get_sme_resabs_tolerance()*gqe->get_sme_resabs_tolerance()) {
if (verts[j])
std::cerr << "Warning: Coincident vertices in surface " << face->id() << std::endl;
verts[j] = entmap[0][vtx];
More information about the moab-dev
mailing list