36 std::string inputfile(
"penta3d.h5m" ), outfile(
"penta3d_ch.h5m" ), chunkfile_name, gsmapfile;
38 opts.
addOpt< std::string >(
"input,i",
"input mesh filename", &inputfile );
39 opts.
addOpt< std::string >(
"chunkFile,n",
"chunk file from cam run", &chunkfile_name );
40 opts.
addOpt< std::string >(
"gsMAPfile,g",
"gsmap file", &gsmapfile );
42 opts.
addOpt< std::string >(
"output,o",
"output mesh filename", &outfile );
51 std::cout <<
" opened " << inputfile <<
" with initial h5m data.\n";
63 std::cout <<
" it has " << nodes.
size() <<
" vertices " << edges.
size() <<
" edges " << cells.
size() <<
" cells\n";
66 std::map< int, EntityHandle > vGidHandle;
67 std::map< int, EntityHandle > eGidHandle;
68 std::map< int, EntityHandle > cGidHandle;
69 std::vector< int > gids;
72 gids.resize( nodes.
size() );
77 vGidHandle[gids[i++]] = *vit;
80 gids.resize( edges.
size() );
85 eGidHandle[gids[i++]] = *vit;
88 gids.resize( cells.
size() );
93 cGidHandle[gids[i++]] = *vit;
96 if( chunkfile_name.length() > 0 )
102 inFile.open( chunkfile_name.c_str() );
105 cout <<
"Unable to open chunk file";
113 int proc, lcid, ncols;
114 while( inFile >> proc )
116 inFile >> lcid >> ncols;
118 for( i = 0; i < ncols; i++ )
130 if( gsmapfile.length() > 0 )
136 inFile.open( gsmapfile.c_str() );
139 cout <<
"Unable to open gsmap file";
144 std::string procTagName = gsmapfile +
"_proc";
147 std::string segTagName = gsmapfile +
"_seg";
151 int compid, ngseg, gsize;
152 inFile >> compid >> ngseg >> gsize;
153 for( i = 1; i <= ngseg; i++ )
156 inFile >> start >> len >> pe;
158 for(
int j = 0; j < len; j++ )
171 std::cout <<
" wrote file " << outfile <<
"\n";