From bf107b9ae8f6d7243c92ba8bfec701a5ebb806b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Gr=C3=A4ser?= <graeser@math.fau.de> Date: Wed, 5 Mar 2025 13:49:22 +0100 Subject: [PATCH] [forms][bugfix] Fix GeometryType in QuadratureRuleKey exported by Forms::Coefficient So far a `Forms::Coefficient` exported a `QuadratureRuleKey` with `GeometryType` being `none` with appropriate dimension. This works when assembling linear and bilinear forms, because we always multiply with at least one unary operator which then sets the correct `GeometryType`. However, if we want to use the nullary operator `Forms::Coefficient` standalone, e.g. to simply integrate it (it's a grid function after all), we silently use the wrong `GeometryType`. Luckily we can always derive the correct `GeometryType` from the element this function is bound to allowing for an easy fix. --- dune/fufem/forms/coefficient.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dune/fufem/forms/coefficient.hh b/dune/fufem/forms/coefficient.hh index e883cb59..eb433eef 100644 --- a/dune/fufem/forms/coefficient.hh +++ b/dune/fufem/forms/coefficient.hh @@ -65,7 +65,7 @@ namespace Dune::Fufem::Forms { auto quadratureRuleKey() const { - return QuadratureRuleKey(Element::dimension, order_); + return QuadratureRuleKey(LocalFunction::localContext().type(), order_); } template<class... LV> -- GitLab