]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Allow creation of Quadrature objects for dim==0. This is one step in the direction...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 12 Aug 2011 20:07:35 +0000 (20:07 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 12 Aug 2011 20:07:35 +0000 (20:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@24050 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/quadrature.cc
deal.II/source/base/quadrature_lib.cc

index 8dd3ab063966a054d3b2d9203cc6e0f2591a6b10..4b8a0210b40e9b1c71702cafdf2b7e9b72ce7d34 100644 (file)
@@ -40,12 +40,11 @@ namespace
 }
 
 
-//TODO: It would be desirable to have a Tensor<rank,0>
 template <>
-Quadrature<0>::Quadrature (const unsigned int)
+Quadrature<0>::Quadrature (const unsigned int n_q)
                :
-//             quadrature_points(1),
-               weights (1, 1.)
+               quadrature_points (n_q, Point<0>()),
+               weights (n_q, 0)
 {}
 
 
@@ -57,7 +56,8 @@ Quadrature<0>::~Quadrature ()
 
 
 template <int dim>
-Quadrature<dim>::Quadrature (const unsigned int n_q) :
+Quadrature<dim>::Quadrature (const unsigned int n_q)
+               :
                quadrature_points (n_q, Point<dim>()),
                weights (n_q, 0)
 {}
index 643002f91e462fe45abd60e7dd3c95a90dbe2195..5932c6376801193bd83c458e8022ce47f4d33c28 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -41,26 +41,20 @@ namespace
 template <>
 QGauss<0>::QGauss (const unsigned int)
                 :
-                Quadrature<0> (0)
-{
-                                   // this function has to be provided to
-                                   // avoid certain linker failures, but it
-                                   // should never be called
-  Assert (false, ExcInternalError());
-}
+                                                // there are n_q^dim == 1
+                                                // points
+                Quadrature<0> (1)
+{}
 
 
 
 template <>
 QGaussLobatto<0>::QGaussLobatto (const unsigned int)
                 :
-                Quadrature<0> (0)
-{
-                                   // this function has to be provided to
-                                   // avoid certain linker failures, but it
-                                   // should never be called
-  Assert (false, ExcInternalError());
-}
+                                                // there are n_q^dim == 1
+                                                // points
+                Quadrature<0> (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.