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 ...@@ -52,7 +52,7 @@ namespace AMDiS
return 0.0; return 0.0;
#else #else
return Dune::Hybrid::ifElse(bool_<expr_has_order>, 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; }); [ ](auto) { return 0.0; });
#endif #endif
} }
...@@ -69,13 +69,14 @@ namespace AMDiS ...@@ -69,13 +69,14 @@ namespace AMDiS
/// Integrate expression with quadrature rule determined by provided polynomial `degree` /// Integrate expression with quadrature rule determined by provided polynomial `degree`
template <class Expr, class GridView> 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>; using QuadratureRules = Dune::QuadratureRules<typename GridView::ctype, GridView::dimension>;
auto&& gridFct = makeGridFunction(std::forward<Expr>(expr), gridView); auto&& gridFct = makeGridFunction(std::forward<Expr>(expr), gridView);
return Impl::integrateImpl(std::forward<decltype(gridFct)>(gridFct), 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 } // 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