1. 04 May, 2020 1 commit
  2. 21 Feb, 2020 1 commit
  3. 06 Feb, 2020 1 commit
  4. 31 Oct, 2019 1 commit
  5. 14 Aug, 2019 1 commit
  6. 13 Aug, 2019 1 commit
    • mattijs's avatar
      BUG: edge sync fails with cyclic baffles (fixes #1397) · e2269663
      mattijs authored
      - synchronization, reduction only makes sense on processor-coupled
        patches. Since cyclic baffles are within a single processor domain,
        they are not reduced. So need to skip the sanity test for these.
      e2269663
  7. 29 Jul, 2019 1 commit
    • Mark Olesen's avatar
      ENH: additional contiguous traits (#1378) · 1d79c045
      Mark Olesen authored
      - change contiguous from a series of global functions to separate
        templated traits classes:
      
          - is_contiguous
          - is_contiguous_label
          - is_contiguous_scalar
      
        The static constexpr 'value' and a constexpr conversion operator
        allow use in template expressions.  The change also makes it much
        easier to define general traits and to inherit from them.
      
        The is_contiguous_label and is_contiguous_scalar are special traits
        for handling data of homogeneous components of the respective types.
      1d79c045
  8. 29 Apr, 2019 1 commit
  9. 21 Mar, 2019 1 commit
  10. 07 Jan, 2019 1 commit
  11. 07 Feb, 2019 1 commit
    • Mark Olesen's avatar
      ENH: code adjustments for updated NullObject · 078e3474
      Mark Olesen authored
      - 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.
      078e3474
  12. 06 Feb, 2019 1 commit
  13. 18 Jan, 2019 1 commit
  14. 16 Jan, 2019 1 commit
    • Mark Olesen's avatar
      ENH: add simplified gather methods for globalIndex with default communicator · f498d09d
      Mark Olesen authored
      - when combining lists in processor order this simplifies code and
        reduces memory overhead.
      
        Write this:
          ----
          labelList collected;
      
          const globalIndex sizing(input.size());
          sizing.gather(input, collected);
          ----
      
        OR
      
          ----
          labelList collected;
          globalIndex::gatherOp(input, collected);
          ----
      
        Instead of this:
      
          ----
          labelList collected;
      
          List<labelList> scratch(Pstream::nProcs());
          scratch[Pstream::myProcNo()] = input;
          Pstream::gatherList(scratch);
      
          if (Pstream::master())
          {
              collected = ListListOps::combine<labelList>
              (
                  scratch,
                  accessOp<labelList>()
              );
          }
          scratch.clear();
          ----
      f498d09d
  15. 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
  16. 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
  17. 27 Sep, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: add nBoundaryFaces() method to primitiveMesh · 64c3e484
      Mark Olesen authored
      - nBoundaryFaces() is often used and is identical to
        (nFaces() - nInternalFaces()).
      
      - forward the mesh nInternalFaces() and nBoundaryFaces() to
        polyBoundaryMesh as nFaces() and start() respectively,
        for use when operating on a polyBoundaryMesh.
      
      STYLE:
      
      - use identity() function with starting offset when creating boundary maps.
      
           labelList map
           (
               identity(mesh.nBoundaryFaces(), mesh.nInternalFaces())
           );
      
        vs.
      
           labelList map(mesh.nBoundaryFaces());
           forAll(map, i)
           {
               map[i] = mesh.nInternalFaces() + i;
           }
      64c3e484
  18. 01 Aug, 2018 2 commits
  19. 13 Aug, 2018 1 commit
    • Mark Olesen's avatar
      ENH: additional methods for globalIndex · 3e941ae4
      Mark Olesen authored
      - const version of offsets().
      
      - empty() method to test for empty offsets, or zero overall size
      
      - reset() methods for reseting the sizes. For example, when the context
        has shifted slightly.
      
      - localStart() methods, similar to localSize() methods
      
      STYLE: make globalIndex single parameter constructors explicit
      3e941ae4
  20. 30 May, 2018 1 commit
  21. 28 Mar, 2018 1 commit
  22. 13 Mar, 2018 1 commit
    • Mark Olesen's avatar
      ENH: code reduction in PackedList, PackedBoolList (issue #751) · 5d1fb235
      Mark Olesen authored
      - eliminate iterators from PackedList since they were unused, had
        lower performance than direct access and added unneeded complexity.
      
      - eliminate auto-vivify for the PackedList '[] operator.
        The set() method provides any required auto-vivification and
        removing this ability from the '[]' operator allows for a lower
        when accessing the values. Replaced the previous cascade of iterators
        with simpler reference class.
      
      PackedBoolList:
      
      - (temporarily) eliminate logic and addition operators since
        these contained partially unclear semantics.
      
      - the new test() method tests the value of a single bit position and
        returns a bool without any ambiguity caused by the return type
        (like the get() method), nor the const/non-const access (like
        operator[] has). The name corresponds to what std::bitset uses.
      
      - more consistent use of PackedBoolList test(), set(), unset() methods
        for fewer operation and clearer code. Eg,
      
            if (list.test(index)) ...    |  if (list[index]) ...
            if (!list.test(index)) ...   |  if (list[index] == 0u) ...
            list.set(index);             |  list[index] = 1u;
            list.unset(index);           |  list[index] = 0u;
      
      - deleted the operator=(const labelUList&) and replaced with a setMany()
        method for more clarity about the intended operation and to avoid any
        potential inadvertent behaviour.
      5d1fb235
  23. 07 Mar, 2018 1 commit
    • Mark Olesen's avatar
      ENH: new bitSet class and improved PackedList class (closes #751) · bac943e6
      Mark Olesen authored
      - The bitSet class replaces the old PackedBoolList class.
        The redesign provides better block-wise access and reduced method
        calls. This helps both in cases where the bitSet may be relatively
        sparse, and in cases where advantage of contiguous operations can be
        made. This makes it easier to work with a bitSet as top-level object.
      
        In addition to the previously available count() method to determine
        if a bitSet is being used, now have simpler queries:
      
          - all()  - true if all bits in the addressable range are empty
          - any()  - true if any bits are set at all.
          - none() - true if no bits are set.
      
        These are faster than count() and allow early termination.
      
        The new test() method tests the value of a single bit position and
        returns a bool without any ambiguity caused by the return type
        (like the get() method), nor the const/non-const access (like
        operator[] has). The name corresponds to what std::bitset uses.
      
        The new find_first(), find_last(), find_next() methods provide a faster
        means of searching for bits that are set.
      
        This can be especially useful when using a bitSet to control an
        conditional:
      
        OLD (with macro):
      
            forAll(selected, celli)
            {
                if (selected[celli])
                {
                    sumVol += mesh_.cellVolumes()[celli];
                }
            }
      
        NEW (with const_iterator):
      
            for (const label celli : selected)
            {
                sumVol += mesh_.cellVolumes()[celli];
            }
      
            or manually
      
            for
            (
                label celli = selected.find_first();
                celli != -1;
                celli = selected.find_next()
            )
            {
                sumVol += mesh_.cellVolumes()[celli];
            }
      
      - When marking up contiguous parts of a bitset, an interval can be
        represented more efficiently as a labelRange of start/size.
        For example,
      
        OLD:
      
            if (isA<processorPolyPatch>(pp))
            {
                forAll(pp, i)
                {
                    ignoreFaces.set(i);
                }
            }
      
        NEW:
      
            if (isA<processorPolyPatch>(pp))
            {
                ignoreFaces.set(pp.range());
            }
      bac943e6
  24. 05 Mar, 2018 1 commit
  25. 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 c...
      660f3e54
  26. 08 Feb, 2018 1 commit
  27. 26 Jan, 2018 1 commit
  28. 25 Jan, 2018 1 commit
    • Mark Olesen's avatar
      ENH: remove Foam::Swap specializations for HashSet, HashTable · 915e8c9f
      Mark Olesen authored
      - without these will use the normal move construct + move assign.
        This is similarly efficient, but avoids the inadvertently having the
        incorrect Swap being used for derived classes.
      
      STYLE: remove unused xfer methods for HashTable, HashSet
      
      - unneeded since move construct and move assignment are possible
      915e8c9f
  29. 24 Oct, 2017 1 commit
  30. 10 Mar, 2017 1 commit
  31. 22 Sep, 2016 2 commits
  32. 05 Aug, 2016 1 commit
  33. 17 Jun, 2016 1 commit
  34. 18 May, 2016 1 commit
  35. 03 May, 2016 2 commits
  36. 25 Apr, 2016 2 commits