dsrcom Subroutine

subroutine dsrcom(Rsav, Isav, Job)

NAME

dsrcom(3f) - [M_odepack] Save/restore ODEPACK COMMON blocks.

DESCRIPTION

This routine saves or restores (depending on JOB) the contents of the internal types used to store the current state by one (or more) of the ODEPACK solvers.

VALUES

RSAV

real array of length 218 or more.

ISAV

integer array of length 37 or more.

JOB

flag indicating to save or restore the COMMON blocks: JOB = 1 if COMMON is to be saved (written to RSAV/ISAV) JOB = 2 if COMMON is to be restored (read from RSAV/ISAV)

A call with JOB = 2 presumes a prior call with JOB = 1.

Arguments

Type IntentOptional Attributes Name
real(kind=dp) :: Rsav(*)
integer :: Isav(*)
integer, intent(in) :: Job

Calls

proc~~dsrcom~~CallsGraph proc~dsrcom dsrcom.inc::dsrcom return_dls1_int return_dls1_int proc~dsrcom->return_dls1_int return_dls1_real return_dls1_real proc~dsrcom->return_dls1_real set_dls1_int set_dls1_int proc~dsrcom->set_dls1_int set_dls1_real set_dls1_real proc~dsrcom->set_dls1_real

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: lenils = 37
integer, public, parameter :: lenrls = 218

Source Code

subroutine dsrcom (rsav, isav, job)
real(kind=dp)      :: Rsav(*)
integer            :: Isav(*)
integer,intent(in) :: Job

integer,parameter :: lenils=37, lenrls=218

   select case(job)

   case(1)

     rsav(1:lenrls)=return_dls1_real()
     isav(1:lenils)=return_dls1_int()

   case(2)

     call set_dls1_real(rsav(1:lenrls))
     call set_dls1_int(isav(1:lenils))

   case default

      write(*,*)'<ERROR>*dsrcom* unknown JOB value=',job
      stop 1

   end select
end subroutine dsrcom