]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Suggestion from review
authorMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Wed, 31 May 2023 11:58:42 +0000 (13:58 +0200)
committerMaximilian Bergbauer <maximilian.bergbauer@tum.de>
Wed, 31 May 2023 11:58:42 +0000 (13:58 +0200)
include/deal.II/matrix_free/fe_point_evaluation.h

index 25bb4fc7b38c6bd63b60c70c52dff3ba5ba378fc..b96ace8a0905519229894ed881a2cf331e62d99e 100644 (file)
@@ -1693,20 +1693,22 @@ FEPointEvaluation<n_components_, dim, spacedim, Number>::prepare_evaluate_fast(
     {
       if (use_face_path)
         {
-          ScalarNumber *input  = scratch_data_scalar.begin();
-          ScalarNumber *output = input + dofs_per_component;
-
+          const ScalarNumber *input;
           if (renumber.empty())
-            input = const_cast<ScalarNumber *>(solution_values.data());
+            input = solution_values.data();
           else
             {
               const unsigned int *renumber_ptr =
                 renumber.data() +
                 (component_in_base_element + comp) * dofs_per_component;
               for (unsigned int i = 0; i < dofs_per_component; ++i)
-                input[i] = solution_values[renumber_ptr[i]];
+                scratch_data_scalar[i] = solution_values[renumber_ptr[i]];
+              input = scratch_data_scalar.data();
             }
 
+          ScalarNumber *output =
+            scratch_data_scalar.begin() + dofs_per_component;
+
           internal::FEFaceNormalEvaluationImpl<dim, -1, ScalarNumber>::
             template interpolate<true, false>(1,
                                               evaluation_flags,

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.