- 20 Jan, 2009 1 commit
-
-
Mark Olesen authored
- added STL-compatible resize() method. Should this be the primary entry point? - made [DS]LListBase end iterators private
-
- 19 Jan, 2009 2 commits
-
-
mattijs authored
-
Mark Olesen authored
-
- 16 Jan, 2009 1 commit
-
-
Mark Olesen authored
- uniform use of reinterpret_cast<foo*>(0) instead of reinterpret_cast<foo*>(NULL) - make all static null() members inline since they are really only a cast: "*reinterpret_cast<foo*>(0)"
-
- 15 Jan, 2009 1 commit
-
-
Mark Olesen authored
- nice idea, but need to convince compiler that division by zero doesn't occur
-
- 14 Jan, 2009 1 commit
-
-
Mark Olesen authored
-
- 09 Jan, 2009 1 commit
-
-
Mark Olesen authored
-
- 05 Jan, 2009 1 commit
-
-
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.
-
- 02 Jan, 2009 1 commit
-
-
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));
-
- 31 Dec, 2008 1 commit
-
-
Mark Olesen authored
-
- 29 Nov, 2008 1 commit
-
-
Mark Olesen authored
- using SizeInc to define the granularity in the SizeMult=0 needed?
-
- 25 Nov, 2008 1 commit
-
-
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()
-
- 24 Nov, 2008 1 commit
-
-
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
-
- 23 Nov, 2008 2 commits
-
-
Mark Olesen authored
-
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!
-
- 20 Nov, 2008 1 commit
-
-
Mark Olesen authored
-
- 19 Nov, 2008 2 commits
-
-
Mark Olesen authored
- now works as expected with transfer() and assignment from other Lists - shrink() method : clears indices and returns underlying List
-
Mark Olesen authored
- changed template<class List> to template<class ListType> for better distinction between List as class and as template type
-
- 18 Nov, 2008 2 commits
-
-
Mark Olesen authored
PackedList with (const UList<label>&) instead of (const labelList&)
-
Mark Olesen authored
- moved SortableList<T>::less class to UList<T>::less for better accessibility - add clear() method now also handles the indices - indices length is caught in sort() - indices remain (mostly) zero-sized until after sort() - allow non-const access to indices
-
- 07 Nov, 2008 1 commit
-
-
Mark Olesen authored
-
- 31 Oct, 2008 1 commit
-
-
mattijs authored
-
- 21 Oct, 2008 2 commits
-
-
mattijs authored
-
Mark Olesen authored
- transfer(DynamicList&) now preserves the allocated space as-is - operator=(const List&) should now avoid spurious allocation/deallocation
-
- 20 Oct, 2008 1 commit
-
-
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!
-
- 17 Oct, 2008 1 commit
-
-
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
-
- 16 Oct, 2008 1 commit
-
-
Andrew Heather authored
-
- 13 Oct, 2008 2 commits
-
-
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 authored
-
- 10 Oct, 2008 6 commits
-
-
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(); myList.setSize(largerSize); myList.setSize(prevSize); or introduce an equivalent allocSize(const label) method if this is needed
-
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 behaviour
-
Mark Olesen authored
-
mattijs authored
-
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 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.
-
- 09 Oct, 2008 1 commit
-
-
Mark Olesen authored
-
- 06 Oct, 2008 2 commits
-
-
Mark Olesen authored
-
Mark Olesen authored
-
- 25 Sep, 2008 1 commit
-
-
mattijs authored
-
- 23 Sep, 2008 1 commit
-
-
Mark Olesen authored
-