- relax casting rules
* down-cast of labelToken to boolToken
* up-cast of wordToken to stringToken.
Can use isStringType() test for word or string types
- simplify constructors, move construct etc.
- expose reset() method as public, which resets to UNDEFINED and
clears allocated storage etc.
DEFEATURE: remove assign from word or string pointer.
- This was deprecated 2017-11 and now removed.
For this type of content transfer, move assignment should be used
instead of stealing pointers.
1) Add softWall rigidBody restrain
2) Add linearSpringDamper sixDoF restrain to work as soft rope
3) dynamicMotionSolverListFvMesh changed to dictionary based input
4) Add Time reference access to sixDof restraints
5) Add drivenLinearMotion to solidBodyMotionFunctions.
- synchronization, reduction only makes sense on processor-coupled
patches. Since cyclic baffles are within a single processor domain,
they are not reduced. So need to skip the sanity test for these.
- the read offset missed the tag_ member entirely and thus the entire
particle information would be corrupt (incorrectly interpreted) as
well as potential violation of adjacent (trailing) memory locations.
- allows some internal handling for reading dissimilar storage types.
Eg, scalars written as float (WM_SP), but read as double (WM_DP)
- reading binary parcel coordinates with dissimilar storage types is
still pending
- change contiguous from a series of global functions to separate
templated traits classes:
- is_contiguous
- is_contiguous_label
- is_contiguous_scalar
The static constexpr 'value' and a constexpr conversion operator
allow use in template expressions. The change also makes it much
easier to define general traits and to inherit from them.
The is_contiguous_label and is_contiguous_scalar are special traits
for handling data of homogeneous components of the respective types.
- in addition to m() and n(), provide Matrix mRows()/nRows(), nCols()
methods. These provide unambiguous access names.
'mRows()' == for internal consistency with MatrixSpace.
'nRows()' == a commonly used naming.
- a top-level cloud::nParcels() virtual, which is overloaded by the
first level of Cloud inheritance. This permits quick determination of
cloud sizes, even when retrieved from registry with the base level.
Eg,
cloud* cldPtr = mesh.cfindObject<cloud>("myCloud");
label nParcels = (cldPtr ? cldPtr->nParcels() : 0);
- make writeLagrangianPositions on by default unless explicitly
disabled in the InfoSwitches.
Flag output errors (where neither coordinates nor positions are
written) with Fatal.
- additional IOField helper functions in cloud
STYLE: simplify iterator inheritance
- can now specify literal matches for sub-dictionary methods:
isDict(key, keyType::REGEX)
optionalSubDict(key, keyType::REGEX)
subDict(key, keyType::REGEX)
subOrEmptyDict(key, keyType::REGEX, mandatory)
There is no change in behaviour of the methods, just the search option
is now exposed as an optional parameter.
NOTE: minor breaking change for subOrEmptyDict()
old: subOrEmptyDict(key, bool=false)
new: subOrEmptyDict(key, keyType::option=keyType::REGEX, bool=false)
This affects code that previously explicitly set the bool parameter.
Within OpenFOAM itself, this only affected a single file:
KinematicCloud.C
- this is principally for cases where reduced indentation is desired,
such as when streaming to a memory location. If the indentation size
is zero or one, only a single space will be used to separate the
key/value.
This change does not affect the stream allocation size, since the
extra data falls within the padding.
ENH: relocate label/scalar sizes from Istream to IOstream.
- could allow future use for output streams as well?
Due to padding, reorganization has no effect on allocated size
of output streams.
STYLE: add read/write name qualifier to beginRaw, endRaw
- removes ambiguity for bi-directional streams
STYLE: fix inconsistent 'const' qualifier on std::streamsize
- base Ostream was without const, some derived streams with const
- allows full recovery of allocated space, not just addressable range.
This can be particularly useful for code patterns that repeatedly
reuse the same buffer space. For example,
DynamicList<char> buf(1024);
// some loop
{
OListStream os(std::move(buf));
os << ...
os.swap(buf);
}
Can read back from this buffer as a second operation:
{
UIListStream is(buf);
is >> ...
}