Commit Graph

13 Commits

Author SHA1 Message Date
fabb1c2ce5 RELEASE: Updated headers to v2506 2025-06-27 09:46:28 +01:00
a0bba74950 STYLE: remove old (__cplusplus >= 201703L) checks
- now using c++17 throughout
2025-05-21 14:19:36 +02:00
cf2b305b4f ENH: upgrade to use some C++17 constructs
- 'if constexpr (...)'
   * instead of std::enable_if
   * terminate template recursion
   * compile-time elimination of code

- use C++14 '_t', '_v' versions,
  eg, std::is_integral_v<T> instead of std::is_integral<T>::value

- std::begin, std::end, std::void_t instead of prev stdFoam versions

- provide is_contiguous_v<..> as short form of is_contiguous<..>::value
  with the additional benefit of removing any cv qualifiers.

ENH: include is_rotational_vectorspace trait

- tests for vector-space and nComponents > 1 (ie, not sphericalTensor)

ENH: improve robustness of pTraits_.. tests by removing cv qualifiers
2025-01-31 09:51:44 +01:00
d3949086ce RELEASE: Updated headers to v2412 2024-12-24 11:17:31 +00:00
630d60de3b RELEASE: Updated headers to v2406 2024-06-24 09:58:36 +01:00
28aad3a03e RELEASE: Updated headers to v2312 2023-12-20 19:42:55 +01:00
763bf4674d RELEASE: Updated headers to v2306 2023-06-28 16:35:48 +01:00
7e61f36c12 RELEASE: Updated headers to v2212 2022-12-21 16:16:18 +00:00
097008544c STYLE: adjust range check in Foam::factorial (FULLDEBUG)
STYLE: consistent use of $(LIB_SRC) in Make/options
2022-09-07 16:25:45 +02:00
7792501a01 RELEASE: Updated headers for v2206 2022-06-24 15:41:02 +01:00
a2014242cf RELEASE: Updated headers for v2112 2021-12-20 14:18:01 +00:00
e3796745ed CONFIG: Updated headers to v2106
Minor clean-up
2021-06-28 09:14:42 +01:00
95cd8ee75c ENH: improve hashing overloads of string-types and HashTable/HashSet
- additional dummy template parameter to assist with supporting
  derived classes. Currently just used for string types, but can be
  extended.

- provide hash specialization for various integer types.
  Removes the need for any forwarding.

- change default hasher for HashSet/HashTable from 'string::hash'
  to `Hash<Key>`. This avoids questionable hashing calls and/or
  avoids compiler resolution problems.

  For example,
  HashSet<label>::hasher and labelHashSet::hasher now both properly
  map to Hash<label> whereas previously HashSet<label> would have
  persistently mapped to string::hash, which was incorrect.

- standardize internal hashing functors.

  Functor name is 'hasher', as per STL set/map and the OpenFOAM
  HashSet/HashTable definitions.

  Older code had a local templated name, which added unnecessary
  clutter and the template parameter was always defaulted.
  For example,

      Old:  `FixedList<label, 3>::Hash<>()`
      New:  `FixedList<label, 3>::hasher()`
      Unchanged:  `labelHashSet::hasher()`

  Existing `Hash<>` functor namings are still supported,
  but deprecated.

- define hasher and Hash specialization for bitSet and PackedList

- add symmetric hasher for 'face'.
  Starts with lowest vertex value and walks in the direction
  of the next lowest value. This ensures that the hash code is
  independent of face orientation and face rotation.

NB:
  - some of keys for multiphase handling (eg, phasePairKey)
    still use yet another function naming: `hash` and `symmHash`.
    This will be targeted for alignment in the future.
2021-04-19 16:33:42 +00:00