]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Merge both initialize functions 16853/head
authorMartin Kronbichler <martin.kronbichler@rub.de>
Fri, 5 Apr 2024 14:54:37 +0000 (16:54 +0200)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Fri, 5 Apr 2024 14:54:45 +0000 (16:54 +0200)
include/deal.II/base/quadrature.h
source/base/quadrature.cc

index 8827c895fac5cfff4677caec5919522f3cecc277..d71f739850ff12ea61cff9903524131994fb832d 100644 (file)
@@ -236,14 +236,6 @@ public:
   bool
   operator==(const Quadrature<dim> &p) const;
 
-  /**
-   * Set the quadrature points and weights to the values provided in the
-   * arguments.
-   */
-  void
-  initialize(const std::vector<Point<dim>> &points,
-             const std::vector<double>     &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
index 376d12c93aa5b5fa3ec43c86df296e586f51d6ae..0aade1577def7eb9caa5f91c1f4bb5f1ca430d17 100644 (file)
@@ -46,26 +46,13 @@ Quadrature<dim>::Quadrature(const unsigned int n_q)
 
 
 
-template <int dim>
-void
-Quadrature<dim>::initialize(const std::vector<Point<dim>> &p,
-                            const std::vector<double>     &w)
-{
-  AssertDimension(w.size(), p.size());
-  quadrature_points      = p;
-  weights                = w;
-  is_tensor_product_flag = dim == 1;
-}
-
-
-
 template <int dim>
 void
 Quadrature<dim>::initialize(const ArrayView<const Point<dim>> &points,
                             const ArrayView<const double>     &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());

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.