]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use reinit() function internal 14926/head
authorMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Tue, 21 Mar 2023 10:25:06 +0000 (11:25 +0100)
committerMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Tue, 21 Mar 2023 10:25:06 +0000 (11:25 +0100)
include/deal.II/matrix_free/fe_point_evaluation.h

index 1f55b1487a1c714fd536656abc889302d260e11e..958ce2e29ad9f391fb008a953b27e43b65cb56e7 100644 (file)
@@ -970,15 +970,7 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::evaluate(
   const EvaluationFlags::EvaluationFlags &evaluation_flag)
 {
   if (!is_reinitialized)
-    {
-      const_cast<unsigned int &>(n_q_points) =
-        mapping_info->get_unit_points(current_cell_index, current_face_number)
-          .size();
-      if (update_flags & update_values)
-        values.resize(n_q_points, numbers::signaling_nan<value_type>());
-      if (update_flags & update_gradients)
-        gradients.resize(n_q_points, numbers::signaling_nan<gradient_type>());
-    }
+    reinit(numbers::invalid_unsigned_int);
 
   if (n_q_points == 0)
     return;
@@ -1121,15 +1113,7 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::integrate(
   const EvaluationFlags::EvaluationFlags &integration_flags)
 {
   if (!is_reinitialized)
-    {
-      const_cast<unsigned int &>(n_q_points) =
-        mapping_info->get_unit_points(current_cell_index, current_face_number)
-          .size();
-      if (update_flags & update_values)
-        values.resize(n_q_points, numbers::signaling_nan<value_type>());
-      if (update_flags & update_gradients)
-        gradients.resize(n_q_points, numbers::signaling_nan<gradient_type>());
-    }
+    reinit(numbers::invalid_unsigned_int);
 
   if (n_q_points == 0) // no evaluation points provided
     {

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.