[MOAB-dev] r5495 - MOAB/trunk/tools/mbcoupler
iulian at mcs.anl.gov
iulian at mcs.anl.gov
Tue Apr 24 17:02:08 CDT 2012
Author: iulian
Date: 2012-04-24 17:02:08 -0500 (Tue, 24 Apr 2012)
New Revision: 5495
Modified:
MOAB/trunk/tools/mbcoupler/Coupler.cpp
MOAB/trunk/tools/mbcoupler/ElemUtil.cpp
Log:
small changes to make it a little faster
spectral element is not done yet
Modified: MOAB/trunk/tools/mbcoupler/Coupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.cpp 2012-04-24 16:50:03 UTC (rev 5494)
+++ MOAB/trunk/tools/mbcoupler/Coupler.cpp 2012-04-24 22:02:08 UTC (rev 5495)
@@ -89,6 +89,8 @@
return result;
}
}
+ else
+ break; // get out of tree building
}
// get the bounding box for local tree
@@ -475,7 +477,7 @@
if(MB_ENTITY_NOT_FOUND==result) //point is outside of myTree's bounding box
return MB_SUCCESS;
if (MB_SUCCESS != result) {
- std::cout << "Problems getting leaf " << std::endl;
+ std::cout << "Problems getting leaf \n";
return result;
}
@@ -496,16 +498,11 @@
//get coordinates of the vertices
std::vector<CartVect> coords_vert(num_connect);
- std::vector<double> coords(3*num_connect);
- result = mbImpl->get_coords(connect, num_connect, &coords[0]);
-
- for(int j = 0; j < num_connect; j++)
- {
- coords_vert[j][0] = coords[3*j];
- coords_vert[j][1] = coords[3*j+1];
- coords_vert[j][2] = coords[3*j+2];
+ result = mbImpl->get_coords(connect, num_connect, &(coords_vert[0][0]));
+ if (MB_SUCCESS != result) {
+ std::cout << "Problems getting coordinates of vertices\n";
+ return result;
}
-
//test to find out in which entity the point is
//get the EntityType and create the appropriate Element::Map subtype
EntityType etype = mbImpl->type_from_handle(*iter);
@@ -572,12 +569,12 @@
int num_connect;
ErrorCode result = mbImpl->get_connectivity(elem, connect, num_connect);
if (MB_SUCCESS != result) {
- free(elemMap);
+ delete elemMap;
return result;
}
More information about the moab-dev
mailing list