Skip to content
Snippets Groups Projects
Commit 065ff4f2 authored by Matteo Cicuttin's avatar Matteo Cicuttin
Browse files

Fixed RK4.

parent 7ebfa626
Branches
Tags
No related merge requests found
......@@ -191,7 +191,7 @@ compute_euler_update(solver_state& state, const field& y, const field& k, double
}
void
compute_rk4_weighted_sum(solver_state& state, const field& in, double dt, field out)
compute_rk4_weighted_sum(solver_state& state, const field& in, double dt, field& out)
{
for (size_t i = 0; i < out.num_dofs; i++)
{
......@@ -224,10 +224,11 @@ timestep(solver_state& state)
timecounter tc;
tc.tic();
/*
apply_operator(state, state.emf_curr, state.tmp);
compute_euler_update(state, state.emf_curr, state.tmp, state.delta_t, state.emf_next);
*/
/*
apply_operator(state, state.emf_curr, state.k1);
compute_euler_update(state, state.emf_curr, state.k1, 0.5*state.delta_t, state.tmp);
......@@ -240,7 +241,7 @@ timestep(solver_state& state)
apply_operator(state, state.tmp, state.k4);
compute_rk4_weighted_sum(state, state.emf_curr, state.delta_t, state.emf_next);
*/
state.curr_time += state.delta_t;
state.curr_timestep += 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment