Skip to content
Snippets Groups Projects
Commit a2995ae0 authored by mattijs's avatar mattijs
Browse files

ENH: decomposePar : allow -constant to override controlDict setting

parent 10d9c8a1
Branches
Tags
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -42,6 +42,9 @@ Usage ...@@ -42,6 +42,9 @@ Usage
@param -copyUniform \n @param -copyUniform \n
Copy any @a uniform directories too. Copy any @a uniform directories too.
@param -constant \n
Override controlDict settings and use constant directory.
@param -fields \n @param -fields \n
Use existing geometry decomposition and convert fields only. Use existing geometry decomposition and convert fields only.
...@@ -119,6 +122,11 @@ int main(int argc, char *argv[]) ...@@ -119,6 +122,11 @@ int main(int argc, char *argv[])
"ifRequired", "ifRequired",
"only decompose geometry if the number of domains has changed" "only decompose geometry if the number of domains has changed"
); );
argList::addBoolOption
(
"constant",
"include the 'constant/' dir in the times list"
);
#include "setRootCase.H" #include "setRootCase.H"
...@@ -139,6 +147,20 @@ int main(int argc, char *argv[]) ...@@ -139,6 +147,20 @@ int main(int argc, char *argv[])
#include "createTime.H" #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; Info<< "Time = " << runTime.timeName() << endl;
// determine the existing processor count directly // determine the existing processor count directly
......
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