- now report as "min = XX max = YY average = ZZ"
instead of as "min/max/average = XX, YY, ZZ"
this makes it easier to parse any particular value
(eg, with foamLog)
- should use bitSet::set() and not bitSet::operator[] to auto-vivify
out-of-range entries
- use bitSet::test() instead of bitSet::operator[] when testing
non-const variables - circumvents any potential out-of-range issues.
- Since 'bool' and 'Switch' use the _identical_ input mechanism
(ie, both accept true/false, on/off, yes/no, none, 1/0), the main
reason to prefer one or the other is the output.
The output for Switch is as text (eg, "true"), whereas for bool
it is label (0 or 1). If the output is required for a dictionary,
Switch may be appropriate. If the output is not required, or is only
used for Pstream exchange, bool can be more appropriate.
- Always used for optional dictionary entries, since these are individual
values, and not meant to be embedded in a larger stream of tokens.
Methods:
- lookupOrDefault, lookupOrAddDefault, lookupOrDefaultCompat
- readIfPresent, readIfPresentCompat
- Handling mandatory dictionary entries is slightly more complex,
since these may be part of larger stream of tokens, and are often
used in a constructor context. For example,
word modelType(dict.lookup("type"));
Or they are used without a definite context. For example,
dict.lookup("format") >> outputFormat;
Newly introduced methods for mandatory dictionary entries:
- get, getCompat
- read, readCompat
In a constructor or assignment context:
word modelType(dict.get<word>("type"));
outputFormat = dict.lookup("format");
without copy/move (similar to readIfPresent):
dict.read("format", outputFormat);
- improves backward compatibility and more naming consistency.
Retain setMany(iter1, iter2) to avoid ambiguity with the
PackedList::set(index, value) method.
Basic directional refinement:
- only for coordinate aligned meshes
- only for refinementRegions
See the mesh/snappyHexMesh/aerofoilNACA0012_directionalRefinement
tutorial.
- the current working path with replacements for base-level
OpenFOAM env variables such as FOAM_RUN, WM_PROJECT_DIR,
WM_PROJECT_USER_DIR etc
Can be used directly from the command-line or embedded into a
command prompt. For example,
PS1='$(foamPwd)\n\u\$ '
- aliases for user solver/utilities located under "$WM_PROJECT_USER_DIR":
(ufoam, uapp, usol, uutil)