Skip to content
Snippets Groups Projects
Commit 33c122c5 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

removed usage of hierarchic vector wrapper where not necessary

parent af1bf33d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
#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);
......
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