1. 20 Jan, 2009 1 commit
  2. 19 Jan, 2009 2 commits
  3. 16 Jan, 2009 1 commit
    • Mark Olesen's avatar
      consistency update for null pointers · 246d569c
      Mark Olesen authored
      - uniform use of reinterpret_cast<foo*>(0) instead of
      - make all static null() members inline since they are really only a cast:
  4. 15 Jan, 2009 1 commit
  5. 14 Jan, 2009 1 commit
  6. 09 Jan, 2009 1 commit
  7. 05 Jan, 2009 1 commit
    • Mark Olesen's avatar
      rename xfer<T> class to Xfer<T> · 19503c93
      Mark Olesen authored
      - The capitalization is consistent with most other template classes, but
        more importantly frees up xfer() for use as method name without needing
        special treatment to avoid ambiguities.
        It seems reasonable to have different names for transfer(...) and xfer()
        methods, since the transfer is occuring in different directions.
        The xfer() method can thus replace the recently introduced zero-parameter
        transfer() methods.
        Other name candidates (eg, yield, release, etc.) were deemed too abstract.
  8. 02 Jan, 2009 1 commit
    • Mark Olesen's avatar
      added xfer<...> transfer() method to various containers · cf488912
      Mark Olesen authored
      - this should provide a slightly more naturally means to using transfer
        constructors, for example
                labelList list2(list1.transfer());
            vs. labelList list2(xferMove(list1));
      - returns a plain list where appropriate (eg, DynamicList, SortableList)
        for example
                labelList list2(dynList1.transfer());
            vs. labelList list2(xferMoveTo<labelList>(dynList1));
  9. 31 Dec, 2008 1 commit
  10. 29 Nov, 2008 1 commit
  11. 25 Nov, 2008 1 commit
    • Mark Olesen's avatar
      SortableList + ListOps changes · 7e2a940d
      Mark Olesen authored
      - dropped setSize() in favour of List::setSize().
        The size of the indices is set in sort() anyhow and undefined before that.
      - added reverseSort() method
      - added ListOps uniqueOrder() and duplicateOrder()
  12. 24 Nov, 2008 1 commit
    • Mark Olesen's avatar
      DynamicList changes. · 41bbcb63
      Mark Olesen authored
      - setSize() adjusts the addressable length only.
        Changed setSize(label) usage to setCapacity(label) or reserve(label)
        throughout. The final name (capacity vs. storageSize() vs. whatever) can
        easily be decided at a later date.
      - added setSize(label, const T&), which may still not be really useful, but
        is at least now meaningful
      - made shrink() a bit more legible.
      - added append(UList<T>&)
      - copying from a UList avoids reallocations where possible
      The following bits of code continue to use the DynamicList::setSize(), but
      appear to be legitimate (or the corresponding code itself needs rethinking).
        src/OpenFOAM/meshes/primitiveMesh/primitiveMeshPointCells.C:167: error: within this context
        src/OpenFOAM/lnInclude/faceTemplates.C:44: error: within this context
        src/surfMesh/surfaceFormats/tri/TRIsurfaceFormatCore.C:178: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:737: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:741: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:745: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:749: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:754: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:935: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:940: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:1041: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:1046: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:2161: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:2162: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:2201: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:2205: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:2261: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:2262: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:2263: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:2264: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:2265: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:3011: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:3076: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:3244: error: within this context
        src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C:3371: error: within this context
        src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C:73: error: within this context
        src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C:91: error: within this context
        src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C:73: error: within this context
        src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C:91: error: within this context
  13. 23 Nov, 2008 2 commits
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      DynamicList improvements/disambiguities · 129e16f9
      Mark Olesen authored
      * DynamicList::allocSize(label)
        - Adjust the allocated size. The addressed list can be truncated but not
          extended, use setSize() for that.
      * DynamicList::reserve(label)
        - Reserve allocation for *at least* this number of elements.
          Never shrinks the allocated size, nor touches the addressed list size.
      * DynamicList::setSize(label)
        - proposed behaviour:
          Adjust the addressed list size, allocating extra space if required.
        - The current behaviour is ambiguous about what addressable size will
          actually get set and using it to extend the addressable size (as
          per List) automatically shrinks the allocated space to this size!
  14. 20 Nov, 2008 1 commit
  15. 19 Nov, 2008 2 commits
  16. 18 Nov, 2008 2 commits
  17. 07 Nov, 2008 1 commit
  18. 31 Oct, 2008 1 commit
  19. 21 Oct, 2008 2 commits
    • mattijs's avatar
      merge from master · 3efb4ebe
      mattijs authored
    • Mark Olesen's avatar
      DynamicList bugfixes · 20d3c10b
      Mark Olesen authored
        - transfer(DynamicList&) now preserves the allocated space as-is
        - operator=(const List&) should now avoid spurious allocation/deallocation
  20. 20 Oct, 2008 1 commit
    • Mark Olesen's avatar
      DynamicList re-visited: · b22ada09
      Mark Olesen authored
       - shrink() should now correctly actually shrink
       - List::transfer(DynamicList&) invokes shrink() before transferring
         contents: otherwise the ununsed allocated space is never recovered
         until much, much later.
       - DynamicList::transfer(List&) no longer throws a FatalError when
         transferring in a smaller list. The original list contents are getting
         tossed away anyhow!
  21. 17 Oct, 2008 1 commit
    • Mark Olesen's avatar
      xfer class modifications: · 91cb6d29
      Mark Olesen authored
        - removed operator* in favour of operator() for consistency with tmp
          class. The previous use of operator() for const casting didn't work
          anyhow due to template confusion.
        - added xferCopy(), xferMove() and xferTmp() template functions instead
        - preliminary changes to IOobjects and Fields for xfer
  22. 16 Oct, 2008 1 commit
  23. 13 Oct, 2008 2 commits
    • Mark Olesen's avatar
      DynamicList changes · 2c6b1368
      Mark Olesen authored
        - setSize(const label)
          * When the new size is greater than the addressed list size, the allocated
            list sizes is adjusted and the addressed size does not change.
          * Otherwise the addressed list size is just reduced and the allocated
            size does not change. inline void setSize(const label);
        - setSize(const label, const T&)
          Disabled, since the usefulness and semantics are not quite clear
        - operator=(const T&)
          should not affect the allocated size (BUGFIX)
    • mattijs's avatar
      unecessary shrink · c49e93d4
      mattijs authored
  24. 10 Oct, 2008 6 commits
    • Mark Olesen's avatar
      DynamicList - consistent setSize() behaviour · b770ddf3
      Mark Olesen authored
        - expansion of a list beyond the currently addressed list size
          changes both the allocated size and the addressed list size
        - contracting list below the currently addressed list size
          changes the addressed list size only.
        If someone really wishes to increase the underlying allocated list size
        without touching the addressed list size:
            prevSize = myList.size();
        or introduce an equivalent allocSize(const label) method if this is needed
    • Mark Olesen's avatar
      DynamicList - fixed setSize() semantics · b92ed1ec
      Mark Olesen authored
      setSize(const label)
        - When the new size is smaller than the addressed list size, the addressed
          list size is reduced and the allocated size does not change.
        - Otherwise the allocated size is adjusted, but the addressed list size
          does not change.
      setSize(const label, const T&)
        - When the new size is larger than the addressed list size, both allocated
          and addressed list sizes are adjusted.
      NOTE: it might be more consistent to have setSize(label) also adjust the
            addressed list size.  This also corresponds to what previous releases
            did, although I don't know if anyone has relied upon any particular
    • Mark Olesen's avatar
      eliminated label& List::size() completely · 03c27d2b
      Mark Olesen authored
    • mattijs's avatar
      make output compatible with dictionary entries · c713c814
      mattijs authored
    • Mark Olesen's avatar
      more consistent behaviour for DynamicList::setSize() · 8207cf0e
      Mark Olesen authored
       - in most places this can now be used instead of label& List<T>::size(),
         and should also be much safer
    • Mark Olesen's avatar
      Add protected member List::size(const label) and removed some of the old · 8d63073b
      Mark Olesen authored
      usage of the public 'label& List::size()'.
      IMO this method is much too dangerous to leave public - the different
      signature is needed to avoid confusing the compiler.
  25. 09 Oct, 2008 1 commit
  26. 06 Oct, 2008 2 commits
  27. 25 Sep, 2008 1 commit
  28. 23 Sep, 2008 1 commit