Skip to content
Snippets Groups Projects
Commit ad88cbf1 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[PL] Remove local_xs from CoupledSolsForStagg.

parent 04850ec0
No related branches found
No related tags found
No related merge requests found
...@@ -49,17 +49,13 @@ struct CoupledSolutionsForStaggeredScheme ...@@ -49,17 +49,13 @@ struct CoupledSolutionsForStaggeredScheme
*/ */
struct LocalCoupledSolutions struct LocalCoupledSolutions
{ {
LocalCoupledSolutions(std::vector<double>&& local_coupled_xs0_, LocalCoupledSolutions(std::vector<double>&& local_coupled_xs0_)
std::vector<double>&& local_coupled_xs_) : local_coupled_xs0(std::move(local_coupled_xs0_))
: local_coupled_xs0(std::move(local_coupled_xs0_)),
local_coupled_xs(std::move(local_coupled_xs_))
{ {
} }
/// Local solutions of the previous time step. /// Local solutions of the previous time step.
std::vector<double> const local_coupled_xs0; std::vector<double> const local_coupled_xs0;
/// Local solutions of the current time step.
std::vector<double> const local_coupled_xs;
}; };
/** /**
......
...@@ -70,12 +70,14 @@ void VectorMatrixAssembler::assemble( ...@@ -70,12 +70,14 @@ void VectorMatrixAssembler::assemble(
{ {
auto local_coupled_xs0 = getCoupledLocalSolutions(cpl_xs->coupled_xs_t0, auto local_coupled_xs0 = getCoupledLocalSolutions(cpl_xs->coupled_xs_t0,
indices_of_processes); indices_of_processes);
auto local_coupled_xs = auto local_coupled_xs =
getCoupledLocalSolutions(x, indices_of_processes); getCoupledLocalSolutions(x, indices_of_processes);
auto const local_x = MathLib::toVector(local_coupled_xs); auto const local_x = MathLib::toVector(local_coupled_xs);
ProcessLib::LocalCoupledSolutions local_coupled_solutions( ProcessLib::LocalCoupledSolutions local_coupled_solutions(
std::move(local_coupled_xs0), std::move(local_coupled_xs)); std::move(local_coupled_xs0));
local_assembler.assembleForStaggeredScheme( local_assembler.assembleForStaggeredScheme(
t, dt, local_x, process_id, _local_M_data, _local_K_data, t, dt, local_x, process_id, _local_M_data, _local_K_data,
...@@ -139,13 +141,14 @@ void VectorMatrixAssembler::assembleWithJacobian( ...@@ -139,13 +141,14 @@ void VectorMatrixAssembler::assembleWithJacobian(
{ {
auto local_coupled_xs0 = getCoupledLocalSolutions(cpl_xs->coupled_xs_t0, auto local_coupled_xs0 = getCoupledLocalSolutions(cpl_xs->coupled_xs_t0,
indices_of_processes); indices_of_processes);
auto local_coupled_xs = auto local_coupled_xs =
getCoupledLocalSolutions(x, indices_of_processes); getCoupledLocalSolutions(x, indices_of_processes);
auto const local_x = MathLib::toVector(local_coupled_xs); auto const local_x = MathLib::toVector(local_coupled_xs);
ProcessLib::LocalCoupledSolutions local_coupled_solutions( ProcessLib::LocalCoupledSolutions local_coupled_solutions(
std::move(local_coupled_xs0), std::move(local_coupled_xs)); std::move(local_coupled_xs0));
_jacobian_assembler->assembleWithJacobianForStaggeredScheme( _jacobian_assembler->assembleWithJacobianForStaggeredScheme(
local_assembler, t, dt, local_x, local_xdot, dxdot_dx, dx_dx, local_assembler, t, dt, local_x, local_xdot, dxdot_dx, dx_dx,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment