From 416f2031031729cde7b28efa8e56bc028faa064b Mon Sep 17 00:00:00 2001 From: Simon Sticko Date: Thu, 10 Jun 2021 08:09:58 +0200 Subject: [PATCH] Add a single point in Quadrature<0> constructor taking Quadrature<1> The constructor currently adds a single weight but no points. This appears to be a mistake, since points and weights get different sizes. Fix this and add an comment in the documentation. --- include/deal.II/base/quadrature.h | 3 +++ source/base/quadrature.cc | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/deal.II/base/quadrature.h b/include/deal.II/base/quadrature.h index 247ef93098..6ef0acbdfb 100644 --- a/include/deal.II/base/quadrature.h +++ b/include/deal.II/base/quadrature.h @@ -124,6 +124,9 @@ public: * This constructor does not require that constant functions are integrated * exactly. Therefore, it is appropriate if the one-dimensional formula * is defined with respect to a weighting function. + * + * If dim == 0, the resulting quadrature formula will be a single Point<0> + * having unit weight. */ explicit Quadrature(const Quadrature &quadrature_1d); diff --git a/source/base/quadrature.cc b/source/base/quadrature.cc index cefe029565..2631376590 100644 --- a/source/base/quadrature.cc +++ b/source/base/quadrature.cc @@ -206,9 +206,8 @@ Quadrature<1>::Quadrature(const SubQuadrature &, const Quadrature<1> &q2) template <> Quadrature<0>::Quadrature(const Quadrature<1> &) : Subscriptor() - , - // quadrature_points(1), - weights(1, 1.) + , quadrature_points(1) + , weights(1, 1.) , is_tensor_product_flag(false) {} -- 2.39.5