mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: moveDynamicMesh: add -overwrite option. Fixes #1233.
This commit is contained in:
@ -162,6 +162,7 @@ int main(int argc, char *argv[])
|
||||
"Mesh motion and topological mesh changes utility"
|
||||
);
|
||||
|
||||
#include "addOverwriteOption.H"
|
||||
#include "addRegionOption.H"
|
||||
argList::addBoolOption
|
||||
(
|
||||
@ -180,6 +181,10 @@ int main(int argc, char *argv[])
|
||||
Info<< "Writing VTK files with weights of AMI patches." << nl << endl;
|
||||
}
|
||||
|
||||
const bool overwrite = args.found("overwrite");
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
bool moveMeshOuterCorrectors
|
||||
@ -199,6 +204,15 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (overwrite)
|
||||
{
|
||||
mesh.setInstance(oldInstance);
|
||||
runTime.write();
|
||||
runTime.printExecutionTime(Info);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
mesh.checkMesh(true);
|
||||
|
||||
if (checkAMI)
|
||||
|
||||
Reference in New Issue
Block a user