#include <deal.II/base/config.h>
+#include <deal.II/base/array_view.h>
#include <deal.II/base/point.h>
#include <deal.II/base/subscriptor.h>
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
+ * weights are set to infinity. The resulting object is therefore not meant
+ * to actually perform integrations, but rather to be used with FEValues
+ * objects in order to find the position of some points (the quadrature
+ * points in this object) on the transformed cell in real space.
+ */
+ void
+ initialize(const ArrayView<const Point<dim>> &points,
+ const ArrayView<const double> &weights = {});
+
/**
* Number of quadrature points.
*/
+template <int dim>
+void
+Quadrature<dim>::initialize(const ArrayView<const Point<dim>> &points,
+ const ArrayView<const double> &weights)
+{
+ this->weights.clear();
+ if (!weights.empty())
+ {
+ AssertDimension(weights.size(), points.size());
+ this->weights.insert(this->weights.end(), weights.begin(), weights.end());
+ }
+ else
+ this->weights.resize(points.size(),
+ std::numeric_limits<double>::infinity());
+
+ quadrature_points.clear();
+ quadrature_points.insert(quadrature_points.end(),
+ points.begin(),
+ points.end());
+
+ is_tensor_product_flag = dim == 1;
+}
+
+
+
template <int dim>
Quadrature<dim>::Quadrature(const std::vector<Point<dim>> &points,
const std::vector<double> &weights)