24 if( failures ) std::cerr <<
"<<<< " << failures <<
" TESTS FAILED >>>>" << std::endl;
32 const unsigned int NUM_VTX = 1000;
35 std::vector< double > coords( 3 * NUM_VTX );
36 for(
unsigned int i = 0; i < NUM_VTX; i++ )
37 coords[3 * i] = coords[3 * i + 1] = coords[3 * i + 2] = i;
39 Range verts, hexes, faces, edges, dead;
47 std::copy( verts.
begin(), verts.
end(), orig_connect );
48 hexes.
insert( start_hex, start_hex + NUM_VTX / 8 - 1 );
52 int remaining = NUM_VTX;
55 for(
int j = 0; j < remaining; j += step )
61 dead.
insert( start_hex + j / 8 );
62 vit = verts.
erase( vit );
64 hexes.
erase( start_hex + j / 8 );
70 verts.
erase( verts.
begin() + ( step - 5 ), verts.
begin() + ( step + 5 ) );
71 hexes.
erase( hexes.
begin() + ( step / 8 - 5 ), hexes.
begin() + ( step / 8 + 5 ) );
74 double *xcoord, *ycoord, *zcoord;
77 while( vit != verts.
end() )
82 assert( total + count <= (
int)verts.
size() );
83 for(
int i = 0; i < count; i++ )
86 double val = *vit + (double)i - 1.0;
93 for(
int i = 0; i < count; i++ )
100 std::vector< double >
dum( 3 * count );
101 Range dum_verts( *vit, *vit + count - 1 );
103 for(
int i = 0; i < count; i++ )
106 double val = 2.0 * ( *vit + (double)i - 1 );
121 while( hit != hexes.
end() )
128 for(
int i = 0; i < count; i++ )
131 for(
unsigned int j = 0; j < 8; j++ )
132 dum_connect[j] =
first + j;
153 const int NUM_DIMS = 10;
154 HomCoord low( 0, 0, 0 ), high( NUM_DIMS, NUM_DIMS, NUM_DIMS );
157 CHECK( new_box != NULL );
160 Range hexes( start_hex, start_hex + NUM_DIMS * NUM_DIMS * NUM_DIMS - 1 );
165 CHECK_EQUAL( (
int)verts.
size(), (
int)( ( NUM_DIMS + 1 ) * ( NUM_DIMS + 1 ) * ( NUM_DIMS + 1 ) ) );
169 int count, num_connect;
181 const int NUM_VTX = 400;
182 const int NUM_HEX = 50;
185 std::vector< double > coords( 3 * NUM_VTX / 2 );
186 for(
unsigned int i = 0; i < NUM_VTX / 2; i++ )
189 coords[3 * i + 1] = 10 * i;
190 coords[3 * i + 2] = 100 * i;
208 for(
int i = 0; i < NUM_HEX; i += NUM_HEX / 2 )
213 std::copy( vertIter, vertIterEnd, orig_connect );
214 hexes.
insert( current_hex, current_hex + 24 );
215 vertIter += ( NUM_HEX / 2 * 8 );
220 start_hex = hexes.
front();
221 Tag idtag =
moab.globalId_tag();
223 for(
int i = 0; i < NUM_HEX; i++, start_hex++ )
231 start_hex = hexes.
front();
236 while( hit != hexes.
end() )
239 if(
MB_SUCCESS && !connect ) rval = MB_FAILURE;
245 for(
int i = 0; i < count; i++ )
248 for(
unsigned int j = 0; j < 8; j++ )
249 dum_connect[j] =
first + j;
260 while( hit != hexes.
end() )
273 while( hit != ver.
end() )