From: bangerth Date: Fri, 12 Aug 2011 20:07:35 +0000 (+0000) Subject: Allow creation of Quadrature objects for dim==0. This is one step in the direction... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0782b1ad1ccec544e422a520eb0bd6ba71e8a4f4;p=dealii-svn.git Allow creation of Quadrature objects for dim==0. This is one step in the direction of making FEFaceValue work in 1d. git-svn-id: https://svn.dealii.org/trunk@24050 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/base/quadrature.cc b/deal.II/source/base/quadrature.cc index 8dd3ab0639..4b8a0210b4 100644 --- a/deal.II/source/base/quadrature.cc +++ b/deal.II/source/base/quadrature.cc @@ -40,12 +40,11 @@ namespace } -//TODO: It would be desirable to have a Tensor 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 -Quadrature::Quadrature (const unsigned int n_q) : +Quadrature::Quadrature (const unsigned int n_q) + : quadrature_points (n_q, Point()), weights (n_q, 0) {} diff --git a/deal.II/source/base/quadrature_lib.cc b/deal.II/source/base/quadrature_lib.cc index 643002f91e..5932c63768 100644 --- a/deal.II/source/base/quadrature_lib.cc +++ b/deal.II/source/base/quadrature_lib.cc @@ -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) +{}