Commit 90400883 authored by Praetorius, Simon's avatar Praetorius, Simon

perfect forwarding in capturelist of lambda corrected

parent 00b09ad2
Pipeline #946 passed with stage
in 7 minutes and 6 seconds
......@@ -52,7 +52,7 @@ namespace AMDiS
return 0.0;
#else
return Dune::Hybrid::ifElse(bool_<expr_has_order>,
[&](auto) { return Impl::integrateImpl(std::forward<decltype(gridFct)>(gridFct), gridView, makeQuad); },
[&](auto) { return Impl::integrateImpl(gridFct, gridView, makeQuad); },
[ ](auto) { return 0.0; });
#endif
}
......@@ -69,13 +69,14 @@ namespace AMDiS
/// Integrate expression with quadrature rule determined by provided polynomial `degree`
template <class Expr, class GridView>
auto integrate(Expr&& expr, GridView const& gridView, int degree)
auto integrate(Expr&& expr, GridView const& gridView, int degree,
Dune::QuadratureType::Enum qt = Dune::QuadratureType::GaussLegendre)
{
using QuadratureRules = Dune::QuadratureRules<typename GridView::ctype, GridView::dimension>;
auto&& gridFct = makeGridFunction(std::forward<Expr>(expr), gridView);
return Impl::integrateImpl(std::forward<decltype(gridFct)>(gridFct), gridView,
[&](auto const& type, auto&&) { return QuadratureRules::rule(type, degree); });
[&](auto const& type, auto&&) { return QuadratureRules::rule(type, degree, qt); });
}
} // end namespace AMDiS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment