]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix SolutionTransfer to properly compress() vectors.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 2 Jul 2023 02:13:38 +0000 (20:13 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 2 Jul 2023 02:16:25 +0000 (20:16 -0600)
source/numerics/solution_transfer.cc

index 90d5885ac897b1485773589101e86cdaadb7ce57..74bffa4ec32da60a8ed3c07ea57ab88a3f0128cf 100644 (file)
@@ -583,6 +583,11 @@ SolutionTransfer<dim, VectorType, spacedim>::interpolate(
             Assert(false, ExcInternalError());
         }
     }
+
+  // We have written into the output vectors. If this was a PETSc vector, for
+  // example, then we need to compress these to make future operations safe:
+  for (auto &vec : all_out)
+    vec.compress(VectorOperation::insert);
 }
 
 

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.