From 37082c5aa66dc7cb50c7e4ce55c8460df07fc0a7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 8 Dec 2023 10:43:05 -0700 Subject: [PATCH] Fix mistaken std::move assignment. --- examples/step-31/step-31.cc | 4 ++-- examples/step-32/step-32.cc | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/step-31/step-31.cc b/examples/step-31/step-31.cc index 4b01b57787..788028c682 100644 --- a/examples/step-31/step-31.cc +++ b/examples/step-31/step-31.cc @@ -1975,8 +1975,8 @@ namespace Step31 TrilinosWrappers::MPI::Vector(temperature_solution)}; temperature_trans.interpolate(x_temperature, tmp); - temperature_solution = std::move(tmp[0]); - old_temperature_solution = std::move(tmp[1]); + temperature_solution = tmp[0]; + old_temperature_solution = tmp[1]; // After the solution has been transferred we then enforce the constraints // on the transferred solution. diff --git a/examples/step-32/step-32.cc b/examples/step-32/step-32.cc index 4ff165b3c1..cb3b2ff255 100644 --- a/examples/step-32/step-32.cc +++ b/examples/step-32/step-32.cc @@ -3326,8 +3326,11 @@ namespace Step32 temperature_constraints.distribute(distributed_temp1); temperature_constraints.distribute(distributed_temp2); - temperature_solution = std::move(distributed_temp1); - old_temperature_solution = std::move(distributed_temp2); + temperature_solution = distributed_temp1; + old_temperature_solution = distributed_temp2; + + Assert(old_temperature_solution.has_ghost_elements(), + ExcInternalError()); } { @@ -3344,8 +3347,8 @@ namespace Step32 stokes_constraints.distribute(distributed_stokes); stokes_constraints.distribute(old_distributed_stokes); - stokes_solution = std::move(distributed_stokes); - old_stokes_solution = std::move(old_distributed_stokes); + stokes_solution = distributed_stokes; + old_stokes_solution = old_distributed_stokes; } } } -- 2.39.5