From: Wolfgang Bangerth Date: Fri, 8 Dec 2023 17:43:05 +0000 (-0700) Subject: Fix mistaken std::move assignment. X-Git-Tag: relicensing~259^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37082c5aa66dc7cb50c7e4ce55c8460df07fc0a7;p=dealii.git Fix mistaken std::move assignment. --- 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; } } }