Add -noFunctionObjects runtime option. Useful with mergeMeshes when problems with certain functionObjects

This commit is contained in:
Martin Beaudoin 2012-04-06 23:28:50 -04:00
parent 77b93f2a90
commit a93d17fd0f
6 changed files with 29 additions and 12 deletions

View file

@ -4,12 +4,18 @@
( (
Time::controlDictName, Time::controlDictName,
rootDirMaster, rootDirMaster,
caseDirMaster caseDirMaster,
"system",
"constant",
!args.optionFound("noFunctionObjects")
); );
Time runTimeToAdd Time runTimeToAdd
( (
Time::controlDictName, Time::controlDictName,
rootDirToAdd, rootDirToAdd,
caseDirToAdd caseDirToAdd,
"system",
"constant",
!args.optionFound("noFunctionObjects")
); );

View file

@ -7,6 +7,7 @@
argList::validArgs.append("root to add"); argList::validArgs.append("root to add");
argList::validArgs.append("case to add"); argList::validArgs.append("case to add");
argList::validOptions.insert("addRegion", "name"); argList::validOptions.insert("addRegion", "name");
argList::validOptions.insert("noFunctionObjects", "");
argList args(argc, argv); argList args(argc, argv);

View file

@ -191,7 +191,8 @@ Foam::Time::Time
const fileName& rootPath, const fileName& rootPath,
const fileName& caseName, const fileName& caseName,
const word& systemName, const word& systemName,
const word& constantName const word& constantName,
const bool enableFunctionObjects
) )
: :
TimePaths TimePaths
@ -234,7 +235,7 @@ Foam::Time::Time
runTimeModifiable_(true), runTimeModifiable_(true),
readLibs_(controlDict_, "libs"), readLibs_(controlDict_, "libs"),
functionObjects_(*this) functionObjects_(*this, enableFunctionObjects)
{ {
setControls(); setControls();
} }
@ -246,7 +247,8 @@ Foam::Time::Time
const fileName& rootPath, const fileName& rootPath,
const fileName& caseName, const fileName& caseName,
const word& systemName, const word& systemName,
const word& constantName const word& constantName,
const bool enableFunctionObjects
) )
: :
TimePaths TimePaths
@ -290,7 +292,7 @@ Foam::Time::Time
runTimeModifiable_(true), runTimeModifiable_(true),
readLibs_(controlDict_, "libs"), readLibs_(controlDict_, "libs"),
functionObjects_(*this) functionObjects_(*this, enableFunctionObjects)
{ {
setControls(); setControls();
} }
@ -301,7 +303,8 @@ Foam::Time::Time
const fileName& rootPath, const fileName& rootPath,
const fileName& caseName, const fileName& caseName,
const word& systemName, const word& systemName,
const word& constantName const word& constantName,
const bool enableFunctionObjects
) )
: :
TimePaths TimePaths
@ -344,7 +347,7 @@ Foam::Time::Time
runTimeModifiable_(true), runTimeModifiable_(true),
readLibs_(controlDict_, "libs"), readLibs_(controlDict_, "libs"),
functionObjects_(*this) functionObjects_(*this, enableFunctionObjects)
{} {}

View file

@ -187,7 +187,8 @@ public:
const fileName& rootPath, const fileName& rootPath,
const fileName& caseName, const fileName& caseName,
const word& systemName = "system", const word& systemName = "system",
const word& constantName = "constant" const word& constantName = "constant",
const bool enableFunctionObjects = true
); );
//- Construct given dictionary, rootPath and casePath //- Construct given dictionary, rootPath and casePath
@ -197,7 +198,8 @@ public:
const fileName& rootPath, const fileName& rootPath,
const fileName& caseName, const fileName& caseName,
const word& systemName = "system", const word& systemName = "system",
const word& constantName = "constant" const word& constantName = "constant",
const bool enableFunctionObjects = true
); );
//- Construct given endTime, rootPath and casePath //- Construct given endTime, rootPath and casePath
@ -206,7 +208,8 @@ public:
const fileName& rootPath, const fileName& rootPath,
const fileName& caseName, const fileName& caseName,
const word& systemName = "system", const word& systemName = "system",
const word& constantName = "constant" const word& constantName = "constant",
const bool enableFunctionObjects = true
); );

View file

@ -48,6 +48,7 @@ Foam::argList::initValidTables::initValidTables()
validOptions.set("case", "dir"); validOptions.set("case", "dir");
validOptions.set("parallel", ""); validOptions.set("parallel", "");
validParOptions.set("parallel", ""); validParOptions.set("parallel", "");
validOptions.set("noFunctionObjects", "");
Pstream::addValidParOptions(validParOptions); Pstream::addValidParOptions(validParOptions);
} }

View file

@ -8,5 +8,8 @@
( (
Foam::Time::controlDictName, Foam::Time::controlDictName,
args.rootPath(), args.rootPath(),
args.caseName() args.caseName(),
"system",
"constant",
!args.optionFound("noFunctionObjects")
); );