]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add initializer for Quadrature
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 5 Dec 2010 18:03:29 +0000 (18:03 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 5 Dec 2010 18:03:29 +0000 (18:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@22918 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/quadrature.h
deal.II/source/base/quadrature.cc

index d99b5a7c421bf6046c01a369a80c9dbd0b3671e2..fa0fb7dc75619257d4882e2440a0f828e972879c 100644 (file)
@@ -191,6 +191,14 @@ class Quadrature : public Subscriptor
                                      */
     Quadrature& operator = (const Quadrature<dim>&);
 
+                                    /**
+                                     * 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);
+    
                                     /**
                                      * Virtual destructor.
                                      */
index 89b43f7bdbf5ac7b1892b9558721c3a2cbb13810..7e889c7e18fc2e683b0f28e91e6dce66a32e4656 100644 (file)
@@ -64,6 +64,18 @@ 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;
+}
+
+
+
 template <int dim>
 Quadrature<dim>::Quadrature (const std::vector<Point<dim> > &points,
                             const std::vector<double>      &weights)

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.