[MOAB-dev] r3756 - MOAB/trunk/src
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Wed Apr 7 15:54:17 CDT 2010
Author: kraftche
Date: 2010-04-07 15:54:17 -0500 (Wed, 07 Apr 2010)
New Revision: 3756
Modified:
MOAB/trunk/src/Skinner.cpp
Log:
fix bugs working with higher-order elements in old no-adjacency skinner
Modified: MOAB/trunk/src/Skinner.cpp
===================================================================
--- MOAB/trunk/src/Skinner.cpp 2010-04-07 20:52:48 UTC (rev 3755)
+++ MOAB/trunk/src/Skinner.cpp 2010-04-07 20:54:17 UTC (rev 3756)
@@ -127,7 +127,7 @@
std::vector<EntityHandle> *adj = NULL;
const EntityHandle *nodes;
int num_nodes;
- ErrorCode result = thisMB->get_connectivity(entity, nodes, num_nodes);
+ ErrorCode result = thisMB->get_connectivity(entity, nodes, num_nodes, true);
assert(MB_SUCCESS == result);
const EntityHandle *iter =
std::min_element(nodes, nodes+num_nodes);
@@ -161,6 +161,10 @@
if(iter == nodes+num_nodes)
return;
+ // should not be setting adjacency lists in ho-nodes
+ assert(TYPE_FROM_HANDLE(entity) == MBPOLYGON ||
+ num_nodes == CN::VerticesPerEntity(TYPE_FROM_HANDLE(entity)));
+
// add this entity to the node
if(thisMB->tag_get_data(mAdjTag, iter, 1, &adj) == MB_SUCCESS && adj != NULL)
{
@@ -347,7 +351,7 @@
EntityHandle sub_conn[32];
std::vector<EntityHandle> tmp_conn_vec;
int num_nodes, num_sub_nodes, num_sides;
- const short *sub_indices;
+ int sub_indices[32];
EntityType sub_type;
// for each source entity
@@ -366,8 +370,8 @@
num_sides = CN::NumSubEntities( type, mTargetDim );
for(int i=0; i<num_sides; i++)
{
- sub_indices = CN::SubEntityVertexIndices( type, mTargetDim, i, sub_type, num_sub_nodes );
- assert(num_sub_nodes <= 32);
+ CN::SubEntityNodeIndices( type, num_nodes, mTargetDim, i, sub_type, num_sub_nodes, sub_indices );
+ assert((size_t)num_sub_nodes <= sizeof(sub_indices)/sizeof(sub_indices[0]));
for(int j=0; j<num_sub_nodes; j++)
sub_conn[j] = conn[sub_indices[j]];
@@ -444,7 +448,7 @@
result = thisMB->create_element(new_type, sub_conn, num_new_nodes,
tmphndl);
assert(MB_SUCCESS == result);
- add_adjacency(tmphndl, sub_conn, num_sub_nodes);
+ add_adjacency(tmphndl, sub_conn, CN::VerticesPerEntity(new_type));
forward_target_entities.insert(tmphndl);
More information about the moab-dev
mailing list