From: Wolfgang Bangerth Date: Fri, 22 Oct 2021 23:27:13 +0000 (-0600) Subject: Make code a bit more readable. X-Git-Tag: v9.4.0-rc1~905^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12868%2Fhead;p=dealii.git Make code a bit more readable. --- diff --git a/include/deal.II/numerics/data_out_dof_data.templates.h b/include/deal.II/numerics/data_out_dof_data.templates.h index 763083b353..5e8c6eb1e7 100644 --- a/include/deal.II/numerics/data_out_dof_data.templates.h +++ b/include/deal.II/numerics/data_out_dof_data.templates.h @@ -282,7 +282,6 @@ namespace internal ReferenceCells::Pyramid); })); - unsigned int n_q_points = 0; if (use_face_values == false) { std::unique_ptr> quadrature_simplex; @@ -326,12 +325,6 @@ namespace internal .get_unit_support_points()); } - n_q_points = - std::max({needs_wedge_setup ? quadrature_wedge->size() : 0, - needs_simplex_setup ? quadrature_simplex->size() : 0, - needs_hypercube_setup ? quadrature_hypercube->size() : 0, - needs_pyramid_setup ? quadrature_pyramid->size() : 0}); - x_fe_values.resize(finite_elements.size()); for (unsigned int i = 0; i < finite_elements.size(); ++i) { @@ -379,12 +372,19 @@ namespace internal update_flags); } } + + // Return maximal number of evaluation points: + return std::max( + {needs_wedge_setup ? quadrature_wedge->size() : 0, + needs_simplex_setup ? quadrature_simplex->size() : 0, + needs_hypercube_setup ? quadrature_hypercube->size() : 0, + needs_pyramid_setup ? quadrature_pyramid->size() : 0}); } else // build FEFaceValues objects instead { dealii::hp::QCollection quadrature( QIterated(QTrapezoid<1>(), n_subdivisions)); - n_q_points = quadrature[0].size(); + x_fe_face_values.resize(finite_elements.size()); for (unsigned int i = 0; i < finite_elements.size(); ++i) { @@ -404,9 +404,10 @@ namespace internal quadrature, update_flags); } - } - return n_q_points; + // Return maximal number of evaluation points: + return quadrature[0].size(); + } }