- 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.
Within decomposeParDict, it is now possible to specify a different
decomposition method, methods coefficients or number of subdomains
for each region individually.
The top-level numberOfSubdomains remains mandatory, since this
specifies the number of domains for the entire simulation.
The individual regions may use the same number or fewer domains.
Any optional method coefficients can be specified in a general
"coeffs" entry or a method-specific one, eg "metisCoeffs".
For multiLevel, only the method-specific "multiLevelCoeffs" dictionary
is used, and is also mandatory.
----
ENH: shortcut specification for multiLevel.
In addition to the longer dictionary form, it is also possible to
use a shorter notation for multiLevel decomposition when the same
decomposition method applies to each level.
- allows changing the format of the sending OPstream at an arbitrary
point in the transmission. The information is passed through the
buffer and the receiving IPstream changes its format accordingly.
This allows a temporary toggling of ASCII/BINARY mid-stream.
- the return value signals if this method handled this particular type
of token. This minor change allows this method to be used as a succinct
prefilter an output token stream. It also provides better encapsulation
of what the particular output stream handles.
Eg,
bool ok = os.write(tok);
if (!ok) // or if (!ok && os.good())
{
os << tok;
}
instead of
if (tok.type() == typeA || tok.type() == typeB || ...)
{
os.write(tok);
}
else
{
os << tok;
}
- when dictionary keywords change between versions, the programmer
can use these compatibility methods to help with migration.
* csearchCompat, foundCompat, lookupEntryPtrCompat, lookupEntryCompat,
lookupCompat, lookupOrDefaultCompat, readIfPresentCompat, ...
They behave like their similarly named base versions, but accept an
additional list of older keyword names augmented by a version number.
For example,
dict.readIfPresentCompat
(
"key", {{"olderName", 1612}, {"veryOld", 240}},
myscalar
);
where 1612=OpenFOAM-v1612, 240=OpenFOAM-v2.4.x, etc.
- If the entry could be directly inserted: a pointer to the inserted entry.
- If a dictionary merge was required: a pointer to the dictionary that
received the entry.
- Return nullptr on any type of insertion failure.
This change is code compatible with existing code since it only alters
a bool return value to be a pointer return value.