Commit a2995ae0 authored by mattijs's avatar mattijs
Browse files

ENH: decomposePar : allow -constant to override controlDict setting

parent 10d9c8a1
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -42,6 +42,9 @@ Usage
@param -copyUniform \n
Copy any @a uniform directories too.
@param -constant \n
Override controlDict settings and use constant directory.
@param -fields \n
Use existing geometry decomposition and convert fields only.
......@@ -119,6 +122,11 @@ int main(int argc, char *argv[])
"ifRequired",
"only decompose geometry if the number of domains has changed"
);
argList::addBoolOption
(
"constant",
"include the 'constant/' dir in the times list"
);
#include "setRootCase.H"
......@@ -139,6 +147,20 @@ int main(int argc, char *argv[])
#include "createTime.H"
// Allow -constant to override controlDict settings.
if (args.optionFound("constant"))
{
instantList timeDirs = timeSelector::select0(runTime, args);
if (runTime.timeName() != runTime.constant())
{
FatalErrorIn(args.executable())
<< "No '" << runTime.constant() << "' time present." << endl
<< "Valid times are " << runTime.times()
<< exit(FatalError);
}
}
Info<< "Time = " << runTime.timeName() << endl;
// determine the existing processor count directly
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment