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
      dd9ecd49
  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
      d8c0167e
  4. 27 Jul, 2018 1 commit
  5. 30 May, 2018 1 commit
  6. 05 Mar, 2018 1 commit
  7. 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
  8. 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
            (
                labels,
                [](const label& val){ return 1.5*val; }
            );
      e42c2281
  9. 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
        iterators.
      
      - 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
        definitions)
      cc5f30f2
  10. 09 Nov, 2017 1 commit
  11. 05 Nov, 2017 1 commit
  12. 04 Nov, 2017 1 commit
  13. 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.
      2787a866
  14. 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();
            reserve(N);
      5c1ec7ec
  15. 20 Sep, 2017 1 commit
    • 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
      049617d0
  16. 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
        std::distance.
      
      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
      0c53a815
  17. 29 Nov, 2016 1 commit
  18. 12 Aug, 2016 1 commit
  19. 09 Aug, 2016 1 commit
  20. 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))")());
      
      or
      
          List<vector> list4
          {
              vector(0, 1, 2),
              vector(3, 4, 5),
              vector(6, 7, 8)
          };
      d01eb45c
  21. 09 Jul, 2016 1 commit
  22. 06 May, 2016 1 commit
  23. 29 Apr, 2016 1 commit
  24. 07 Apr, 2016 1 commit
  25. 22 Mar, 2016 1 commit
  26. 28 Feb, 2016 1 commit
  27. 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
      recommendations.
      
      Henry G. Weller
      CFD Direct
      99a10ece
  28. 10 Jan, 2016 1 commit
  29. 04 Jul, 2013 1 commit
  30. 14 Aug, 2011 1 commit
  31. 08 Feb, 2011 1 commit
  32. 19 Jan, 2011 1 commit
  33. 14 Jan, 2011 1 commit
  34. 07 Jan, 2011 1 commit
  35. 05 Jan, 2011 2 commits
  36. 02 Nov, 2010 1 commit
  37. 04 Oct, 2010 1 commit
  38. 07 Jun, 2010 1 commit
  39. 29 Mar, 2010 1 commit