8 int main(
int argc,
char* argv[] )
13 std::string inputfile, outfile(
"out.h5m" ), physgridfile, variable_name;
15 opts.
addOpt< std::string >(
"input,i",
"input mesh filename", &inputfile );
16 opts.
addOpt< std::string >(
"output,o",
"output mesh filename", &outfile );
17 opts.
addOpt< std::string >(
"phys,p",
"phys grid solution filename", &physgridfile );
18 opts.
addOpt< std::string >(
"var,v",
"variable to extract and add to output file", &variable_name );
22 if( inputfile.empty() )
34 cout <<
" opened " << inputfile <<
" with initial h5m data.\n";
46 std::vector< int > gids;
47 gids.resize( verts.
size() );
49 std::vector< double > valsTag;
50 valsTag.resize( verts.
size() );
56 std::map< int, double > valsByID;
57 for(
int i = 0; i < (int)gids.size(); i++ )
58 valsByID[gids[i]] = valsTag[i];
61 std::vector< int > cellsIds;
62 cellsIds.resize( cells.
size() );
64 for(
int i = 0; i < (int)cells.
size(); i++ )
66 valsTag[i] = valsByID[cellsIds[i]];