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

@ -534,6 +534,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
runTime.functionObjects().off();
# include "createPolyMesh.H"
const word oldInstance = mesh.pointsInstance();
scalar featureAngle(readScalar(IStringStream(args.additionalArgs()[0])()));
@ -693,7 +694,13 @@ int main(int argc, char *argv[])
Info<< "Remaining:" << cellsToCut.size() << endl;
// Write resulting mesh
Info << "Writing refined morphMesh to time " << runTime.value() << endl;
if (overwrite)
{
mesh.setInstance(oldInstance);
}
Info<< "Writing refined morphMesh to time " << runTime.timeName()
<< endl;
mesh.write();
}