dainvgs Subroutine

subroutine dainvgs(Neq, T, Y, Wk, Iwk, Tem, Ydot, Ier, res, adda)

Uses

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

This subroutine computes the initial value of the vector YDOT satisfying

 A * YDOT = g(t,y)

when A is nonsingular. It is called by DLSODIS for initialization only, when ISTATE = 0. The matrix A is subjected to LU decomposition in CDRV. Then the system A*YDOT = g(t,y) is solved in CDRV.

In addition to variables described previously, communication with DAINVGS uses the following:

Y

array of initial values.

WK

real work space for matrices. On output it contains A and its LU decomposition. The LU decomposition is not entirely sparse unless the structure of the matrix A is identical to the structure of the Jacobian matrix dr/dy. Storage of matrix elements starts at WK(3). WK(1) = SQRT(UROUND), not used here.

IWK

integer work space for matrix-related data, assumed to be equivalenced to WK. In addition, WK(IPRSP) and WK(IPISP) are assumed to have identical locations.

TEM

vector of work space of length N (ACOR in DSTODI).

YDOT

output vector containing the initial dy/dt. YDOT(i) contains dy(i)/dt when the matrix A is non-singular.

IER

output error flag with the following values and meanings: = 0 if DAINVGS was successful. = 1 if the A-matrix was found to be singular. = 2 if RES returned an error flag IRES = IER = 2. = 3 if RES returned an error flag IRES = IER = 3. = 4 if insufficient storage for CDRV (should not occur here). = 5 if other error found in CDRV (should not occur here).

Arguments

Type IntentOptional Attributes Name
integer :: Neq
real(kind=dp) :: T
real(kind=dp) :: Y(*)
real(kind=dp) :: Wk(*)
integer :: Iwk(*)
real(kind=dp), intent(inout) :: Tem(*)
real(kind=dp) :: Ydot(*)
integer, intent(inout) :: Ier
real :: res
real :: adda

Calls

proc~~dainvgs~2~~CallsGraph proc~dainvgs~2 M_odepack.f90::dainvgs proc~cdrv M_odepack::cdrv proc~dainvgs~2->proc~cdrv

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: dp = kind(0.0d0)
integer, public :: i
integer, public :: imul
integer, public :: j
integer, public :: k
integer, public :: kmax
integer, public :: kmin