Skip to content
Snippets Groups Projects
Commit 9345bca9 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[bvector] Remove deprecated 'resize' and 'reserve' with two arguments

parent 508f1ef2
No related branches found
No related tags found
1 merge request!364Feature/remove more deprecated stuff after 2.7
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
- Remove deprecated preconditioner implementations `SeqILU0` and `SeqILUn`. Use - Remove deprecated preconditioner implementations `SeqILU0` and `SeqILUn`. Use
`SeqILU` instead, which implements incomplete LU decomposition of any order. `SeqILU` instead, which implements incomplete LU decomposition of any order.
- Remove deprecated methods 'BlockVector::resize' and 'BlockVecotor::reserve'
with two arguments.
- Drop support SuperLU 4. - Drop support SuperLU 4.
# Release 2.7 # Release 2.7
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <dune/common/deprecated.hh>
#include <dune/common/dotproduct.hh> #include <dune/common/dotproduct.hh>
#include <dune/common/ftraits.hh> #include <dune/common/ftraits.hh>
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
...@@ -486,32 +485,6 @@ namespace Imp { ...@@ -486,32 +485,6 @@ namespace Imp {
storage_.reserve(capacity); storage_.reserve(capacity);
} }
/**
* @brief Reserve space.
*
* After calling this method the vector can hold up to
* capacity values. If the specified capacity is smaller
* than the current capacity and bigger than the current size
* space will be freed.
*
* If the template parameter copyOldValues is true the values will
* be copied. If it is false the old values are lost.
*
* @param capacity The maximum number of elements the vector
* needs to hold.
* @param copyOldValues Ignored, values are always copied.
*
* \deprecated This method is deprecated, since the extra copyOldValues
* parameter is unusual, and the previous implementation did
* not always reduce memory anyway.
*/
DUNE_DEPRECATED_MSG("Use the overload without the second parameter, "
"values are always copied")
void reserve(size_type capacity, bool copyOldValues)
{
reserve(capacity);
}
/** /**
* @brief Get the capacity of the vector. * @brief Get the capacity of the vector.
* *
...@@ -540,33 +513,6 @@ namespace Imp { ...@@ -540,33 +513,6 @@ namespace Imp {
storage_.resize(size); storage_.resize(size);
} }
/**
* @brief Resize the vector.
*
* After calling this method BlockVector::N() will return size
* If the capacity of the vector is smaller than the specified
* size then reserve(size) will be called.
*
* If the template parameter copyOldValues is true the values
* will be copied if the capacity changes. If it is false
* the old values are lost.
* @param size The new size of the vector.
* @param copyOldValues Ignored, values are always copied.
*
* \deprecated This method is deprecated, since the extra copyOldValues
* parameter is unusual and conflicts with the usual meaning
* (default value for newly created elements).
*/
DUNE_DEPRECATED_MSG("Use the overload without the second parameter, "
"values are always copied")
void resize(size_type size, bool copyOldValues)
{
resize(size);
}
//! copy constructor //! copy constructor
BlockVector(const BlockVector &a) BlockVector(const BlockVector &a)
noexcept(noexcept(std::declval<BlockVector>().storage_ = a.storage_)) noexcept(noexcept(std::declval<BlockVector>().storage_ = a.storage_))
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#if HAVE_MPROTECT #if HAVE_MPROTECT
#include <dune/common/debugallocator.hh> #include <dune/common/debugallocator.hh>
#endif #endif
#include <dune/common/deprecated.hh>
#include <dune/common/fvector.hh> #include <dune/common/fvector.hh>
#include <dune/common/poolallocator.hh> #include <dune/common/poolallocator.hh>
#include <dune/common/scalarvectorview.hh> #include <dune/common/scalarvectorview.hh>
...@@ -108,14 +107,6 @@ void testCapacity() ...@@ -108,14 +107,6 @@ void testCapacity()
for(int i=0; i<10; ++i) for(int i=0; i<10; ++i)
vec[i]=Dune::BlockVector<SmallVector>(10); vec[i]=Dune::BlockVector<SmallVector>(10);
ThreeLevelVector vec1=vec; ThreeLevelVector vec1=vec;
DUNE_NO_DEPRECATED_BEGIN
vec.reserve(20, true);
vec.reserve(10, true);
vec.reserve(5, false);
vec.reserve(20, false);
vec.reserve(0, true);
vec1.reserve(0, false);
DUNE_NO_DEPRECATED_END
} }
template <class V> template <class V>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment