Skip to content
Snippets Groups Projects
Commit c5b258f6 authored by Max Kahnt's avatar Max Kahnt
Browse files

Move GenericVector::truncate to dune-matrix-vector module.

parent ff529923
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -21,6 +21,8 @@
#include <dune/istl/bcrsmatrix.hh>
#include <dune/istl/bvector.hh>
#include <dune/matrix-vector/genericvectortools.hh>
#include <dune/solvers/operators/sumoperator.hh>
/** \brief Various tools for working with istl vectors of arbitrary nesting depth
......@@ -108,16 +110,11 @@ struct GenericVector
static void resize(std::bitset<n>& a DUNE_UNUSED, const VectorTypeB& b DUNE_UNUSED)
{}
//! Set vector to zero at indices that are true in bitvector recursivly
template <class VectorType, class BitVectorType>
static void truncate(VectorType& v, const BitVectorType& tr)
{
typename VectorType::iterator it = v.begin();
typename VectorType::iterator end = v.end();
for(; it!=end; ++it)
GenericVector::truncate(*it, tr[it.index()]);
Dune::MatrixVector::Generic::truncate(v, tr);
}
template <class field_type, int n, class BitVectorType>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment