From 98e6d63f27acd0d3635df647c9ef0437a0fc78a3 Mon Sep 17 00:00:00 2001 From: Simon Praetorius Date: Fri, 20 Dec 2019 17:27:10 +0100 Subject: [PATCH] removed dependency on dune-functions interpolate due to breaking changes --- test/DataTransferTest.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/DataTransferTest.hpp b/test/DataTransferTest.hpp index 25678ba5..c5047dc5 100644 --- a/test/DataTransferTest.hpp +++ b/test/DataTransferTest.hpp @@ -84,22 +84,22 @@ double calcError(Problem const& prob, Fcts const& funcs) auto& globalBasis = *prob->globalBasis(); auto localView = globalBasis.localView(); auto const& sol = prob->solution().coefficients(); - std::vector ref; - ref.resize(globalBasis.dimension()); + + auto ref = makeDOFVector(globalBasis, DataTransferOperation::NO_OPERATION); int k = 0; // interpolate given function onto reference vector for_each_leaf_node(localView.tree(), [&](auto const& node, auto tp) { auto gf = makeGridFunction(funcs[k], globalBasis.gridView()); - Dune::Functions::interpolate(globalBasis, tp, ref, gf); + AMDiS::interpolate(globalBasis, ref, gf, tp); k++; }); // compare the solution with the reference double maxError = 0; sol.forEach([&](auto dof, double coeff) { - double error = std::abs(ref[dof] - coeff); + double error = std::abs(ref.at(dof) - coeff); maxError = std::max(maxError, error); }); return maxError; -- GitLab