From: Wolfgang Bangerth Date: Sun, 2 Jul 2023 02:13:38 +0000 (-0600) Subject: Fix SolutionTransfer to properly compress() vectors. X-Git-Tag: relicensing~807^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17735b1e08d1b5d0596bbf47a3ae57851f6767b8;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); }