From: kanschat Date: Sun, 5 Dec 2010 18:03:29 +0000 (+0000) Subject: add initializer for Quadrature X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cb23cbd2de2069f15f9641f9773c38e03f2458b;p=dealii-svn.git add initializer for Quadrature git-svn-id: https://svn.dealii.org/trunk@22918 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/quadrature.h b/deal.II/include/deal.II/base/quadrature.h index d99b5a7c42..fa0fb7dc75 100644 --- a/deal.II/include/deal.II/base/quadrature.h +++ b/deal.II/include/deal.II/base/quadrature.h @@ -191,6 +191,14 @@ class Quadrature : public Subscriptor */ Quadrature& operator = (const Quadrature&); + /** + * Set the quadrature points and + * weights to the values provided + * in the arguments. + */ + void initialize(const std::vector > &points, + const std::vector &weights); + /** * Virtual destructor. */ diff --git a/deal.II/source/base/quadrature.cc b/deal.II/source/base/quadrature.cc index 89b43f7bdb..7e889c7e18 100644 --- a/deal.II/source/base/quadrature.cc +++ b/deal.II/source/base/quadrature.cc @@ -64,6 +64,18 @@ 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; +} + + + template Quadrature::Quadrature (const std::vector > &points, const std::vector &weights)