• 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()));