From e26e8f1032e62ee0ea4c0d7334aa07303bc9e09c Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 8 Jun 2011 12:09:05 +0100 Subject: [PATCH] potentialFoam: added "noFunctionObjects" option --- .../solvers/basic/potentialFoam/potentialFoam.C | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C index 808b964e4f..ceabbca4b3 100644 --- a/applications/solvers/basic/potentialFoam/potentialFoam.C +++ b/applications/solvers/basic/potentialFoam/potentialFoam.C @@ -39,6 +39,12 @@ int main(int argc, char *argv[]) { argList::addBoolOption("writep", "write the final pressure field"); + argList::addBoolOption + ( + "noFunctionObjects", + "do not execute functionObjects" + ); + #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" @@ -51,7 +57,10 @@ int main(int argc, char *argv[]) // Since solver contains no time loop it would never execute // function objects so do it ourselves. - runTime.functionObjects().start(); + if (!args.optionFound("noFunctionObjects")) + { + runTime.functionObjects().start(); + } adjustPhi(phi, U, p); @@ -103,8 +112,10 @@ int main(int argc, char *argv[]) p.write(); } - runTime.functionObjects().end(); - + if (!args.optionFound("noFunctionObjects")) + { + runTime.functionObjects().end(); + } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s"