1. 09 Aug, 2018 1 commit
  2. 08 Aug, 2018 1 commit
    • Mark OLESEN's avatar
      ENH: add missing Hash function for List/UList (issue #966) · dd9ecd49
      Mark OLESEN authored
      - there were previously no hashing mechanisms for lists so they
        would fall back to the definition for primitives and hash the
        memory location of the allocated List object.
      - provide a UList::Hash<> sub-class for inheritance, and also a global
        specialization for UList<T>, List<T> such that the hash value for
        List<List<T>> cascades properly.
      - provide similar function in triFace to ensure that it remains
        similar in behaviour to face.
      - added SymmHash to Pair, for use when order is unimportant.
      STYLE: use string::hash() more consistently
      - no particular reason to use Hash<word>() which forwards to
        string::hash() anyhow
  3. 01 Aug, 2018 1 commit
    • Mark OLESEN's avatar
      STYLE: ensure that emptyLabelList is known from List.H · d8c0167e
      Mark OLESEN authored
      - treat as a List constant without requiring inclusion of ListOps.H
      - replace use of emptyList<label>() with emptyLabelList directly.
        The emptyList<T>() casting is disallowed with many modern compilers
        and now marked as deprecated (expect early removal).
      - relocate labelList typedef to List.H for more general access.
        Similar reasoning to having labelUList defined in UList.H
  4. 27 Jul, 2018 1 commit
  5. 30 May, 2018 1 commit
  6. 05 Mar, 2018 1 commit
  7. 26 Feb, 2018 1 commit
  8. 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()));
  9. 08 Feb, 2018 1 commit
    • Mark OLESEN's avatar
      ENH: cleanup List constructors (issue #725) · e42c2281
      Mark OLESEN authored
      - add copy construct from UList
      - remove copy construct from dissimilar types.
        This templated constructor was too generous in what it accepted.
        For the special cases where a copy constructor is required with
        a change in the data type, now use the createList factory method,
        which accepts a unary operator. Eg,
            auto scalars = scalarList::createList
                [](const label& val){ return 1.5*val; }
  10. 27 Nov, 2017 1 commit
    • Mark OLESEN's avatar
      ENH: several improvements for linked-lists · cc5f30f2
      Mark OLESEN authored
      - support move construct/assignment for linked-lists themselves
        and when moving into a 'normal' list
      - better consistency with begin/end signatures and the various
      - for indirect linked-lists, provide iterator access to the underlying
        data element address:   iter.get()  vs  &(iter())
      - add standard '->' indirection for iterators (as per normal STL
  11. 09 Nov, 2017 1 commit
  12. 05 Nov, 2017 1 commit
  13. 04 Nov, 2017 1 commit
  14. 26 Nov, 2017 1 commit
    • Mark OLESEN's avatar
      STYLE: relegate special purpose readList<T> function to points of use · 2787a866
      Mark OLESEN authored
      - the readList<T>(Istream&) function was introduced to handle command
        -options with either a single or a list value, but was also used for
        the #remove dictionary directive. However, the parsing was fragile
        if the list did not start with a '('.
        Now handle command-line arg/option list directly (via ITstream)
        and #remove with special-purpose reading of a string or word list.
        This removes ambiguity and reduces potential future problems.
      STYLE: use ITstream instead of IStringStream for command-line lookups
      - parses directly to a tokenList without a string copy.
  15. 15 Aug, 2017 1 commit
  16. 25 Oct, 2017 1 commit
    • Mark OLESEN's avatar
      ENH: relocate protected List::size(label) to UList (issue #595) · 5c1ec7ec
      Mark OLESEN authored
      - makes it accessible for containers that manage their own storage
        and derive directly from UList.
      - DynamicList::min_size() method to access the corresponding
        SizeMin template parameter.
      - ensure consistency in the reserve size for the constructor
            DynamicList<..> lst(N);
        now has identical sizing as
            DynamicList<..> lst();
  17. 20 Oct, 2017 1 commit
    • Mark OLESEN's avatar
      ENH: additional low-level raw binary output for Ostream. · 74f667a8
      Mark OLESEN authored
      - low-level beginRaw(), writeRaw(), endRaw() methods.
        These can be used to directly add '()' decorators for serial output
        or prepare/cleanup parallel buffers.
        Used, for example, when outputting indirect lists in binary to avoid.
  18. 20 Sep, 2017 2 commits
    • Mark OLESEN's avatar
      ENH: update List and DynamicList methods (issue #595) · 049617d0
      Mark OLESEN authored
      - improve functional compatibility with DynList (remove methods)
        * eg, remove an element from any position in a DynamicList
        * reduce the number of template parameters
        * remove/subset regions of DynamicList
      - propagate Swap template specializations for lists, hashtables
      - move construct/assignment to various containers.
      - add find/found methods for FixedList and UList for a more succinct
        (and clearer?) usage than the equivalent global findIndex() function.
      - simplify List_FOR_ALL loops
    • Mark OLESEN's avatar
  19. 26 May, 2017 1 commit
  20. 14 May, 2017 1 commit
    • Mark OLESEN's avatar
      ENH: avoid std::distance for std::initializer_list · 0c53a815
      Mark OLESEN authored
      - std::initializer_list has its own size() method, so no need to use
      STYLE/BUG: use separate iterator de-reference and increment in List
      - avoids unnecessary copying of iterators, and avoids any potentially
        odd behaviour with the combination with incrementing.
      ENH: support construct from iterator pair for DynamicList, SortableList
  21. 27 Apr, 2017 1 commit
  22. 08 Feb, 2017 1 commit
  23. 24 Jan, 2017 1 commit
  24. 29 Nov, 2016 1 commit
  25. 12 Aug, 2016 1 commit
  26. 09 Aug, 2016 1 commit
  27. 05 Aug, 2016 1 commit
  28. 02 Aug, 2016 1 commit
    • Henry Weller's avatar
      List: Reinstated construction from two iterators and added construction from an initializer list · d01eb45c
      Henry Weller authored
      Until C++ supports 'concepts' the only way to support construction from
      two iterators is to provide a constructor of the form:
              template<class InputIterator>
              List(InputIterator first, InputIterator last);
      which for some types conflicts with
              //- Construct with given size and value for all elements
              List(const label, const T&);
      e.g. to construct a list of 5 scalars initialized to 0:
          List<scalar> sl(5, 0);
      causes a conflict because the initialization type is 'int' rather than
      'scalar'.  This conflict may be resolved by specifying the type of the
      initialization value:
          List<scalar> sl(5, scalar(0));
      The new initializer list contructor provides a convenient and efficient alternative
      to using 'IStringStream' to provide an initial list of values:
          List<vector> list4(IStringStream("((0 1 2) (3 4 5) (6 7 8))")());
          List<vector> list4
              vector(0, 1, 2),
              vector(3, 4, 5),
              vector(6, 7, 8)
  29. 09 Jul, 2016 1 commit
  30. 01 Jul, 2016 1 commit
  31. 06 May, 2016 1 commit
  32. 29 Apr, 2016 1 commit
  33. 07 Apr, 2016 1 commit
  34. 22 Mar, 2016 1 commit
  35. 28 Feb, 2016 1 commit
  36. 20 Feb, 2016 1 commit
    • Henry Weller's avatar
      Boundary conditions: Added extrapolatedCalculatedFvPatchField · 99a10ece
      Henry Weller authored
      To be used instead of zeroGradientFvPatchField for temporary fields for
      which zero-gradient extrapolation is use to evaluate the boundary field
      but avoiding fields derived from temporary field using field algebra
      inheriting the zeroGradient boundary condition by the reuse of the
      temporary field storage.
      zeroGradientFvPatchField should not be used as the default patch field
      for any temporary fields and should be avoided for non-temporary fields
      except where it is clearly appropriate;
      extrapolatedCalculatedFvPatchField and calculatedFvPatchField are
      generally more suitable defaults depending on the manner in which the
      boundary values are specified or evaluated.
      The entire OpenFOAM-dev code-base has been updated following the above
      Henry G. Weller
      CFD Direct
  37. 10 Jan, 2016 1 commit
  38. 10 Nov, 2015 1 commit
  39. 08 Nov, 2015 1 commit