You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, step methods have an interface like so:
subroutinestep_func_fixed(me,t,x,h,xf)
!! rk step function for the fixed-step methods.
import :: rk_fixed_step_class,wp
implicit none
class(rk_fixed_step_class),intent(inout) :: me
real(wp),intent(in) :: t !! initial time
real(wp),dimension(me%n),intent(in) :: x !! initial state vector
real(wp),intent(in) :: h !! time step \( |\Delta t| \)
real(wp),dimension(me%n),intent(out) :: xf !! final state vector
endsubroutine step_func_fixed
There is no need for a separate arguments x intent(in) and xf, intent(out). They can be merged into a single argument x, intent(inout), thereby avoiding a redundant state vector.
For instance, for Euler:
module procedure euler
associate (f1 => me%funcs(:,1))
call me%f(t,x,f1)
x = x + h*f1
end associate
end procedure euler
The change should be more or less straightforward for all methods expressed in the classical the rk form. For SSP and LS methods, one registry will probably have to be added because the implementations were already making use of the extra x. I can help with that; just let me know what you think.
The text was updated successfully, but these errors were encountered:
Currently, step methods have an interface like so:
There is no need for a separate arguments
x intent(in)
andxf, intent(out)
. They can be merged into a single argumentx, intent(inout)
, thereby avoiding a redundant state vector.For instance, for Euler:
The change should be more or less straightforward for all methods expressed in the classical the rk form. For SSP and LS methods, one registry will probably have to be added because the implementations were already making use of the extra
x
. I can help with that; just let me know what you think.The text was updated successfully, but these errors were encountered: