Go to the documentation of this file. 1
6
7 #include "moab/Core.hpp"
8 #include "moab/Range.hpp"
9 #include "moab/CN.hpp"
10 #include <iostream>
11
12 using namespace moab;
13 using namespace std;
14
15 #ifndef MESH_DIR
16 #define MESH_DIR "."
17 #endif
18
19 string test_file_name = string( MESH_DIR ) + string( "/hex01.vtk" );
20 string out_file = string( "outFile.h5m" );
21
22 int main( int argc, char** argv )
23 {
24 if( argc > 1 )
25 {
26
27 test_file_name = argv[1];
28 }
29 if( argc > 2 )
30 {
31
32 out_file = argv[2];
33 }
34
35
36 Core* mb = new( std::nothrow ) Core;
37 if( NULL == mb ) return 1;
38 ErrorCode rval = mb->load_mesh( test_file_name.c_str() );MB_CHK_ERR( rval );
39
40 Range edges;
41 rval = mb->get_entities_by_dimension( 0, 1, edges );MB_CHK_ERR( rval );
42 rval = mb->delete_entities( edges );MB_CHK_ERR( rval );
43
44 rval = mb->write_file( out_file.c_str() );MB_CHK_ERR( rval );
45 delete mb;
46
47 return 0;
48 }