20 int main(
int argc,
char** argv )
24 if( NULL ==
mb )
return 1;
26 std::string filename, outfile;
27 outfile = string(
"out.h5m" );
28 if( argc == 1 )
return 0;
29 if( argc > 1 ) filename = string( argv[1] );
30 if( argc > 2 ) outfile = string( argv[2] );
39 cout <<
" number of cells : " << cells.
size() <<
"\n";
53 vector< EntityHandle > newConnec;
54 newConnec.push_back( connec[0] );
57 while( index < num_verts - 2 )
59 int next_index = ( index + 1 );
60 if( connec[next_index] != newConnec[new_size - 1] )
62 newConnec.push_back( connec[next_index] );
68 if( ( connec[num_verts - 1] != connec[num_verts - 2] ) && ( connec[num_verts - 1] != connec[0] ) )
70 newConnec.push_back( connec[num_verts - 1] );
73 if( new_size < num_verts )
76 modifiedCells.
insert( cell );
78 EntityType type =
MBTRI;
81 else if( new_size == 4 )
83 else if( new_size > 4 )
104 gids.resize( verts.
size() );
109 for(
size_t i = 1; i <= verts.
size(); i++ )
110 gids[i - 1] = (
int)i;
115 cout <<
" wrote file " << outfile <<
" with " << modifiedCells.
size() <<
" modified cells\n";