Go to the source code of this file.
Function Documentation
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 97 of file main_moab.cpp.
References default_file_name, get_imesh_mesh(), get_native_mesh(), mesh, run_global_smoother(), run_local_smoother(), usage, and MBMesquite::MeshWriter::write_vtk().
{
MBMesquite::MsqPrintError err( cout );
const char* file_name = 0;
bool use_native = false, opts_done = false;
for( int arg = 1; arg < argc; ++arg )
{
if( !opts_done && argv[arg][0] == '-' )
{
if( !strcmp( argv[arg], "-N" ) )
use_native = true;
else if( !strcmp( argv[arg], "--" ) )
opts_done = true;
else
usage();
}
else if( !file_name )
file_name = argv[arg];
else
usage();
}
if( !file_name )
{
file_name = default_file_name.c_str();
cout << "No file specified: using default: " << default_file_name << endl;
}
Mesh* mesh = use_native ? get_native_mesh( file_name ) : get_imesh_mesh( file_name );
if( !mesh )
{
std::cerr << "Failed to load input file. Aborting." << std::endl;
return 1;
}
MeshWriter::write_vtk( mesh, "original.vtk", err );
if( err ) return 1;
cout << "Wrote \"original.vtk\"" << endl;
run_global_smoother( mesh, err );
if( err ) return 1;
mesh = use_native ? get_native_mesh( file_name ) : get_imesh_mesh( file_name );
if( !mesh )
{
std::cerr << "Failed to load input file. Aborting." << std::endl;
return 1;
}
run_local_smoother( mesh, err );
if( err ) return 1;
return 0;
}
Definition at line 77 of file main_moab.cpp.
References default_file_name.
{
cout << "main [-N] [filename]" << endl;
cout << " -N : Use native representation instead of TSTT implementation\n";
cout << " If no file name is specified, will use \"" << default_file_name << '"' << endl;
exit( 1 );
}
Variable Documentation