moved rhs selecting conditional to upper level

This commit is contained in:
ignis 2020-02-26 12:42:23 +09:00
parent 078e7d82e7
commit 4c4411d6d3

View file

@ -90,15 +90,23 @@
SUBROUTINE solve
IF (reaction_type == "onestep") THEN
CALL solve_
CALL solve_ (fonestep)
ELSE IF (reaction_type == "twostep") THEN
CALL solve_
CALL solve_ (fns)
ELSE
CALL solve_
WRITE(*,*)'ERROR, UNSUPPORTED REACTION ', trim(reaction_type), '. STOPPING'
STOP
END IF
END SUBROUTINE solve
SUBROUTINE solve_
SUBROUTINE solve_ (rhs)
INTERFACE
SUBROUTINE rhs(r1,f)
REAL, INTENT(IN), DIMENSION(:,:) :: r1
REAL, INTENT(OUT), DIMENSION(:,:) :: f
END SUBROUTINE rhs
END INTERFACE
INTEGER :: i,j,k,savenum
REAL :: pflame,pflold,delf=0.
@ -127,14 +135,7 @@
CALL SET_BC
if ( reaction_type == "onestep" ) then
CALL RK4(fonestep)
else if ( reaction_type == "twostep" ) then
CALL RK4(fns)
else
WRITE(*,*) 'ERROR, UNDEFINED REACTION TYPE ', reaction_type
stop
end if
CALL RK4(rhs)
IF (t_uf.ge.dt_uf) THEN
pflold=pflame