Afivo
0.3
|
Interface for a generic forward Euler scheme for time integration. More...
Private Member Functions | |
subroutine | subr_feuler (tree, dt, dt_stiff, dt_lim, time, s_deriv, n_prev, s_prev, w_prev, s_out, i_step, n_steps) |
Interface for a generic forward Euler scheme for time integration.
This method should advance the solution over a time dt. The method assumes that several copies are stored for the variables to be integrated. It should then operate on these different copies, which correspond to temporal states. In this way, higher-order time integration schemes can be constructed.
The meaning of the temporal states is as follows. For an equation y' = f(y), the method should perform: y_out = sum(w_prev * y_prev) + dt * f(y_deriv).
If the index of the variable y
is i
, then the index of y_out
is i+s_out
, etc.
In case of IMEX schemes, the time step dt_stiff (which is then not always equal to dt) should be used for stiff terms. The equation to be solved should be interpreted as:
d/dt y = F0(y) + F1(y)
where F0 is the non-stiff part and F1 is the stiff part
Definition at line 73 of file m_af_advance.f90.
|
private |
[in] | dt | Time step for regular terms |
[in] | dt_stiff | Time step for stiff terms (IMEX) |
[in,out] | dt_lim | Computed time step limit |
[in] | time | Current time |
[in] | s_deriv | State to compute derivatives from |
[in] | n_prev | Number of previous states |
[in] | s_prev | Previous states |
[in] | w_prev | Weights of previous states |
[in] | s_out | Output state |
[in] | i_step | Step of the integrator |
[in] | n_steps | Total number of steps |
Definition at line 73 of file m_af_advance.f90.