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:
Mark Olesen
2018-12-12 12:10:39 +01:00
parent f38190213c
commit 29a5793b5b
70 changed files with 112 additions and 148 deletions

View File

@ -38,10 +38,9 @@ if (args.found("initialiseUBCs"))
// Construct a pressure field
// If it is available read it otherwise construct from the velocity BCs
// converting fixed-value BCs to zero-gradient and vice versa.
word pName("p");
// Update name of the pressure field from the command-line option
args.readIfPresent("pName", pName);
// Allow override from command-line -pName option
const word pName = args.opt<word>("pName", "p");
// Infer the pressure BCs from the velocity
wordList pBCTypes

View File

@ -38,10 +38,9 @@ if (args.found("initialiseUBCs"))
// Construct a pressure field
// If it is available read it otherwise construct from the velocity BCs
// converting fixed-value BCs to zero-gradient and vice versa.
word pName("p");
// Update name of the pressure field from the command-line option
args.readIfPresent("pName", pName);
// Allow override from command-line -pName option
const word pName = args.opt<word>("pName", "p");
// Infer the pressure BCs from the velocity
wordList pBCTypes