diff --git a/src/amdis/DirichletBC.hpp b/src/amdis/DirichletBC.hpp index 30960d343be66ef19a143304054ef5847f032d0c..feaaa011a76af22c704d9c682253eb99ed4de687 100644 --- a/src/amdis/DirichletBC.hpp +++ b/src/amdis/DirichletBC.hpp @@ -11,7 +11,6 @@ #include <amdis/Output.hpp> #include <amdis/common/Concepts.hpp> #include <amdis/common/ValueCategory.hpp> -#include <amdis/linear_algebra/HierarchicWrapper.hpp> #include <amdis/utility/RangeType.hpp> #include <amdis/utility/TreeData.hpp> @@ -84,14 +83,12 @@ namespace AMDiS using Dune::Functions::interpolate; Dune::Hybrid::ifElse(std::is_same<RangeType_t<typename RowBasis::LocalView::Tree>, Range>{}, [&](auto id) { - auto rhsWrapper = hierarchicVectorWrapper(rhs.vector()); - interpolate(id(rowBasis), rhsWrapper, values_, dirichletNodes_); + interpolate(id(rowBasis), rhs, values_, dirichletNodes_); }); Dune::Hybrid::ifElse(std::is_same<RangeType_t<typename ColBasis::LocalView::Tree>, Range>{}, [&](auto id) { - auto solutionWrapper = hierarchicVectorWrapper(solution.vector()); - interpolate(id(colBasis), solutionWrapper, values_, dirichletNodes_); + interpolate(id(colBasis), solution, values_, dirichletNodes_); }); // subtract columns of dirichlet nodes from rhs diff --git a/test/DOFVectorTest.cpp b/test/DOFVectorTest.cpp index a1706a5b90537cb71dbd8bb2ec952e1fc5f5285e..30b89ccf1cc25d5d37057389230868c7914e8e65 100644 --- a/test/DOFVectorTest.cpp +++ b/test/DOFVectorTest.cpp @@ -1,5 +1,8 @@ +#include "config.h" + #include <dune/common/filledarray.hh> #include <dune/grid/yaspgrid.hh> +#include <dune/functions/backends/concepts.hh> #include <dune/functions/functionspacebases/compositebasis.hh> #include <dune/functions/functionspacebases/powerbasis.hh> #include <dune/functions/functionspacebases/lagrangebasis.hh> @@ -23,10 +26,15 @@ void test_dofvector(B const& basis, DOFVector<B,T>& vec) auto m1 = std::max_element(std::begin(vec.vector()), std::end(vec.vector())); AMDIS_TEST( *m0 == T(0) ); AMDIS_TEST( *m1 == T(1) ); + + // DOFVector models the concept of a VectorBackend in Dune::Functions + static_assert(Dune::models<Dune::Functions::Concept::VectorBackend<B>, decltype(vec)>(), ""); } -int main() +int main(int argc, char** argv) { + Dune::MPIHelper::instance(argc, argv); + // create grid Dune::FieldVector<double, 2> L; L = 1.0; auto s = Dune::filledArray<2>(1);