]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FEEvaluation: Ensure assertions in get_value/gradient are working 16789/head
authorMartin Kronbichler <martin.kronbichler@rub.de>
Tue, 26 Mar 2024 16:53:41 +0000 (17:53 +0100)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Tue, 26 Mar 2024 16:53:41 +0000 (17:53 +0100)
include/deal.II/matrix_free/fe_evaluation.h

index 913a8418f0bc2d4f99f0fcb356089193afbe467d..83d3eb462e8448e695593fb35049456771807b77 100644 (file)
@@ -6636,12 +6636,12 @@ FEEvaluation<dim,
     }
 
 #  ifdef DEBUG
-  if (evaluation_flag_actual & EvaluationFlags::values)
-    this->values_quad_initialized = true;
-  if (evaluation_flag_actual & EvaluationFlags::gradients)
-    this->gradients_quad_initialized = true;
-  if (evaluation_flag_actual & EvaluationFlags::hessians)
-    this->hessians_quad_initialized = true;
+  this->values_quad_initialized =
+    evaluation_flag_actual & EvaluationFlags::values;
+  this->gradients_quad_initialized =
+    evaluation_flag_actual & EvaluationFlags::gradients;
+  this->hessians_quad_initialized =
+    evaluation_flag_actual & EvaluationFlags::hessians;
 #  endif
 }
 
@@ -7340,12 +7340,12 @@ FEFaceEvaluation<dim,
       n_components, evaluation_flag_actual, values_array, *this);
 
 #  ifdef DEBUG
-  if (evaluation_flag_actual & EvaluationFlags::values)
-    this->values_quad_initialized = true;
-  if (evaluation_flag_actual & EvaluationFlags::gradients)
-    this->gradients_quad_initialized = true;
-  if ((evaluation_flag_actual & EvaluationFlags::hessians) != 0u)
-    this->hessians_quad_initialized = true;
+  this->values_quad_initialized =
+    evaluation_flag_actual & EvaluationFlags::values;
+  this->gradients_quad_initialized =
+    evaluation_flag_actual & EvaluationFlags::gradients;
+  this->hessians_quad_initialized =
+    evaluation_flag_actual & EvaluationFlags::hessians;
 #  endif
 }
 
@@ -7474,12 +7474,12 @@ FEFaceEvaluation<dim,
       evaluate_in_face(n_components, evaluation_flag_actual, *this);
 
 #  ifdef DEBUG
-  if (evaluation_flag_actual & EvaluationFlags::values)
-    this->values_quad_initialized = true;
-  if (evaluation_flag_actual & EvaluationFlags::gradients)
-    this->gradients_quad_initialized = true;
-  if ((evaluation_flag_actual & EvaluationFlags::hessians) != 0u)
-    this->hessians_quad_initialized = true;
+  this->values_quad_initialized =
+    evaluation_flag_actual & EvaluationFlags::values;
+  this->gradients_quad_initialized =
+    evaluation_flag_actual & EvaluationFlags::gradients;
+  this->hessians_quad_initialized =
+    evaluation_flag_actual & EvaluationFlags::hessians;
 #  endif
 }
 
@@ -7821,12 +7821,10 @@ FEFaceEvaluation<dim,
     }
 
 #  ifdef DEBUG
-  if (evaluation_flag & EvaluationFlags::values)
-    this->values_quad_initialized = true;
-  if (evaluation_flag & EvaluationFlags::gradients)
-    this->gradients_quad_initialized = true;
-  if (evaluation_flag & EvaluationFlags::hessians)
-    this->hessians_quad_initialized = true;
+  this->values_quad_initialized = evaluation_flag & EvaluationFlags::values;
+  this->gradients_quad_initialized =
+    evaluation_flag & EvaluationFlags::gradients;
+  this->hessians_quad_initialized = evaluation_flag & EvaluationFlags::hessians;
 #  endif
 }
 

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.