]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make code a bit more readable. 12868/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 22 Oct 2021 23:27:13 +0000 (17:27 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 22 Oct 2021 23:28:53 +0000 (17:28 -0600)
include/deal.II/numerics/data_out_dof_data.templates.h

index 763083b3537678e5e8917e27e02ed9b218b5a114..5e8c6eb1e7d9023a22aa53be7db744a03af5720f 100644 (file)
@@ -282,7 +282,6 @@ namespace internal
                                                ReferenceCells::Pyramid);
            }));
 
-      unsigned int n_q_points = 0;
       if (use_face_values == false)
         {
           std::unique_ptr<dealii::Quadrature<dim>> 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<dim - 1> quadrature(
             QIterated<dim - 1>(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();
+        }
     }
 
 

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.