mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: changeDictionary: re-added instance option
This commit is contained in:
@ -253,6 +253,12 @@ int main(int argc, char *argv[])
|
|||||||
"file",
|
"file",
|
||||||
"specify an alternative to system/changeDictionaryDict"
|
"specify an alternative to system/changeDictionaryDict"
|
||||||
);
|
);
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"instance",
|
||||||
|
"name",
|
||||||
|
"override instance setting (default is the time name)"
|
||||||
|
);
|
||||||
|
|
||||||
// Add explicit time option
|
// Add explicit time option
|
||||||
timeSelector::addOptions();
|
timeSelector::addOptions();
|
||||||
@ -280,6 +286,7 @@ int main(int argc, char *argv[])
|
|||||||
<< "No times selected." << exit(FatalError);
|
<< "No times selected." << exit(FatalError);
|
||||||
}
|
}
|
||||||
runTime.setTime(times[0], 0);
|
runTime.setTime(times[0], 0);
|
||||||
|
word instance = args.optionLookupOrDefault("instance", runTime.timeName());
|
||||||
|
|
||||||
|
|
||||||
#include "createNamedMesh.H"
|
#include "createNamedMesh.H"
|
||||||
@ -465,7 +472,7 @@ int main(int argc, char *argv[])
|
|||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
fieldName,
|
fieldName,
|
||||||
runTime.timeName(),
|
instance,
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
|
|||||||
Reference in New Issue
Block a user