]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Set is_tensor_product_flag in Quadrature::initialize(..) 13729/head
authorSimon Sticko <simon@sticko.se>
Fri, 13 May 2022 09:29:11 +0000 (11:29 +0200)
committerSimon Sticko <simon@sticko.se>
Fri, 13 May 2022 09:52:26 +0000 (11:52 +0200)
If you first create a quadrature which is a tensor product and then
call initialize with points and weights which does not correspond
to a tensor product, you can make is_tensor_product_flag have the
wrong value. Set the flag in intialize(..) to avoid this.

source/base/quadrature.cc

index 1d9978730527b1cdb31fb32d42e766baa537d558..8fc7271a43c7067bf3107328ba139a39704990a9 100644 (file)
@@ -53,8 +53,9 @@ Quadrature<dim>::initialize(const std::vector<Point<dim>> &p,
                             const std::vector<double> &    w)
 {
   AssertDimension(w.size(), p.size());
-  quadrature_points = p;
-  weights           = w;
+  quadrature_points      = p;
+  weights                = w;
+  is_tensor_product_flag = dim == 1;
 }
 
 

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.