mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: argList::opt method instead of the longer argList::lookupOrDefault
- also replaced a few instances of readIfPresent with opt<> for constant values.
This commit is contained in:
@ -237,7 +237,7 @@ int main(int argc, char *argv[])
|
||||
ensightCase::options caseOpts(format);
|
||||
|
||||
caseOpts.nodeValues(args.found("nodeValues"));
|
||||
caseOpts.width(args.lookupOrDefault<label>("width", 8));
|
||||
caseOpts.width(args.opt<label>("width", 8));
|
||||
caseOpts.overwrite(true); // remove existing output directory
|
||||
|
||||
// Can also have separate directory for lagrangian
|
||||
@ -247,7 +247,7 @@ int main(int argc, char *argv[])
|
||||
// Define sub-directory name to use for EnSight data.
|
||||
// The path to the ensight directory is at case level only
|
||||
// - For parallel cases, data only written from master
|
||||
fileName outputDir = args.lookupOrDefault<word>("name", "EnSight");
|
||||
fileName outputDir = args.opt<word>("name", "EnSight");
|
||||
if (!outputDir.isAbsolute())
|
||||
{
|
||||
outputDir = args.globalPath()/outputDir;
|
||||
|
||||
@ -203,7 +203,7 @@ int main(int argc, char *argv[])
|
||||
//
|
||||
ensightCase::options caseOpts(format);
|
||||
|
||||
caseOpts.width(args.lookupOrDefault<label>("width", 8));
|
||||
caseOpts.width(args.opt<label>("width", 8));
|
||||
caseOpts.overwrite(false); // leave existing output directory
|
||||
|
||||
// Can also have separate directory for lagrangian
|
||||
@ -212,7 +212,7 @@ int main(int argc, char *argv[])
|
||||
// Define sub-directory name to use for EnSight data.
|
||||
// The path to the ensight directory is at case level only
|
||||
// - For parallel cases, data only written from master
|
||||
fileName ensightDir = args.lookupOrDefault<word>("name", "Ensight");
|
||||
fileName ensightDir = args.opt<word>("name", "Ensight");
|
||||
if (!ensightDir.isAbsolute())
|
||||
{
|
||||
ensightDir = args.globalPath()/ensightDir;
|
||||
|
||||
@ -564,8 +564,7 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
regionNames.resize(1);
|
||||
regionNames.first() =
|
||||
args.lookupOrDefault<word>("region", fvMesh::defaultRegion);
|
||||
regionNames.first() = args.opt<word>("region", fvMesh::defaultRegion);
|
||||
}
|
||||
|
||||
|
||||
@ -627,7 +626,7 @@ int main(int argc, char *argv[])
|
||||
// Directory management
|
||||
|
||||
// Sub-directory for output
|
||||
const word vtkDirName = args.lookupOrDefault<word>("name", "VTK");
|
||||
const word vtkDirName = args.opt<word>("name", "VTK");
|
||||
|
||||
const fileName outputDir(runTime.globalPath()/vtkDirName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user