diff --git a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C index 9b9ecdf0d2..d09b83dbcc 100644 --- a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C +++ b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,17 +55,30 @@ int main(int argc, char *argv[]) ( "deltaT", "time", - "Override deltaT for accelerated motion" + "Override deltaT (eg, for accelerated motion)" + ); + + argList::addOption + ( + "endTime", + "time", + "Override endTime (eg, for shorter tests)" ); #include "setRootCase.H" #include "createTime.H" #include "createNamedMesh.H" - scalar deltaT = 0; - if (args.readIfPresent("deltaT", deltaT)) + scalar timeVal = 0; + if (args.readIfPresent("deltaT", timeVal)) { - runTime.setDeltaT(deltaT); + runTime.setDeltaT(timeVal); + } + + if (args.readIfPresent("endTime", timeVal)) + { + runTime.stopAt(Time::stopAtControls::saEndTime); + runTime.setEndTime(timeVal); } autoPtr motionPtr = motionSolver::New(mesh);