Test explicit forward Euler ODE solver.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine test_euler()
!---------------------------------------------------------------------------------------------------------------------------------
!< Test explicit forward Euler ODE solver.
!---------------------------------------------------------------------------------------------------------------------------------
type(integrator_euler_explicit) :: euler_integrator !< Euler integrator.
real(R_P) :: dt !< Time step.
real(R_P) :: t !< Time.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
print "(A)", 'Integrating Burgers equation by means of explicit Euler solver'
call domain%init(initial_state=initial_state, Ni=Ni, h=h, nu=nu)
dt = domain%dt(CFL=CFL)
t = 0._R_P
do while(t<t_final)
call euler_integrator%integrate(U=domain, dt=dt, t=t)
t = t + dt
enddo
final_state = domain%output()
call save_results(title='FOODIE test: Burgers equation integration, t='//str(n=t_final)//' explicit Euler', &
filename='burgers_integration-euler')
print "(A)", 'Finish!'
return
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine test_euler