From: Wolfgang Bangerth Date: Sun, 2 Jul 2023 02:13:38 +0000 (-0600) Subject: Fix SolutionTransfer to properly compress() vectors. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b188f4384334bb324948b09f933609b82af0515;p=dealii.git Fix SolutionTransfer to properly compress() vectors. --- diff --git a/source/numerics/solution_transfer.cc b/source/numerics/solution_transfer.cc index 90d5885ac8..74bffa4ec3 100644 --- a/source/numerics/solution_transfer.cc +++ b/source/numerics/solution_transfer.cc @@ -583,6 +583,11 @@ SolutionTransfer::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); }