diff --git a/ProcessLib/CoupledSolutionsForStaggeredScheme.h b/ProcessLib/CoupledSolutionsForStaggeredScheme.h index cfce3363a5ecb74622f48c0d9acc458e5841126d..a799cecacd98bc2a83d16f4bb28287f01699f830 100644 --- a/ProcessLib/CoupledSolutionsForStaggeredScheme.h +++ b/ProcessLib/CoupledSolutionsForStaggeredScheme.h @@ -49,17 +49,13 @@ struct CoupledSolutionsForStaggeredScheme */ struct LocalCoupledSolutions { - LocalCoupledSolutions(std::vector<double>&& local_coupled_xs0_, - std::vector<double>&& local_coupled_xs_) - : local_coupled_xs0(std::move(local_coupled_xs0_)), - local_coupled_xs(std::move(local_coupled_xs_)) + LocalCoupledSolutions(std::vector<double>&& local_coupled_xs0_) + : local_coupled_xs0(std::move(local_coupled_xs0_)) { } /// Local solutions of the previous time step. std::vector<double> const local_coupled_xs0; - /// Local solutions of the current time step. - std::vector<double> const local_coupled_xs; }; /** diff --git a/ProcessLib/VectorMatrixAssembler.cpp b/ProcessLib/VectorMatrixAssembler.cpp index c58d77a181b04639f686bd3041cf1d8414662083..eed34a643709933c789d3b68655fb50d310c053e 100644 --- a/ProcessLib/VectorMatrixAssembler.cpp +++ b/ProcessLib/VectorMatrixAssembler.cpp @@ -70,12 +70,14 @@ void VectorMatrixAssembler::assemble( { auto local_coupled_xs0 = getCoupledLocalSolutions(cpl_xs->coupled_xs_t0, indices_of_processes); + auto local_coupled_xs = getCoupledLocalSolutions(x, indices_of_processes); auto const local_x = MathLib::toVector(local_coupled_xs); + ProcessLib::LocalCoupledSolutions local_coupled_solutions( - std::move(local_coupled_xs0), std::move(local_coupled_xs)); + std::move(local_coupled_xs0)); local_assembler.assembleForStaggeredScheme( t, dt, local_x, process_id, _local_M_data, _local_K_data, @@ -139,13 +141,14 @@ void VectorMatrixAssembler::assembleWithJacobian( { auto local_coupled_xs0 = getCoupledLocalSolutions(cpl_xs->coupled_xs_t0, indices_of_processes); + auto local_coupled_xs = getCoupledLocalSolutions(x, indices_of_processes); auto const local_x = MathLib::toVector(local_coupled_xs); ProcessLib::LocalCoupledSolutions local_coupled_solutions( - std::move(local_coupled_xs0), std::move(local_coupled_xs)); + std::move(local_coupled_xs0)); _jacobian_assembler->assembleWithJacobianForStaggeredScheme( local_assembler, t, dt, local_x, local_xdot, dxdot_dx, dx_dx,