- previously just removed duplicate literals, but now remove any
duplicates.
- Replace previous wordHashSet implementation with a linear search
instead. The lists are normally fairly small and mostly just have
unique entries anyhow. This reduces the overall overhead.
- simplifies their use when reordering lists etc.
(word, fileName, keyType, wordRe)
- "unfriend" IO operators for string types. They require no internal access
- add compile/uncompile methods to keyType for symmetry with wordRe
- when outputting keyType/wordRe, be more explicit about them using
writeQuoted()
- delay dereferencing of optional subRegion entries until an
objectRegistry is required.
This improves usabilty when reference objects do not yet exist
at the time of construction.
The occurrence is from cells with vertices that are shared between two faces
only (these vertices can originate from hex refinement). Decomposing both faces
can occasionally produce triangles with identical vertices and this results in a
non-manifold edge which triggers the erosion procedure.
Avoided by detecting cells with these special vertices and making sure the tet-decomposition
never uses the same points on the faces using them.
Patch contributed by Mattijs Janssens
- can now safely use labelList::null() instead of emptyLabelList for
return values. No special treatment required for lists.
Possible replacements:
if (notNull(list) && list.size()) -> if (list.size())
if (isNull(list) || list.empty()) -> if (list.empty())
The receiver may still wish to handle differently to distinguish
between a null list and an empty list, but no additional special
protection is required when obtaining sizes, traversing, outputting
etc.
- relocate zone IO from Detail::MeshedSurfaceIOAllocator into surfMesh
directly to allow re-purposing of MeshedSurfaceIOAllocator
- provide meshedSurf::emptySurface zero-sized placeholder implementation
- add concrete implementation of meshedSurf::zoneIds() to simplify
overloading
- previously had a single pointer/value zeros (8 bytes), this meant
that the reinterpret cast to a List would yield a reference that
could be unsafe under certain conditions.
Eg,
const labelList& myList = labelList::null();
Info<< myList.size() << nl; // OK since size is the first parameter
SubList<label>(myList, 0); // Unsafe
The SubList usage is unsafe since it passes in pointer and size into
the underlying UList. However, the pointer from the labelList::null()
will be whatever happens to be around in memory immediately after the
NullObject singleton. This is mostly not a problem if the List size
is always checked, but does mean that the data pointer is rather
dubious.
- Increase the size of the nullObject singleton to 32 bytes of zeros
to ensure that most reinterpret casting will not result in objects
that reference arbitrary memory.
The 32-byte data size is rather arbitrary, but covers most basic
containers.