Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
DeleteEdges.cpp File Reference
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "moab/CN.hpp"
#include <iostream>
+ Include dependency graph for DeleteEdges.cpp:

Go to the source code of this file.

Macros

#define MESH_DIR   "."
 

Functions

int main (int argc, char **argv)
 

Variables

string test_file_name = string( MESH_DIR ) + string( "/hex01.vtk" )
 
string out_file = string( "outFile.h5m" )
 

Macro Definition Documentation

◆ MESH_DIR

#define MESH_DIR   "."

Definition at line 16 of file DeleteEdges.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 22 of file DeleteEdges.cpp.

23 {
24  if( argc > 1 )
25  {
26  // User has input a mesh file
27  test_file_name = argv[1];
28  }
29  if( argc > 2 )
30  {
31  // User has specified an output file
32  out_file = argv[2];
33  }
34 
35  // Instantiate & load a mesh from a file
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 }

References moab::Core::delete_entities(), ErrorCode, moab::Core::get_entities_by_dimension(), moab::Core::load_mesh(), mb, MB_CHK_ERR, out_file, test_file_name, and moab::Core::write_file().

Variable Documentation

◆ out_file

string out_file = string( "outFile.h5m" )

Definition at line 20 of file DeleteEdges.cpp.

Referenced by main().

◆ test_file_name

string test_file_name = string( MESH_DIR ) + string( "/hex01.vtk" )

Definition at line 19 of file DeleteEdges.cpp.

Referenced by main().