From 17735b1e08d1b5d0596bbf47a3ae57851f6767b8 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 1 Jul 2023 20:13:38 -0600 Subject: [PATCH] Fix SolutionTransfer to properly compress() vectors. --- source/numerics/solution_transfer.cc | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- 2.39.5