From 10d6c1157039e73eeda74a99de1c8c4bf5f7eb4c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 19 Oct 2005 15:19:44 +0000 Subject: [PATCH] Simplify some code. git-svn-id: https://svn.dealii.org/trunk@11627 0785d39b-7218-0410-832d-ea1e28bc413d --- .../source/fe/fe_raviart_thomas_nodal.cc | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) 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()); } -- 2.39.5