Skip to content
Snippets Groups Projects
Commit 27de1a49 authored by Lasse Hinrichsen-Bischoff's avatar Lasse Hinrichsen-Bischoff
Browse files

[BlockVectorWindow] allow conversion to BlockVector

parent b3da192c
No related branches found
No related tags found
1 merge request!215Allow autoCopy() for blocks of VariableBlockVector
......@@ -4,6 +4,7 @@
#ifndef DUNE_ISTL_BVECTOR_HH
#define DUNE_ISTL_BVECTOR_HH
#include <algorithm>
#include <cmath>
#include <complex>
#include <initializer_list>
......@@ -709,6 +710,14 @@ namespace Imp {
return *this;
}
//! copy into an independent BlockVector object
operator BlockVector<B, A>() const {
auto bv = BlockVector<B, A>(this->n);
std::copy(this->begin(), this->end(), bv.begin());
return bv;
}
//===== window manipulation methods
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment