Commit Graph

11 Commits

Author SHA1 Message Date
Mark Olesen
0c84e50583 ENH: refine renumberMesh and renumberMethod (addenda to !669)
- provide no_topology() characteristic to avoid triggering potentially
  expensive mesh connectivity calculations when they are not required.

- remove/deprecate unused pointField references from the renumber
  methods. These appear to have crept in from outer similarities
  with decompositionMethod, but have no meaning for renumbering.

- remove/deprecate various unused aggregation renumberings since these
  have been previously replaced by pre-calling calcCellCells, or
  using bandCompression directly.

- make regionFaceOrder for block-wise renumbering optional and
  treat as experimental (ie, default is now disabled).

  The original idea was to sort the intra-region and inter-region faces
  separately. However, this will mostly lead to non-upper triangular
  ordering between regions, which checkMesh and others don't really like.

ENH: add timing information for various renumberMesh stages

ENH: add reset of clockTime and cpuTime increment

- simplifies section-wise timings

ENH: add globalIndex::null() and fieldTypes::processorType conveniences

- provides more central management of these characteristics
2024-03-10 17:45:44 +01:00
Mark Olesen
182afc27ba STYLE: noexcept for nullObject functions
STYLE: use nullObject for return values of NotImplemented

STYLE: shallowCopy(nullptr) shortcut
2024-01-25 16:03:09 +01:00
Mark Olesen
1d2391e0b4 ENH: add swallow assignment to nullObject
- similar to the behaviour of std::ignore and consistent with the
  no input / no output nature of nullObject. Similarly accept a
  const reference for its Istream operator.

- make most nullObject methods constexpr
2020-05-29 15:55:27 +02:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
Mark Olesen
3c07a1bb6f ENH: Foam::name() of memory address
- returns the memory address formatted in hexadecimal, which can be
  useful for detailed information
2019-08-12 10:46:29 +02:00
Mark Olesen
59da4cf56d STYLE: use uintptr_t cast instead of long when reporting addresses 2019-04-29 08:15:48 +02:00
Mark Olesen
eaa3da72c5 ENH: extend size of NullObject for safer reinterpret cast
- 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.
2019-02-07 11:13:13 +01:00
Mark Olesen
1883a872a1 STYLE: adds comments in empty Make/options files
- easier when making modifications

STYLE: spelling in topoSetSource comments
2018-11-13 15:21:13 +01:00
Mark Olesen
0298c02b2d ENH: ensure nullObject is large enough for reinterpret
- previously occupied 1 byte. Now occupies enough to hold a pointer,
  which helps if using reinterpret_cast to something that has some
  member content.
2017-05-01 22:39:36 +02:00
Henry
f4596ad247 Resolve issues relating to compilation with clang-3.5.0 2014-12-15 22:38:10 +00:00