1. 24 Jun, 2020 5 commits
  2. 01 May, 2020 1 commit
  3. 28 Apr, 2020 1 commit
  4. 31 Oct, 2019 1 commit
  5. 12 Jul, 2019 1 commit
  6. 06 Feb, 2019 1 commit
  7. 25 Jan, 2019 1 commit
  8. 11 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: use Zero when zero-initializing types · 1d85fecf
      Mark Olesen authored
      - makes the intent clearer and avoids the need for additional
        constructor casting. Eg,
      
            labelList(10, Zero)    vs.  labelList(10, 0)
            scalarField(10, Zero)  vs.  scalarField(10, scalar(0))
            vectorField(10, Zero)  vs.  vectorField(10, vector::zero)
      1d85fecf
  9. 05 Nov, 2018 1 commit
    • Mark Olesen's avatar
      ENH: extend globalIndex toGlobal methods · f5baa9a5
      Mark Olesen authored
      - now applicable to labelLists.
      
      Note:
        in some situations it will be more efficient to use
        Foam::identity() directly. Eg,
      
           globalIndex globalCells(mesh.nCells());
           ...
           labelList cellIds
           (
               identity(globalCells.localSize(), globalCells.localStart())
           );
      f5baa9a5
  10. 18 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup of Enum class · 3b745122
      Mark Olesen authored
      - more dictionary-like methods, enforce keyType::LITERAL for all
        lookups to avoid any spurious keyword matching.
      
      - new readEntry, readIfPresent methods
      
      - The get() method replaces the now deprecate lookup() method.
      
      - Deprecate lookupOrFailsafe()
        Failsafe behaviour is now an optional parameter for lookupOrDefault,
        which makes it easier to tailor behaviour at runtime.
      
      - output of the names is now always flatted without line-breaks.
        Thus,
      
           os << flatOutput(someEnumNames.names()) << nl;
           os << someEnumNames << nl;
      
        both generate the same output.
      
      - Constructor now uses C-string (const char*) directly instead of
        Foam::word in its initializer_list.
      
      - Remove special enum + initializer_list constructor form since
        it can create unbounded lookup indices.
      
      - Removd old hasEnum, hasName forms that were provided during initial
        transition from NamedEnum.
      
      - Added static_assert on Enum contents to restrict to enum or
        integral values.  Should not likely be using this class to enumerate
        other things since it internally uses an 'int' for its values.
      
        Changed volumeType accordingly to enumerate on its type (enum),
        not the class itself.
      3b745122
  11. 04 Jul, 2018 1 commit
  12. 26 Jun, 2018 1 commit
  13. 25 Jun, 2018 1 commit
  14. 10 Aug, 2018 1 commit
  15. 08 Jun, 2018 1 commit
  16. 30 May, 2018 1 commit
  17. 05 Mar, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: use direct iteration for HashSet · 4fe8ed82
      Mark Olesen authored
      - The iterator for a HashSet dereferences directly to its key.
      
      - Eg,
      
            for (const label patchi : patchSet)
            {
                ...
            }
        vs.
            forAllConstIter(labelHashSet, patchSet, iter)
            {
                const label patchi = iter.key();
                ...
            }
      4fe8ed82
  18. 28 Mar, 2018 1 commit
  19. 05 Mar, 2018 1 commit
  20. 26 Feb, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup autoPtr class (issue #639) · 660f3e54
      Mark Olesen authored
      Improve alignment of its behaviour with std::unique_ptr
      
        - element_type typedef
        - release() method - identical to ptr() method
        - get() method to get the pointer without checking and without releasing it.
        - operator*() for dereferencing
      
      Method name changes
      
        - renamed rawPtr() to get()
        - renamed rawRef() to ref(), removed unused const version.
      
      Removed methods/operators
      
        - assignment from a raw pointer was deleted (was rarely used).
          Can be convenient, but uncontrolled and potentially unsafe.
          Do allow assignment from a literal nullptr though, since this
          can never leak (and also corresponds to the unique_ptr API).
      
      Additional methods
      
        - clone() method: forwards to the clone() method of the underlying
          data object with argument forwarding.
      
        - reset(autoPtr&&) as an alternative to operator=(autoPtr&&)
      
      STYLE: avoid implicit conversion from autoPtr to object type in many places
      
      - existing implementation has the following:
      
           operator const T&() const { return operator*(); }
      
        which means that the following code works:
      
             autoPtr<mapPolyMesh> map = ...;
             updateMesh(*map);    // OK: explicit dereferencing
             updateMesh(map());   // OK: explicit dereferencing
             updateMesh(map);     // OK: implicit dereferencing
      
        for clarity it may preferable to avoid the implicit dereferencing
      
      - prefer operator* to operator() when deferenced a return value
        so it is clearer that a pointer is involve and not a function call
        etc    Eg,   return *meshPtr_;  vs.  return meshPtr_();
      660f3e54
  21. 01 Mar, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup of ListOps, ListListOps. Adjustments to List, PackedList. · 15f72608
      Mark Olesen authored
      - relocated ListAppendEqOp and ListUniqueEqOp to ListOps::appendEqOp
        and ListOps::UniqueEqOp, respectively for better code isolation and
        documentation of purpose.
      
      - relocated setValues to ListOps::setValue() with many more
        alternative selectors possible
      
      - relocated createWithValues to ListOps::createWithValue
        for better code isolation. The default initialization value is itself
        now a default parameter, which allow for less typing.
      
        Negative indices in the locations to set are now silently ignored,
        which makes it possible to use an oldToNew mapping that includes
        negative indices.
      
      - additional ListOps::createWithValue taking a single position to set,
        available both in copy assign and move assign versions.
        Since a negative index is ignored, it is possible to combine with
        the output of List::find() etc.
      
      STYLE: changes for PackedList
      
      - code simplication in the PackedList iterators, including dropping
        the unused operator() on iterators, which is not available in plain
        list versions either.
      
      - improved sizing for PackedBoolList creation from a labelUList.
      
      ENH: additional List constructors, for handling single element list.
      
      - can assist in reducing constructor ambiguity, but can also helps
        memory optimization when creating a single element list.
        For example,
      
          labelListList labels(one(), identity(mesh.nFaces()));
      15f72608
  22. 21 Feb, 2018 1 commit
    • Mark Olesen's avatar
      ENH: improve consistency of ListOps and stringListOps · f9599279
      Mark Olesen authored
      - subsetList, inplaceSubsetList with optional inverted logic.
      
      - use moveable elements where possible.
      
      - allow optional starting offset for the identity global function.
        Eg,  'identity(10, start)' vs 'identity(10) + start'
      f9599279
  23. 19 Sep, 2017 2 commits
  24. 18 Aug, 2017 1 commit
  25. 17 Aug, 2017 2 commits
  26. 31 Oct, 2017 1 commit
    • Will Bainbridge's avatar
      ENH: AMI: Consistency between overlap/normalisation areas · d76923d8
      Will Bainbridge authored
      The patch magSf calculation has been changed so that it uses the same
      triangulation as the overlap algorithm. This improves consistency and
      means that for exactly conforming patches (typically before any mesh
      motion) the weights do not require normalisation.
      d76923d8
  27. 24 Oct, 2017 1 commit
  28. 21 Jul, 2017 1 commit
  29. 07 Jul, 2017 1 commit
  30. 04 Jul, 2017 1 commit
  31. 03 Jul, 2017 1 commit
  32. 19 May, 2017 1 commit
  33. 10 Mar, 2017 1 commit
  34. 28 Nov, 2016 1 commit