]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MatrixFree: Use constexpr when selecting evaluator factory 15940/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Tue, 29 Aug 2023 11:35:14 +0000 (13:35 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Tue, 29 Aug 2023 11:38:36 +0000 (13:38 +0200)
include/deal.II/matrix_free/fe_evaluation.h

index d6381d957a456126a2b73768cc1ce9c8014c07e3..3c291b67ef41cab8f3aeb95a539d8a210e10a646 100644 (file)
@@ -7848,7 +7848,7 @@ FEEvaluation<dim,
       (this->cell_type > internal::MatrixFreeFunctions::affine))
     evaluation_flag_actual |= EvaluationFlags::values;
 
-  if (fe_degree > -1)
+  if constexpr (fe_degree > -1)
     {
       SelectEvaluator<dim, fe_degree, n_q_points_1d, VectorizedArrayType>::
         evaluate(n_components, evaluation_flag_actual, values_array, *this);
@@ -8077,7 +8077,7 @@ FEEvaluation<dim,
         }
     }
 
-  if (fe_degree > -1)
+  if constexpr (fe_degree > -1)
     {
       SelectEvaluator<dim, fe_degree, n_q_points_1d, VectorizedArrayType>::
         integrate(n_components,
@@ -8540,7 +8540,7 @@ FEFaceEvaluation<dim,
       (this->cell_type > internal::MatrixFreeFunctions::affine))
     evaluation_flag_actual |= EvaluationFlags::values;
 
-  if (fe_degree > -1)
+  if constexpr (fe_degree > -1)
     internal::FEFaceEvaluationImplEvaluateSelector<dim, VectorizedArrayType>::
       template run<fe_degree, n_q_points_1d>(n_components,
                                              evaluation_flag_actual,
@@ -8646,7 +8646,7 @@ FEFaceEvaluation<dim,
         }
     }
 
-  if (fe_degree > -1)
+  if constexpr (fe_degree > -1)
     internal::FEFaceEvaluationImplIntegrateSelector<dim, VectorizedArrayType>::
       template run<fe_degree, n_q_points_1d>(n_components,
                                              integration_flag_actual,
@@ -8703,7 +8703,7 @@ FEFaceEvaluation<dim,
                  this->dof_info->index_storage_variants[this->dof_access_index]
                                                        [this->cell]))
     {
-      if (fe_degree > -1)
+      if constexpr (fe_degree > -1)
         {
           internal::FEFaceEvaluationImplGatherEvaluateSelector<
             dim,
@@ -8820,7 +8820,7 @@ FEFaceEvaluation<dim,
                  this->dof_info->index_storage_variants[this->dof_access_index]
                                                        [this->cell]))
     {
-      if (fe_degree > -1)
+      if constexpr (fe_degree > -1)
         {
           internal::FEFaceEvaluationImplIntegrateScatterSelector<
             dim,

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.