MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Go to the source code of this file.
Defines | |
#define | MBI mb_instance() |
Functions | |
static Interface * | mb_instance () |
int | main (int argc, char **argv) |
#define MBI mb_instance() |
Definition at line 8 of file quads_to_tris_driver.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 14 of file quads_to_tris_driver.cpp.
References ErrorCode, filename, MB_SUCCESS, MBI, and quads_to_tris().
{ if( 2 > argc ) { std::cout << "Need name of input file with quads." << std::endl; return 0; } // load file from input argument ErrorCode result; std::string filename = argv[1]; result = MBI->load_file( filename.c_str() ); if( MB_SUCCESS != result ) { std::cout << "Error reading file." << std::endl; return 1; } result = quads_to_tris( MBI, 0 ); if( MB_SUCCESS != result ) { std::cout << "Error converting to tris." << std::endl; return 1; } // Write the file that has been converted from quads to tris. // Cut off the .h5m int len1 = filename.length(); filename.erase( len1 - 4 ); std::string filename_new = filename + "_tris.h5m"; result = MBI->write_mesh( filename_new.c_str() ); assert( MB_SUCCESS == result ); return 0; }
Interface * mb_instance | ( | ) | [static] |
Definition at line 50 of file quads_to_tris_driver.cpp.
Referenced by regression_ghost_tag_exchange_no_default(), test_delete_entities(), test_elements_on_several_procs(), test_ghost_elements(), test_ghost_polyhedra(), test_ghost_tag_exchange(), test_read(), test_sequences_after_ghosting(), and test_too_few_parts().
{ static Core inst; return &inst; }