From: Wolfgang Bangerth Date: Wed, 19 Oct 2005 15:19:44 +0000 (+0000) Subject: Simplify some code. X-Git-Tag: v8.0.0~12976 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10d6c1157039e73eeda74a99de1c8c4bf5f7eb4c;p=dealii.git Simplify some code. git-svn-id: https://svn.dealii.org/trunk@11627 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc b/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc index a64af0bf83..dccd6ec23d 100644 --- a/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc +++ b/deal.II/deal.II/source/fe/fe_raviart_thomas_nodal.cc @@ -377,16 +377,21 @@ FE_RaviartThomasNodal::initialize_support_points (const unsigned int deg) for (unsigned int d=0;d* quadrature; - if (dim == 1) quadrature = new QAnisotropic(high); - if (dim == 2) quadrature = new QAnisotropic(((d==0) ? low : high), - ((d==1) ? low : high)); - if (dim == 3) quadrature = new QAnisotropic(((d==0) ? low : high), - ((d==1) ? low : high), - ((d==2) ? low : high)); - for (unsigned int k=0;kn_quadrature_points;++k) - this->generalized_support_points[current++] = quadrature->point(k); - delete quadrature; + const QAnisotropic + quadrature (dim == 1 ? + QAnisotropic(high) : + (dim == 2 ? + QAnisotropic(((d==0) ? low : high), + ((d==1) ? low : high)) : + (dim == 3 ? + QAnisotropic(((d==0) ? low : high), + ((d==1) ? low : high), + ((d==2) ? low : high)) + : + throw ExcNotImplemented()))); + + for (unsigned int k=0;kgeneralized_support_points[current++] = quadrature.point(k); } Assert (current == this->dofs_per_cell, ExcInternalError()); }