- Instead of relying on #inputMode to effect a global change it is now
possible (and recommended) to a temporary change in the inputMode
for the following entry.
#default : provide default value if entry is not already defined
#overwrite : silently remove a previously existing entry
#warn : warn about duplicate entries
#error : error if any duplicate entries occur
#merge : merge sub-dictionaries when possible (the default mode)
This is generally less cumbersome than the switching the global
inputMode. For example to provide a set of fallback values.
#includeIfPresent "user-files"
...
#default value uniform 10;
vs.
#includeIfPresent "user-files"
#inputMode protect
...
value uniform 10;
#inputMode merge // _Assuming_ we actually had this before
These directives can also be used to suppress the normal dictionary
merge semantics:
#overwrite dict { entry val; ... }
- patterns only supported for the final element.
To create an element as a pattern instead of a word, an embedded
string quote (single or double) is used for that element.
Any of the following examples:
"/top/sub/dict/'(p|U).*" 100;
"/top/sub/dict/'(p|U).*'" 100;
"/top/sub/dict/\"(p|U).*" 100;
"/top/sub/dict/\"(p|U).*\"" 100;
are equivalent to the longer form:
top
{
sub
{
dict
{
"(p|U).*" 100;
}
}
}
It is not currently possible to auto-vivify intermediate
dictionaries with patterns.
NOK "/nonexistent.*/value" 100;
OK "/existing.*/value" 100;
- full scoping also works for the #remove directive
#remove "/dict1/subdict2/entry1"
- csearch(), search(), csearchScoped(), searchScoped() methods
can be used to find an entry and also retain the enclosing
dictionary context.
- To avoid ambiguity between a dot (.) as a scoping character and
legal part of a keyword, entries can now be accessed directly using
slash-scoping semantics similar to file-names:
* cfindScopedDictPtr, findScopedDictPtr
- To get or create a sub-dictionary entry:
* makeScopedDictPtr, which behaves similarly to mkdirp in that it
will create any intermediate dictionaries as required.
- this increases the flexibility of the interface
- Add stringOps 'natural' string sorting comparison.
Digits are sorted in their natural order, which means that
(file10.txt file05.txt file2.txt)
are sorted as
(file2.txt file05.txt file10.txt)
STYLE: consistent naming of template parameters for comparators
- Compare for normal binary predicates
- ListComparePredicate for list compare binary predicates
- similar to word::validate to allow stripping of invalid characters
without triggering a FatalError.
- use this validated fileName in Foam::readDir to avoid problems when
a directory contains files with invalid characters in their names
- adjust rmDir to handle filenames with invalid characters
- fileName::equals() static method to compare strings while ignoring
any differences that are solely due to duplicate slashes
- more consistent naming:
* Versions that hold and manage their own memory:
IListStream, OListStream
* Versions that reference a fixed size external memory:
UIListStream, UOListStream
- use List storage instead of DynamicList within OListStream.
Avoids duplicate bookkeeping, more direct handling of resizing.
- makes it accessible for containers that manage their own storage
and derive directly from UList.
- DynamicList::min_size() method to access the corresponding
SizeMin template parameter.
- ensure consistency in the reserve size for the constructor
DynamicList<..> lst(N);
now has identical sizing as
DynamicList<..> lst();
reserve(N);
- The problem occurs when using atof to parse values such as "1e-39"
since this is out of range for a float and _can_ set errno to
ERANGE.
Similar to parsing of integers, now parse with the longest floating
point representation "long double" via strtold (guaranteed to be
part of C++11) and verify against the respective VGREAT values for
overflow. Treat anything smaller than VSMALL to be zero.
- Arrhenius viscocity model for incompressible viscocity.
- energyTransport FO for incompressible single and multiple phase
flows and viscousDissipation fvOption source.
- Tutorial to show the use of energyTransport:
multiphase/multiphaseInterFoam/laminar/mixerVessel2D
- Tutorial to show viscousDissipation:
compressible/rhoPimpleFoam/RAS/TJunction
- reduce coding clutter, avoiding allocated pointers when possible.
IFstream and OFstream continue to use pointers since they handle
compressed files, other streams can do without them.
- these provide a similar functionality to string-streams, but operate
on a externally provided memory buffer which can be used to reduce
the amount of copying.
- classes were previously staged as part of the ADIOS community
repository.
- for convenience and symmetry with OStringStream
STYLE: void return value for stream rewind() methods
- this makes it easier to design bidirectional streams
- low-level beginRaw(), writeRaw(), endRaw() methods.
These can be used to directly add '()' decorators for serial output
or prepare/cleanup parallel buffers.
Used, for example, when outputting indirect lists in binary to avoid.
- used in various places to test if the input can be parsed as a
label/scalar, so warnings tend to flood the output.
- be more explicit when encountering range errors