- use MPI_Bcast intrinsic instead of manual tree to reduce the overall
number of messages.
Old behaviour can be re-enabled with
`#define Foam_Pstream_scatter_nobroadcast`
- The idea of broadcast streams is to replace multiple master to
subProcs communications with a single MPI_Bcast.
if (Pstream::master())
{
OPBstream toAll(Pstream::masterNo());
toAll << data;
}
else
{
IPBstream fromMaster(Pstream::masterNo());
fromMaster >> data;
}
// vs.
if (Pstream::master())
{
for (const int proci : Pstream::subProcs())
{
OPstream os(Pstream::commsTypes::scheduled, proci);
os << data;
}
}
else
{
IPstream is(Pstream::commsTypes::scheduled, Pstream::masterNo());
is >> data;
}
Can simply use UPstream::broadcast() directly for contiguous data
with known lengths.
Based on ideas from T.Aoyagi(RIST), A.Azami(RIST)
- native MPI min/max/sum reductions for float/double
irrespective of WM_PRECISION_OPTION
- native MPI min/max/sum reductions for (u)int32_t/(u)int64_t types,
irrespective of WM_LABEL_SIZE
- replace rarely used vector2D sum reduction with FixedList as a
indicator of its intent and also generalizes to different lengths.
OLD:
vector2D values; values.x() = ...; values.y() = ...;
reduce(values, sumOp<vector2D>());
NEW:
FixedList<scalar,2> values; values[0] = ...; values[1] = ...;
reduce(values, sumOp<scalar>());
- allow returnReduce() to use native reductions. Previous code (with
linear/tree selector) would have bypassed them inadvertently.
ENH: added support for MPI broadcast (for a memory span)
ENH: select communication schedule as a static method
- UPstream::whichCommunication(comm) to select linear/tree
communication instead of ternary or
if (Pstream::nProcs() < Pstream::nProcsSimpleSum) ...
STYLE: align nProcsSimpleSum static value with etc/controlDict override
- refactor as an MPI-independent base class.
Add bufferIPC{send,recv} private methods for construct/destruct.
Eliminates code duplication from two constructor forms and reduces
additional constructor definitions in dummy library.
- add PstreamBuffers access methods, refactor common finish sends
code, tweak member packing
ENH: resize_nocopy for processorLduInterface buffers
- content is immediately overwritten
STYLE: cull unneeded includes in processorFa*
- handled by processorLduInterface
- this can be used to apply a uniform field level to remove from
a sampled field. For example,
fieldLevel
{
"p.*" 1e5; // Absolute -> gauge [Pa]
T 273.15; // [K] -> [C]
U #eval{ 10/sqrt(3) }; // Uniform mag(U)=10
}
After the fieldLevel has been removed, any fieldScale is applied.
For example
fieldScale
{
"p.*" 0.01; // [Pa] -> [mbar]
}
The fieldLevel for vector and tensor fields may still need some
further refinement.
The runTimeControl function object can activate further function objects using
triggers. Previously the trigger index could only advance; this change set
allows users to set smaller values to enable function object recycling, e.g.
Repeat for N cycles:
1. average the pressure at a point in space
2. when the average stabilises, run for a further 100 iterations
3. set a new patch inlet velocity
- back to (1)
- Removes old default behaviour that only permitted an increase in the
trigger level. This type of 'ratcheting' mechanism (if required) is
now the responsibility of the derived function object.
- notably affects writing continuous data in binary. If generating a
compound token (eg, List<label>), need to add in the size prefix
otherwise it cannot actually be parsed properly as a List.
BUG: bad fallthrough for compound reading (FixedList)
- the branch was likely never reached, but would have attempted to
read twice due to a bad fall-through condition.
GIT: relocate globalIndex (is independent of mesh)
STYLE: include label/scalar Fwd in contiguous.H
STYLE: unneed commSchedule include in GeometricField
- as a side-effect of changes to probes, the file pointers are not
automatically creating when reading the dictionary but delayed
until prepare(WRITE_ACTION) is called.
This nuance was missed in thermoCoupleProbes.
- added in special handling for monitoring controlDict.
Since controlDict is an unwatchedIOdictionary (not IOdictionary) and
not registered either, the usual objectRegistry caching is not
available. Instead, access directly from Time.
Left the balance of the file handling largely intact (for handling
unregistered dictionaries) but could potentially revisit in the
future and attempt master-only file access if required. However,
most other IOdictionary types will be registered, otherwise the
READ_IF_MODIFIED mechanism would not really work properly.
- add writer support for VERTICES
- updated use of globalIndex
ENH: add base vtk writer for points/verts/lines
STYLE: noexcept, explicit constructors etc
- when used with *any* alphaField and normalised (the usual case)
would largely give a 0-1 corresponding to the min/max of the first
component, but could also yield negative values.
- if the alpha field corresponds identically to colour field, it is
readily possible to combine as into RGBA sequences. However, if the
fields are different it potentially means referencing an opacity
field that has not yet been sampled. This impedes using the format
for a streaming sampler without additional overhead and/or rewriting
the alpha channel later.
- scene
- write with fileName, additional getMesh accessor
- addColourToMesh accepts an alpha field size 1 as a constant
alpha value
- sceneWriter wrapper
ENH: improve gltf handling of colour and alpha specification
- accept plain input directly.
Eg,
colour (1 0 1);
vs
colour uniform;
colourValue (1 0 1);
- use field magnitude for colouring of non-scalar fields.
Eg, having three different colour maps for a vector field simply
does not help much with visualisation.
- meshTools is the first layer in which coordSet is actually needed
STYLE: rename writer implementations in advance of upcoming changes (#2347)
- simplifies tracing of code changes (git blame)
- supports sampling/probing of values to obtain min/max/average/size
at execution intervals without writing any output or generating
output directories.
- 'verbose' option for additional output
- min, max, average and sample size results now stored in
functionObjectProperties similar to sampledSets, e.g. for field p
- min(p)
- max(p)
- average(p)
- size(p)
ENH: provide fieldTypes::surface names (as per fieldTypes::volume)
ENH: reduce number of files for surface fields
- combine face and point field declarations/definitions,
simplify typeName definitions