From 376ca5e1e0b7c6217440a85a2afb9a5c13e2f030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20H=C3=B6rl?= <maximilian.hoerl@mathematik.uni-stuttgart.de> Date: Fri, 20 Mar 2020 18:27:29 +0100 Subject: [PATCH] fix wrong quadrature order in Poisson problem --- dune/mmdg/problems/dgproblem.hh | 2 +- dune/mmdg/problems/poisson.hh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dune/mmdg/problems/dgproblem.hh b/dune/mmdg/problems/dgproblem.hh index b59b0a6..5f7e630 100644 --- a/dune/mmdg/problems/dgproblem.hh +++ b/dune/mmdg/problems/dgproblem.hh @@ -56,7 +56,7 @@ class DGProblem } //returns the recommended quadrature order to compute an integral - //over x * boundary(x) + //over x * boundary(x) and K(x) * boundary(x) virtual int quadratureOrderBoundary () const { return 1; diff --git a/dune/mmdg/problems/poisson.hh b/dune/mmdg/problems/poisson.hh index 571d176..549fb82 100644 --- a/dune/mmdg/problems/poisson.hh +++ b/dune/mmdg/problems/poisson.hh @@ -8,6 +8,8 @@ template<class Coordinate, class Scalar = double> class Poisson : public DGProblem<Coordinate, Scalar> { public: + static constexpr int dim = Coordinate::dimension; + //the exact solution at position pos //1d: f(x) = x, //2d: f(x,y) = x*y, @@ -29,6 +31,13 @@ class Poisson : public DGProblem<Coordinate, Scalar> { return true; }; + + //returns the recommended quadrature order to compute an integral + //over x * boundary(x) and K(x) * boundary(x) + int quadratureOrderBoundary () const + { + return dim; + } }; #endif -- GitLab