- waitForSlave now return a Time::stopAtControls enumeration:
unknown: when lockfile has no specially recognized content.
endTime: when lockfile contains "status=done"
writeNow: when lockfile contains "action=writeNow"
nextWrite: when lockfile contains "action=nextWrite"
noWriteNow: when lockfile contains "action=noWriteNow"
These values can be used by the caller to terminate the master
(OpenFOAM) as desired in response to information placed there by the
slave process.
- expose the names of write and stopAt controls for reuse elsewhere and
provide a stopAtControls enum for 'unknown'
- track the requested number of sub-cycles (was previously a bool)
- the readList<T>(Istream&) function was introduced to handle command
-options with either a single or a list value, but was also used for
the #remove dictionary directive. However, the parsing was fragile
if the list did not start with a '('.
Now handle command-line arg/option list directly (via ITstream)
and #remove with special-purpose reading of a string or word list.
This removes ambiguity and reduces potential future problems.
STYLE: use ITstream instead of IStringStream for command-line lookups
- parses directly to a tokenList without a string copy.
- unknown options or missing option values now emit a shorter message
without the entire usage. This makes it easier to identify the errors
and is better aligned with the behaviour of GNU system tools.
====
$ simpleFoam -case
Using: OpenFOAM-plus (see www.OpenFOAM.com)
Build: plus-01234
Error: option '-case' requires an argument
See 'simpleFoam -help' for usage
====
- provide for reduced (-help) and full (-help-full) usage information.
In many cases the reduced usage provided sufficient and easier
to find the information.
- make -srcDoc an alias for -doc-source
- no warnings about option aliases for future dates.
- split now optionally retains empty substrings.
Added split on fixed field width.
- Foam::name() now formats directly into string buffer, which a
removes one layer of copying and also avoids using a non-constexpr
in the temporary.
STYLE: explicit type narrowing on zero-padded output for ensight
- allows (for example) splitting a user string on whitespace and
passing this to system as a list of arguments, thus bypassing any
implicit use of 'sh'.
- system() with optional background, for spawning processes.
- this makes them applicable to Foam::string, Foam::word etc
ENH: improvements to CStringList
- add strings() sublist variant which can be useful when handling
command arguments separately
- add construct from SubStrings.
- in rare cases we may wish to have command-line arguments that are
non-mandatory. This can now be reflected in the usage output, provided
that the argList::nonMandatoryArgs() has been used.
- added setRootCaseNonMandatoryArgs.H that applies the
argList::nonMandatoryArgs() settings and otherwise performs largely
as per setRootCase.H, except that the check for mandatory arguments
is deferred to later user code.
- constructor for empty cell/face/point Zones, with contents to be
transferred in later.
- ZoneMesh::operator(const word&) to return existing zone or a new empty one.
- this provides a better typesafe means of locating predefined cell
models than relying on strings. The lookup is now ptr() or ref()
directly. The lookup functions behave like on-demand singletons when
loading "etc/cellModels".
Functionality is now located entirely in cellModel but a forwarding
version of cellModeller is provided for API (but not ABI) compatibility
with older existing user code.
STYLE: use constexpr for cellMatcher constants
- warn or fatal if Pstream::init or Pstream::exit are called multiple
times.
- additional Pstream::initNull method as failsafe to initialize MPI
when the underlying OpenFOAM process is not running in parallel but
the application still needs MPI.
- Pstream::exit() can now also be called without having used MPI::init(),
which means it can be used to cleanup serial process or for
applications that used the special purpose Pstream::initNull()
mechanism.
- the dictionary-driven variant of stitchMesh allows sequential
application of 'stitch' operation with requiring intermediate
writing to disk.
- Without arguments:
* stitchMesh uses a system/stitchMeshDict or -dict dict
- With arguments:
* master/slave patches specified on the command-line as in previous
versions.