- improves similarity to autoPtr. Simplifies coding.
Example,
tmp<volScalarField> tfield;
// sometime later...
tfield.reset
(
volScalarField::New("myfield", mesh, dimensionedScalar(Zero))
);
- as per tmp, disallow tmpNrc assignment from literal nullptr
- as per autoPtr, allow explicit test as bool (same as valid).
- can be useful when a scalarField has been used to store booleans and
we need to recover a bool directly and deal with potential rounding
issues.
ENH: support "any" as a Switch counterpart to "none"
- now indicate that the dictionary entry is missing, not that it is
an unknown function type.
STYLE: adjust PatchFunction1New.C to have logic structure look similar
- save in META-INFO/build-info for later re-compilation without git.
This improves tracking beyond simply referring to the the patch level.
The information is tagged with an underscore to distinguish from
"real" build information when git is available.
STYLE: improved shell syntax, pushd/popd guards etc.
- Previously, the default mapping method was `planarInterpolation` which was
silently suppressed by the default 'interpolate{R,U,L}=false'.
STYLE: changes:
`0` to `Zero`,
`lookupOrDefault` to `getOrDefault`
improves header documentation
- silently deprecate 'startsWith', 'endsWith' methods
(added in 2016: 2b14360662), in favour of
'starts_with', 'ends_with' methods, corresponding to C++20 and
allowing us to cull then in a few years.
- handle single character versions of starts_with, ends_with.
- add single character version of removeEnd and silently deprecate
removeTrailing which did the same thing.
- drop the const versions of removeRepeated, removeTrailing.
Unused and with potential confusion.
STYLE: use shrink_to_fit(), erase()
Example - create p-rgh from p:
pressure-p-rgh
{
type pressure;
libs (fieldFunctionObjects);
writeControl writeTime;
mode static;
rho rhoInf;
rhoInf 1;
hydrostaticMode subtract;
g (0 -9.81 0);
hRef 0;
}
- the hydrostaticMode entry is optional - setting is shown during construction
- g and/or hRef values are retrieved from the database if not specified