dprepi Subroutine

subroutine dprepi(Neq, Y, S, Yh, Savr, Ewt, Rtem, Ia, Ja, Ic, Jc, Wk, Iwk, Ipper, res, jac, adda)

Uses

  • proc~~dprepi~~UsesGraph proc~dprepi M_odepack.f90::dprepi module~m_odepack M_odepack proc~dprepi->module~m_odepack

This routine performs preprocessing related to the sparse linear systems that must be solved.

The operations that are performed here are:

  • compute sparseness structure of the iteration matrix P = A - con*J according to MOSS,
  • compute grouping of column indices (MITER = 2),
  • compute a new ordering of rows and columns of the matrix,
  • reorder JA corresponding to the new ordering,
  • perform a symbolic LU factorization of the matrix, and
  • set pointers for segments of the IWK/WK array.

In addition to variables described previously, DPREPI uses the following for communication:

YH

the history array. Only the first column, containing the current Y vector, is used. Used only if MOSS .ne. 0.

S

array of length NEQ, identical to YDOTI in the driver, used only if MOSS .ne. 0.

SAVR

a work array of length NEQ, used only if MOSS .ne. 0.

EWT

array of length NEQ containing (inverted) error weights. Used only if MOSS = 2 or 4 or if ISTATE = MOSS = 1.

RTEM

a work array of length NEQ, identical to ACOR in the driver, used only if MOSS = 2 or 4.

WK

a real work array of length LENWK, identical to WM in the driver.

IWK

integer work array, assumed to occupy the same space as WK.

LENWK

the length of the work arrays WK and IWK.

ISTATC

a copy of the driver input argument ISTATE (= 1 on the first call, = 3 on a continuation call).

IYS

flag value from ODRV or CDRV.

IPPER

output error flag, with the following values and meanings: = 0 no error. = -1 insufficient storage for internal structure pointers. = -2 insufficient storage for JGROUP. = -3 insufficient storage for ODRV. = -4 other error flag from ODRV (should never occur). = -5 insufficient storage for CDRV. = -6 other error flag from CDRV. = -7 if the RES routine returned error flag IRES = IER = 2. = -8 if the RES routine returned error flag IRES = IER = 3.

Arguments

Type IntentOptional Attributes Name
integer :: Neq(*)
real(kind=dp), intent(inout) :: Y(*)
real(kind=dp) :: S(*)
real(kind=dp), intent(in) :: Yh(*)
real(kind=dp), intent(inout) :: Savr(*)
real(kind=dp), intent(in) :: Ewt(*)
real(kind=dp), intent(inout) :: Rtem(*)
integer, intent(in) :: Ia(*)
integer, intent(in) :: Ja(*)
integer, intent(in) :: Ic(*)
integer, intent(in) :: Jc(*)
real(kind=dp), intent(inout) :: Wk(*)
integer, intent(inout) :: Iwk(*)
integer, intent(out) :: Ipper
real :: res
integer :: jac
real :: adda

Calls

proc~~dprepi~~CallsGraph proc~dprepi M_odepack.f90::dprepi proc~adjlr~2 M_odepack::adjlr proc~dprepi->proc~adjlr~2 proc~cdrv M_odepack::cdrv proc~dprepi->proc~cdrv proc~cntnzu~2 M_odepack::cntnzu proc~dprepi->proc~cntnzu~2 proc~jgroup M_odepack::jgroup proc~dprepi->proc~jgroup proc~odrv~2 M_odepack::odrv proc~dprepi->proc~odrv~2

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: dp = kind(0.0d0)
real(kind=dp), public :: erwt
real(kind=dp), public :: fac
integer, public :: i
integer, public :: ibr
integer, public :: ier
integer, public :: ipil
integer, public :: ipiu
integer, public :: iptt1
integer, public :: iptt2
integer, public :: j
integer, public :: k
integer, public :: kamax
integer, public :: kamin
integer, public :: kcmax
integer, public :: kcmin
integer, public :: knew
integer, public :: ldif
integer, public :: lenigp
integer, public :: lenwk1
integer, public :: liwk
integer, public :: ljfo
integer, public :: maxg
integer, public :: np1
integer, public :: nzsut
real(kind=dp), public :: yj