From: Martin Kronbichler Date: Fri, 5 Apr 2024 14:54:37 +0000 (+0200) Subject: Merge both initialize functions X-Git-Tag: v9.6.0-rc1~402^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16853%2Fhead;p=dealii.git Merge both initialize functions --- diff --git a/include/deal.II/base/quadrature.h b/include/deal.II/base/quadrature.h index 8827c895fa..d71f739850 100644 --- a/include/deal.II/base/quadrature.h +++ b/include/deal.II/base/quadrature.h @@ -236,14 +236,6 @@ public: bool operator==(const Quadrature &p) const; - /** - * Set the quadrature points and weights to the values provided in the - * arguments. - */ - void - initialize(const std::vector> &points, - const std::vector &weights); - /** * Set the quadrature points and weights to the values provided in the * arguments. The weights array is allowed to be empty, in which case the diff --git a/source/base/quadrature.cc b/source/base/quadrature.cc index 376d12c93a..0aade1577d 100644 --- a/source/base/quadrature.cc +++ b/source/base/quadrature.cc @@ -46,26 +46,13 @@ Quadrature::Quadrature(const unsigned int n_q) -template -void -Quadrature::initialize(const std::vector> &p, - const std::vector &w) -{ - AssertDimension(w.size(), p.size()); - quadrature_points = p; - weights = w; - is_tensor_product_flag = dim == 1; -} - - - template void Quadrature::initialize(const ArrayView> &points, const ArrayView &weights) { this->weights.clear(); - if (!weights.empty()) + if (weights.size() > 0) { AssertDimension(weights.size(), points.size()); this->weights.insert(this->weights.end(), weights.begin(), weights.end());