41 int main(
int argc,
char** argv )
45 if( NULL ==
mb )
return 1;
47 std::string filename, outfile;
48 outfile = string(
"out.h5m" );
49 if( argc == 1 )
return 0;
50 if( argc > 1 ) filename = string( argv[1] );
51 if( argc > 2 ) outfile = string( argv[2] );
60 cout <<
" number of cells : " << cells.
size() <<
"\n";
74 vector< EntityHandle > newConnec;
75 newConnec.push_back( connec[0] );
78 while(
index < num_verts - 2 )
80 int next_index = (
index + 1 );
81 if( connec[next_index] != newConnec[new_size - 1] )
83 newConnec.push_back( connec[next_index] );
89 if( ( connec[num_verts - 1] != connec[num_verts - 2] ) && ( connec[num_verts - 1] != connec[0] ) )
91 newConnec.push_back( connec[num_verts - 1] );
94 if( new_size < num_verts )
97 modifiedCells.
insert( cell );
99 EntityType type =
MBTRI;
102 else if( new_size == 4 )
104 else if( new_size > 4 )
125 gids.resize( verts.
size() );
130 for(
size_t i = 1; i <= verts.
size(); i++ )
131 gids[i - 1] = (
int)i;
136 cout <<
" wrote file " << outfile <<
" with " << modifiedCells.
size() <<
" modified cells\n";