36 std::cout <<
"Usage: " << argv[0] <<
" <exoII_file_name>" << std::endl;
41 ReadWriteExoII reader( &mdb );
42 ErrorCode result = reader.load_file( argv[1], NULL );
44 std::cout <<
"Result of reading file = " << ( MB_FAILURE == result ?
"FAILURE." :
"SUCCESS." ) << std::endl;
47 int num_nodes = mdb.total_num_nodes();
48 int num_elements = mdb.total_num_elements();
49 std::cout <<
"Total number of nodes, elements read = " << num_nodes <<
", " << num_elements << std::endl;
52 std::vector< MB_MBSet* > blocks, nodesets, sidesets;
53 std::vector< int > block_ids, nodeset_ids, sideset_ids;
54 const std::set< MB_MBSet* >& gms = MB_MBSet::GlobalMBSets();
56 std::set< MB_MBSet* >::const_iterator this_it = gms.begin(), end_it = MB_MBSet::GlobalMBSets().end();
57 MB_MBSet* this_meshset;
59 for( ; this_it != end_it; ++this_it )
62 this_meshset = *this_it;
64 bc_tag = reader.get_block_id( this_meshset );
67 blocks.push_back( this_meshset );
68 block_ids.push_back( bc_tag );
72 bc_tag = reader.get_nodeset_id( this_meshset );
75 nodesets.push_back( this_meshset );
76 nodeset_ids.push_back( bc_tag );
80 bc_tag = reader.get_sideset_id( this_meshset );
83 sidesets.push_back( this_meshset );
84 sideset_ids.push_back( bc_tag );
89 std::cout <<
"Block numbers read: " << std::endl;
91 std::cout << block_ids << std::endl;
93 std::cout <<
"(no blocks)" << std::endl;
95 std::cout <<
"Nodeset numbers read: " << std::endl;
96 if( !nodesets.empty() )
97 std::cout << nodeset_ids << std::endl;
99 std::cout <<
"(no nodesets)" << std::endl;
101 std::cout <<
"Sideset numbers read: " << std::endl;
102 if( !sidesets.empty() )
103 std::cout << sideset_ids << std::endl;
105 std::cout <<
"(no sidesets)" << std::endl;