- replaced ad hoc handling of formatOptions with coordSetWriter and
surfaceWriter helpers.
Accompanying this change, it is now possible to specify "default"
settings to be inherited, format-specific settings and have a
similar layering with surface-specific overrides.
- snappyHexMesh now conforms to setFormats
Eg,
formatOptions
{
default
{
verbose true;
format binary;
}
vtk
{
precision 10;
}
}
surfaces
{
surf1
{
...
formatOptions
{
ensight
{
scale 1000;
}
}
}
}
- for later reuse with fields (for example)
ENH: use 'scheduled' for surfaceWriter field merging (#2402)
- in tests with merging fields (surfaceWriter), 'scheduled' was
generally faster than 'nonBlocking' for scalars, minorly faster for
vectors.
Thus make 'scheduled' the default for the surfaceWriter but with a
user-option to adjust as required. Previously simply relied on
whichever default globalIndex had (currently nonBlocking).
Reuse globalIndex information from mergedSurf instead of
globalIndex::gatherOp to avoid an extra MPI call to gather sizes
each time.
These changes will not be noticable unless surface sampling is done
very frequently (eg, every iteration) and with large core counts.
- support globalIndex for points/faces as an output parameter,
which allows reuse in subsequent field merge operations.
- make pointMergeMap an optional parameter. This information is not
always required. Eg, if only using gatherAndMerge to combine faces
but without any point fields.
ENH: make globalIndex() noexcept, add globalIndex::clear() method
- end_value() corresponds to the infrequently used after() method, but
with naming that corresponds better to iterator naming conventions.
Eg,
List<Type> list = ...;
labelRange range = ...;
std::transform
(
(list.data() + range.begin_value()),
(list.data() + range.end_value()),
outIter,
op
);
- promote min()/max() methods from labelRange to IntRange base class
STYLE: change timeSelector from "is-a" to "has-a" scalarRanges.
- resets min/max to be identical to the specified value,
which can be more convenient (and slightly more efficient) than doing
a full reset followed by add()
- additional MinMax intersects() query, which works like overlaps()
but with exclusive checks at the ends
- provide MinMax::operator&=() to replace (unused) intersect() method
ENH: single/double value reset method for boundBox
- boundBox::operator&=() to replace (rarely used) intersect() method.
Deprecate boundBox::intersect() to avoid confusion with various
intersects() method
COMP: provide triangleFwd.H
- background: for some application it can be useful to have fully
sorted points. i.e., sorted by x, followed by y, followed by z.
The default VectorSpace 'operator<' compares *all*
components. This is seen by the following comparisons
1. a = (-2.2 -3.3 -4.4)
b = (-1.1 -2.2 3.3)
(a < b) : True
Each 'a' component is less than each 'b' component
2. a = (-2.2 -3.3 -4.4)
b = (-2.2 3.3 4.4)
(a < b) : False
The a.x() is not less than b.x()
The static definitions 'less_xyz', 'less_yzx', 'less_zxy'
instead use comparison of the next components as tie breakers
(like a lexicographic sort).
- same type of definition that Pair and Tuple2 use.
a = (-2.2 -3.3 -4.4)
b = (-2.2 3.3 4.4)
vector::less_xyz(a, b) : True
The a.x() == b.x(), but a.y() < b.y()
They can be used directly as comparators:
pointField points = ...;
std::sort(points.begin(), points.end(), vector::less_zxy);
ENH: make VectorSpace named access methods noexcept.
Since the addressing range is restricted to enumerated offsets
(eg, X/Y/Z) into storage, always remains in-range.
Possible to make constexpr with future C++ versions.
STYLE: VectorSpace 'operator>' defined using 'operator<'
- standard rewriting rule
- useful when a characteristic per-face search dimension is required.
With PrimitivePatch we are certain to have consistent evaluations
of the face centre.
STYLE: tag PrimitivePatch compatibility headers as such
STYLE: combine templated/non-templated headers (reduced clutter)
STYLE: use hitPoint(const point&) combined setter
- same as setHit() + setPoint(const point&)
ENH: expose and use labelOctBits::pack method for addressing
- the old List_FOR_ALL macro only remained in use in relatively few
places. Replace with the expanded equivalent and move the looping
parameter out of the macro and give an explicit name (eg, loopLen)
which simplifies the addition of any loop pragmas in the various
TFOR_ALL... macros (for example).
- in places where direct reading from the std::stream is used,
this method can be used to ensure that the OpenFOAM Sstream state
is properly updated from the std::stream.
ENH: restrict stream renaming to ISstream
- non-const access was previously declared at the top-level (IOstream)
but that not only added in potentially odd setting of the static
fileName, but also meant that the OFstream name() could potentially
be altered after opening a file and thus be inconsistent with the
underlying file that had been opened.
Now restrict name modification to ISstream (and ITstream
counterpart). Does not affect any existing valid code.
STYLE: non-default OFstream destructor (for future file staging)