- num_blocks(), test_set() as per boost
- broadcast(), reduceAnd(), reduceOr() to simplify parallel operations
- matrix-like output for PackedList::writeList()
BUG: Pstream::broadcastList() missing resize on sub-ranks
- latent bug since it was unused in any OpenFOAM code
- the snGradTransformDiag() is used in this type of code:
```
if constexpr (!is_rotational_vectorspace_v<Type>)
{
// Rotational-invariant type
return tmp<Field<Type>>::New(this->size(), pTraits<Type>::one);
}
else
{
return pTraits<Type>::one - snGradTransformDiag();
}
```
This implies that a rotational-invariant form should return 0
and not 1 like the pow(..., 0) does.
This is a backstop for any code that may inadvertently hit it,
but also allows the possibility of having integer indicator fields
without upsetting the compiler.
STYLE: doTransform() logic now uses is_rotational_vectorspace
- a special case of fixedValue with a value of zero:
* non-assignable
* no mapping needed
* value internal coeffs are zero
* value boundary coeffs are zero
- align some of the internal handling with each other and with
CompactListList
ENH: add readContentsSize to IOList, IOField etc.
- sometimes just need to know how many elements are stored on disk
without actually caring about the content. In those cases, can
frequently just get that information from the first label token
without needing to read anything else.
- the logic has been revised to allow list copying with nullptr entries.
These previously would have thrown an error.
- remove PtrList trimTrailingNull() method.
It was unused and would result in inconsistent addressing sizes.
FIX: inconsistent sizing used for DynamicList/PtrDynList clearStorage()
- older code did not reset addressable size prior to clearStorage()
or transfer(). Only a latent bug until memory pools are used.
- can be used in most places where checkType=false is used
ENH: add non-const get() method to HashPtrTable
- allows checking and modification (symmetric with PtrList methods)
STYLE: improve annotations in fileOperations headers
- previously handled stdin redirection as part of the run command but
(as Alexey Matveichev noted) this meant the command would actually
require an `eval` for this to work. Instead redirect before executing
the run command.
- can always use 'echo -e' (bash builtin) in mpirunDebug
CONFIG: add removal of mpirun.files/ to CleanFunctions
- leave mpirun.log/ files untouched, since they may still be useful
for later diagnosis
- provides some additional safety and precludes any recursive searching
ENH: support local directory handling in regionProperties
- allows alternative locations. Eg, for finite-area (#3419)
- since direct streaming of particles is only ever used internally and
never for disk I/O (which is collated by property), mixed precision
will never occur when constructing a particle from a stream.
Due to padding issues, the previous code would have been faulty anyhow.
Thus remove that code and replace with a simple sanity check.
- appears to hit single precision overflow with clang-15 in
face::center(), cellModel::center() and blockMesh createPoints().
The blockMesh might be particularly sensitive, since the points are
frequently defined in millimeters (scaled later), which results
in large intermediate summations.
Similar to primitiveMesh checks, use double precision for these
calculations.
ENH: support vector += and -= from compatible types
- eg, doubleVector += floatVector is now supported.
This streamlines some coding for mixed precision.
- To avoid lots of boilerplate, do not yet attempt to support general
operations such as `operator+(doubleVector, floatVector)`
until they become necessary.
- since pointConstraint is a tuple of (label, vector) not simply use
readRawLabel, readRawScalar since the tuple will also include
trailing padding and/or padding between its members
FIX: remove flawed handling of non-native precision for directionInfo
- packing of (label, vector) makes handling of non-native content
non-trivial (#3412). Content is only streamed, not written to disk,
so replace with a fatalCheck.
- local templates and 'if constexpr' to simplify logic and reduce
reliance on pre-processor defines.
FIX: readScalarOrDefault used scalarToken() not number() token
- will rarely (or never) be triggered, but was inconsistent
- as seen in #3201, using count() based on the ostringstream tellp
is not reliable since it is not updated with reset or copying.
STYLE: minor changes to string/char/span streams
- update docs to only mention string_view
- use auto return, without extra trailing 'decltype'
ENH: add IOstream size check helper methods
* checkNativeSizes() : test only
* fatalCheckNativeSizes() : an assert with FatalIOError
- find patch by name and return pointer to it. Similar to cfindZone()
ENH: robuster PatchFunction1 handling for uniformFixedValuePointPatchField
COMP: use 'if constexpr' with is_contiguous check
STYLE: consistent patch slicing parameters
- slice UList values, not List values