]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a single point in Quadrature<0> constructor taking Quadrature<1> 12432/head
authorSimon Sticko <simon@sticko.se>
Thu, 10 Jun 2021 06:09:58 +0000 (08:09 +0200)
committerSimon Sticko <simon@sticko.se>
Thu, 10 Jun 2021 06:09:58 +0000 (08:09 +0200)
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
source/base/quadrature.cc

index 247ef93098dcd6c303ed2decb18800d0a4b1b2d7..6ef0acbdfb167e3b8e7e65ba5412a741c0b7ffb3 100644 (file)
@@ -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<dim != 1 ? 1 : 0> &quadrature_1d);
 
index cefe029565573e06ee5b298a9057ff12e0ec76c4..263137659099ea41fd00dd49535bfb95de4cb090 100644 (file)
@@ -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)
 {}
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.