moved rhs selecting conditional to upper level
This commit is contained in:
parent
078e7d82e7
commit
4c4411d6d3
1 changed files with 13 additions and 12 deletions
|
|
@ -90,15 +90,23 @@
|
||||||
|
|
||||||
SUBROUTINE solve
|
SUBROUTINE solve
|
||||||
IF (reaction_type == "onestep") THEN
|
IF (reaction_type == "onestep") THEN
|
||||||
CALL solve_
|
CALL solve_ (fonestep)
|
||||||
ELSE IF (reaction_type == "twostep") THEN
|
ELSE IF (reaction_type == "twostep") THEN
|
||||||
CALL solve_
|
CALL solve_ (fns)
|
||||||
ELSE
|
ELSE
|
||||||
CALL solve_
|
WRITE(*,*)'ERROR, UNSUPPORTED REACTION ', trim(reaction_type), '. STOPPING'
|
||||||
|
STOP
|
||||||
END IF
|
END IF
|
||||||
END SUBROUTINE solve
|
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
|
INTEGER :: i,j,k,savenum
|
||||||
REAL :: pflame,pflold,delf=0.
|
REAL :: pflame,pflold,delf=0.
|
||||||
|
|
@ -127,14 +135,7 @@
|
||||||
|
|
||||||
CALL SET_BC
|
CALL SET_BC
|
||||||
|
|
||||||
if ( reaction_type == "onestep" ) then
|
CALL RK4(rhs)
|
||||||
CALL RK4(fonestep)
|
|
||||||
else if ( reaction_type == "twostep" ) then
|
|
||||||
CALL RK4(fns)
|
|
||||||
else
|
|
||||||
WRITE(*,*) 'ERROR, UNDEFINED REACTION TYPE ', reaction_type
|
|
||||||
stop
|
|
||||||
end if
|
|
||||||
|
|
||||||
IF (t_uf.ge.dt_uf) THEN
|
IF (t_uf.ge.dt_uf) THEN
|
||||||
pflold=pflame
|
pflold=pflame
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue