]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FEPointEvaluation::integrate(): zero out solution array also if no points given 12235/head
authorMaximilian Bergbauer <bergbauer@lnm.mw.tum.de>
Tue, 18 May 2021 04:31:30 +0000 (06:31 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Tue, 18 May 2021 04:33:59 +0000 (06:33 +0200)
include/deal.II/fe/fe_point_evaluation.h

index f945b72b10c6cd6d5a00230611cf7cd4b348301f..552e3bf7e1ccd1698857f14abcdd5f851d49bdfb 100644 (file)
@@ -783,7 +783,10 @@ FEPointEvaluation<n_components, dim, spacedim, Number>::integrate(
   const EvaluationFlags::EvaluationFlags &                    integration_flags)
 {
   if (unit_points.size() == 0) // no evaluation points provided
-    return;
+    {
+      std::fill(solution_values.begin(), solution_values.end(), 0.0);
+      return;
+    }
 
   AssertDimension(solution_values.size(), fe->dofs_per_cell);
   if (false /*TODO*/ && (((integration_flags & EvaluationFlags::values) ||

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.