]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add constructor for a one-point Quadrature.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Feb 2001 16:56:42 +0000 (16:56 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Feb 2001 16:56:42 +0000 (16:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@3918 0785d39b-7218-0410-832d-ea1e28bc413d

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

index f770c40a98c1bd27a7861cae55938f9277c2d778..b22b01011fb9d4d684de89afd5ea4ba34477b1db 100644 (file)
@@ -96,6 +96,11 @@ class Quadrature : public Subscriptor
                                      */
     Quadrature (const typename std::vector<Point<dim> > &points,
                const std::vector<double>      &weights);
+
+                                    /**
+                                     * Constructor for a one-point quadrature.
+                                     */
+    Quadrature (const Point<dim> &point);
     
                                     /**
                                      * Virtual destructor.
index d3027431ac492f4a7aa761807c53316ec588d7ff..c12e6bd34bea8316477bbc8de0b9c3e5a94ce294 100644 (file)
@@ -52,6 +52,13 @@ Quadrature<dim>::Quadrature (const typename std::vector<Point<dim> >  &points,
 }
 
 
+template <int dim>
+Quadrature<dim>::Quadrature (const Point<dim> &point):
+               n_quadrature_points(1),
+               quadrature_points(vector<Point<dim> > (1, point)),
+               weights(vector<double> (1, 1.))
+{}
+
 
 template <>
 Quadrature<0>::Quadrature (const Quadrature<-1> &,

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.