Initialize the rk_class.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(rk_class), | intent(inout) | :: | me | |||
integer, | intent(in) | :: | n |
number of variables |
||
procedure(deriv_func) | :: | f |
derivative function |
|||
procedure(report_func), | optional | :: | report |
for reporting the steps |
||
procedure(event_func), | optional | :: | g |
for stopping at an event |
subroutine initialize(me,n,f,report,g) implicit none class(rk_class),intent(inout) :: me integer,intent(in) :: n !! number of variables procedure(deriv_func) :: f !! derivative function procedure(report_func),optional :: report !! for reporting the steps procedure(event_func),optional :: g !! for stopping at an event call me%destroy() me%n = n me%f => f if (present(report)) me%report => report if (present(g)) me%g => g end subroutine initialize