From 08d09fede6d2510b93f7294401cc188dc39b0a05 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Fri, 5 Apr 2024 16:54:37 +0200 Subject: [PATCH] Merge both initialize functions --- include/deal.II/base/quadrature.h | 8 -------- source/base/quadrature.cc | 15 +-------------- 2 files changed, 1 insertion(+), 22 deletions(-) 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()); -- 2.39.5