- OCharStream for serializing
- skip intermediate blocks without reading
- support string_view
- read and distribute with direct non-blocking send/recv
instead of PstreamBuffers or with IPstream/OPstream streaming
operators.
- non-blocking gather/write when using intermediate buffer space
- use OCharStream instead of OStringStream to avoid copying char data.
- replace PstreamBuffers mechanism with a direct non-blocking PEX
algorithm, which avoids unnecessary serialization/de-serialization
of char data. Also reduces memory footprint and allocations somewhat.
- polling dispatch to write file contents as they become available
- enables partial overwriting of content
- make default construct zero-sized, add reserve_exact() method
- improve sizing behaviour of OCharStream.
Since char buffers will approach the INT_MAX size more quickly than
other content, adapt the following strategy:
| Capacity range | Strategy |
|--------------------|------------------------------|
| 0 < N <= 0.25) | fast growth (2) |
| 0.25 < N <= 0.5) | slower growth (1.5) |
| 0.5 < N <= 0.75) | very slow growth (1.25) |
| 0.75 < N | already large - use max |
- improves usability of List as a general dynamic container as member
data without inheritance. Provide the same method for DynamicList
to enable more efficient use.
- additional string_view support for charList: useful when being used
as a character buffer
STYLE: improve allocation handling in List
- consolidate routines. Only assign size after allocation to ensure
that states are always consistent.
- make memory streams header-only (simpler)
- add sub-views and direct seek for span streams
New IOobject convenience methods
- IOobject::instanceValue() : return the IOobject instance as a scalar
value (or 0). Effectively the same as instant(io.instance()).value()
but with far less typing.
- IOobject::fileModificationChecking_masterOnly() : combines checks for
time-stamp and inotify variants
STYLE: minor adjustments for Enum
- can now create an empty entry and add/overwrite with tokens afterwards,
or copy/move construct from a list of tokens.
ENH: provided named token setter methods (disambiguates bool/char/label)
COMP: use 'if constexpr' for FlatOutput
DOC: more description for Field
- 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.