Afivo  0.3
Private Member Functions | List of all members
m_af_advance::subr_feuler Interface Reference

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)
 

Detailed Description

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 70 of file m_af_advance.f90.

Constructor & Destructor Documentation

◆ subr_feuler()

subroutine m_af_advance::subr_feuler::subr_feuler ( type(af_t), intent(inout)  tree,
real(dp), intent(in)  dt,
real(dp), intent(in)  dt_stiff,
real(dp), intent(inout)  dt_lim,
real(dp), intent(in)  time,
integer, intent(in)  s_deriv,
integer, intent(in)  n_prev,
integer, dimension(n_prev), intent(in)  s_prev,
real(dp), dimension(n_prev), intent(in)  w_prev,
integer, intent(in)  s_out,
integer, intent(in)  i_step,
integer, intent(in)  n_steps 
)
private
Parameters
[in]dtTime step for regular terms
[in]dt_stiffTime step for stiff terms (IMEX)
[in,out]dt_limComputed time step limit
[in]timeCurrent time
[in]s_derivState to compute derivatives from
[in]n_prevNumber of previous states
[in]s_prevPrevious states
[in]w_prevWeights of previous states
[in]s_outOutput state
[in]i_stepStep of the integrator
[in]n_stepsTotal number of steps

Definition at line 70 of file m_af_advance.f90.