making overwrite work

This commit is contained in:
mattijs
2009-02-06 15:12:24 +00:00
parent 510a35b852
commit 9b0bebec00
24 changed files with 139 additions and 59 deletions

View File

@ -58,6 +58,8 @@ int main(int argc, char *argv[])
# include "createTime.H"
runTime.functionObjects().off();
# include "createMesh.H"
const word oldInstance = mesh.pointsInstance();
pointMesh pMesh(mesh);
word cellSetName(args.args()[1]);
@ -177,6 +179,10 @@ int main(int argc, char *argv[])
Pout<< "Refined from " << returnReduce(map().nOldCells(), sumOp<label>())
<< " to " << mesh.globalData().nTotalCells() << " cells." << nl << endl;
if (overwrite)
{
mesh.setInstance(oldInstance);
}
Info<< "Writing mesh to " << runTime.timeName() << endl;
mesh.write();