![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
read partition file created by a Zoltan process, that used the global ids for identification of entities
/** @example ReadPartFile.cpp
*
* read partition file created by a Zoltan process, that used the global ids for
* identification of entities
*/
#include "moab/Core.hpp"
#include
#include
using namespace moab;
using namespace std;
#ifndef MESH_DIR
#define MESH_DIR "."
#endif
// Note: change the file name below to test a trivial "No such file or directory" error
string test_file_name = string( MESH_DIR ) + string( "/3k-tri-sphere.vtk" );
string part_file_name;
int nparts;
int main( int argc, char** argv )
{
// Get MOAB instance
Interface* mb = new( std::nothrow ) Core;
if( NULL == mb ) return 1;
// Need option handling here for input filename
if( argc > 4 )
{
// User has input a mesh file
test_file_name = argv[1];
part_file_name = argv[2];
nparts = atoi( argv[3] );
}
else
{
cerr << " usage is " << argv[0] << " <#parts>