dvsrco Subroutine

private subroutine dvsrco(me, sav, job)

this routine saves or restores (depending on job) the contents of the dvode internal variables.

Type Bound

dvode_t

Arguments

Type IntentOptional Attributes Name
class(dvode_t), intent(inout) :: me
type(dvode_data_t), intent(inout) :: sav
integer, intent(in) :: job

flag indicating to save or restore the data:

  • job = 1 if common is to be saved (written to sav).
  • job = 2 if common is to be restored (read from sav).

a call with job = 2 presumes a prior call with job = 1.


Source Code

   subroutine dvsrco(me,sav,job)

      class(dvode_t),intent(inout) :: me
      type(dvode_data_t),intent(inout) :: sav
      integer,intent(in) :: job !! flag indicating to save or restore the data:
                                !!
                                !! * `job = 1` if common is to be saved (written to `sav`).
                                !! * `job = 2` if common is to be restored (read from `sav`).
                                !!
                                !! a call with job = 2 presumes a prior call with job = 1.

      select case (job)
      case(1); sav = me%dat
      case(2); me%dat = sav
      case default
         error stop 'invalid input to dvsrco'
      end select

   end subroutine dvsrco