![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
00001 /** @example ReadPartFile.cpp
00002 *
00003 * read partition file created by a Zoltan process, that used the global ids for
00004 * identification of entities
00005 */
00006
00007 #include "moab/Core.hpp"
00008 #include
00009 #include
00010
00011 using namespace moab;
00012 using namespace std;
00013
00014 #ifndef MESH_DIR
00015 #define MESH_DIR "."
00016 #endif
00017
00018 // Note: change the file name below to test a trivial "No such file or directory" error
00019 string test_file_name = string( MESH_DIR ) + string( "/3k-tri-sphere.vtk" );
00020 string part_file_name;
00021 int nparts;
00022 int main( int argc, char** argv )
00023 {
00024 // Get MOAB instance
00025 Interface* mb = new( std::nothrow ) Core;
00026 if( NULL == mb ) return 1;
00027
00028 // Need option handling here for input filename
00029 if( argc > 4 )
00030 {
00031 // User has input a mesh file
00032 test_file_name = argv[1];
00033 part_file_name = argv[2];
00034 nparts = atoi( argv[3] );
00035 }
00036 else
00037 {
00038 cerr << " usage is " << argv[0] << " <#parts>