From b3407f138503cddbecf90f51dda30d8996e2f757 Mon Sep 17 00:00:00 2001 From: Simon Sticko Date: Fri, 13 May 2022 11:29:11 +0200 Subject: [PATCH] Set is_tensor_product_flag in Quadrature::initialize(..) 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/base/quadrature.cc b/source/base/quadrature.cc index 1d99787305..8fc7271a43 100644 --- a/source/base/quadrature.cc +++ b/source/base/quadrature.cc @@ -53,8 +53,9 @@ Quadrature::initialize(const std::vector> &p, const std::vector & w) { AssertDimension(w.size(), p.size()); - quadrature_points = p; - weights = w; + quadrature_points = p; + weights = w; + is_tensor_product_flag = dim == 1; } -- 2.39.5