Skip to content

Commit

Permalink
Merge pull request #16335 from bangerth/32-2
Browse files Browse the repository at this point in the history
Fix mistaken std::move assignment.
  • Loading branch information
marcfehling committed Dec 9, 2023
2 parents 29f9da0 + 37082c5 commit 8a9cd37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/step-31/step-31.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 7 additions & 4 deletions examples/step-32/step-32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

{
Expand All @@ -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;
}
}
}
Expand Down

0 comments on commit 8a9cd37

Please sign in to comment.