MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Go to the source code of this file.
Defines | |
#define | RR if( moab::MB_SUCCESS != result ) return result |
Functions | |
int | main (int argc, char *argv[]) |
Variables | |
const char * | SPHERE_RADII_TAG_NAME = "SPHERE_RADII" |
#define RR if( moab::MB_SUCCESS != result ) return result |
Definition at line 14 of file sphere_decomp.cpp.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 17 of file sphere_decomp.cpp.
References SphereDecomp::build_sphere_mesh(), ErrorCode, moab::Interface::load_mesh(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, RR, SPHERE_RADII_TAG_NAME, moab::Interface::tag_get_handle(), and moab::Interface::write_mesh().
{ if( argc < 3 ) { std::cout << "Usage: " << argv[0] << " <input_mesh> <output_mesh>" << std::endl; return 0; } // create MOAB moab::Interface* mbImpl = new moab::Core(); // read in mesh moab::ErrorCode result = mbImpl->load_mesh( argv[1] ); if( moab::MB_SUCCESS != result ) { std::cout << "Problems loading mesh." << std::endl; return 1; } moab::Tag sphere_radii_tag = 0; double dum_val = 0.1; result = mbImpl->tag_get_handle( SPHERE_RADII_TAG_NAME, 1, moab::MB_TYPE_DOUBLE, sphere_radii_tag, moab::MB_TAG_DENSE | moab::MB_TAG_CREAT, &dum_val ); if( moab::MB_SUCCESS != result ) { std::cout << "Problem allocating SPHERE_RADII tag." << std::endl; return 1; } SphereDecomp sd( mbImpl ); moab::EntityHandle this_set = 0; result = sd.build_sphere_mesh( SPHERE_RADII_TAG_NAME, &this_set );RR; // write mesh result = mbImpl->write_mesh( argv[2], &this_set, 1 );RR; return 0; }
const char* SPHERE_RADII_TAG_NAME = "SPHERE_RADII" |
Definition at line 12 of file sphere_decomp.cpp.
Referenced by main().