OpenFOAM.org commits for
src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions
were reviewed.
The parts of the commits made by OpenFOAM.org removing various code
duplications across wall functions were picked up by keeping the remaining
functionalities the same.
The duplications were mainly due to:
- wall function model coefficients
- yPlusLam(), checkPatch(), write() methods
The duplications were united under the base nutWallFunction.
- since a zero-sized FixedList is disallowed, the accessors to the
first/last elements are always known.
This allows Pair second() to be noexcept as well (as per Tuple2)
- the #eval directive is similar to the #calc directive, but for evaluating
string expressions into scalar values. It uses an internal parser for
the evaluation instead of dynamic code compilation. This can make it
more suitable for 'quick' evaluations.
The evaluation supports the following:
- operations: - + * /
- functions: exp, log, log10, pow, sqrt, cbrt, sqr, mag, magSqr
- trigonometric: sin, cos, tan, asin, acos, atan, atan2, hypot
- hyperbolic: sinh, cosh, tanh
- conversions: degToRad, radToDeg
- constants: pi()
- misc: rand(), rand(seed)
- previously allowed mapped value modification with a const iterator.
However, this can lead to incorrect access patterns.
Now tie the constness of the mapped value to that of the iterator.
- Remove deprecated iterator object() method.
Was only used internally and was superseded by the val() method
in an earlier version.
ENH: change isPointer to isPointerLike
- can distinguish between real pointers and wrapped pointers
- this largely reverts 3f0f218d88 and 4ee65d12c4.
Consistent addressing with support for wrapped pointer types (eg,
autoPtr, std::unique_ptr) has proven to be less robust than desired.
Thus rescind HashTable iterator '->' dereferencing (from APR-2019).
- for special cases when normal writing is to be completely disabled
and replaced with alternate means (eg, via a function object).
- support "adjustable" as "adjustableRunTime" alias to reduce typing
for writeControl or outputControl
- use HashTable emplace instead of insert to avoid unneeded argument
(for HashSet).
- use emplace when generating zero-initialized values for
HashTable::operator()
- drop unused parameter from Detail::HashTableSingle,
adjust templates parameter names
- forward HashTable::operator[] to the semantically identical
HashTable::at() to avoid code duplication
- call also be used non-interactively for simple 'one-shot' use of
OpenFOAM utilities or solvers
STYLE: use dash instead of brackets for '- see www.OpenFOAM.com'
- less cluttered in combination with API information