- 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.
- with 1906, OpenFOAM is purely C++ code and the last toolchain bits C
code have been avoided. Thus relax the wmake C rule for including
WM_COMPILE_OPTION. This makes it much easier to add different
compiler options with fewer files.
For example, for Broadwell-specific options:
cd wmake/rules/linux64Gcc
cp c++Opt c++OptBdw
edit this file and then use WM_COMPILE_OPTION=OptBdw
- ensure that WM_COMPILE_OPTION is always non-empty
- 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.
- 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
- When building OpenFOAM for different platform combinations
(single/double, int32/int64) the build information that is compiled
into the OpenFOAM lib can become out of sync.
This is because the update trigger (wmakeBuildInfo -check) is
independent of the targetted platform. The added file
'src/OpenFOAM/Alltouch' provides a direct means of forcing a rebuild
of the version information. Eg,
src/OpenFOAM/Alltouch
wmake src/OpenFOAM
Also provide an additional 'wmakeBuildInfo -remove' to forcibly
remove META-INFO/build-info, if that is desired.
- 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 >> ...
}