Skip to content

Commit

Permalink
Minor fix for initial dt. We need to reset dt at the end of (#83)
Browse files Browse the repository at this point in the history
InitialIterations in order to get the specifed dt. Otherwise, we can end
up with dt = initial_dt*change_max.
  • Loading branch information
cgilet authored Nov 2, 2023
1 parent afa2a5c commit 58de1d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/setup/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ void incflo::InitialIterations ()
copy_from_old_to_new_density();
copy_from_old_to_new_tracer();
}

// Reset dt to get initial step as specified, otherwise we can see increase to dt
m_prev_dt = Real(-1.0);
m_dt = Real(-1.0);
}

// Project velocity field to make sure initial velocity is divergence-free
Expand Down

0 comments on commit 58de1d9

Please sign in to comment.