22 int main(
int argc,
char* argv[] )
27 std::string pg2file, lndfile, outfile;
29 opts.
addOpt< std::string >(
"land,l",
"phys grid filename", &lndfile );
30 opts.
addOpt< std::string >(
"pg2file,p",
"pg2 mesh file", &pg2file );
31 opts.
addOpt< std::string >(
"output,o",
"output mesh filename", &outfile );
35 std::cout <<
" land file " << lndfile <<
"\n";
36 std::cout <<
"pg2 mesh file: " << pg2file <<
"\n";
37 std::cout <<
"output file: " << outfile <<
"\n";
39 if( lndfile.empty() || pg2file.empty() || outfile.empty() )
62 std::vector< int > globalIdsCells;
63 globalIdsCells.resize( cells.
size() );
66 std::vector< int > globalIdsVerts;
67 globalIdsVerts.resize( verts1.
size() );
72 std::map< int, EntityHandle > gidToCell;
76 gidToCell[globalIdsCells[i]] = *it;
85 for( i = 0; i < (int)verts1.
size(); i++ )
87 int gid = globalIdsVerts[i];
88 landCells.
insert( gidToCell[gid] );