daigbt Subroutine

subroutine daigbt(res, adda, Neq, T, Y, Ydot, Mb, Nb, Pw, Ipvt, Ier)

This subroutine computes the initial value of the vector YDOT satisfying

 A * YDOT = g(t,y)

when A is nonsingular. It is called by DLSOIBT for initialization only, when ISTATE = 0 . DAIGBT returns an error flag IER:

IER  =  0  means DAIGBT was successful.
IER .ge. 2 means RES returned an error flag IRES = IER.
IER .lt. 0 means the A matrix was found to have a singular
           diagonal block (hence YDOT could not be solved for).

Arguments

Type IntentOptional Attributes Name
real :: res
real :: adda
integer :: Neq(*)
real(kind=dp) :: T
real(kind=dp) :: Y(*)
real(kind=dp) :: Ydot(*)
integer, intent(inout) :: Mb
integer, intent(inout) :: Nb
real(kind=dp) :: Pw(*)
integer :: Ipvt(*)
integer, intent(inout) :: Ier

Calls

proc~~daigbt~~CallsGraph proc~daigbt daigbt.inc::daigbt ddecbt ddecbt proc~daigbt->ddecbt dsolbt dsolbt proc~daigbt->dsolbt

Variables

Type Visibility Attributes Name Initial
integer, public :: i
integer, public :: lblox
integer, public :: lenpw
integer, public :: lpb
integer, public :: lpc

Source Code

subroutine daigbt(res,adda,Neq,T,Y,Ydot,Mb,Nb,Pw,Ipvt,Ier)
!
external res, adda
integer               :: Neq(*)
real(kind=dp)         :: T
real(kind=dp)         :: Y(*)
real(kind=dp)         :: Ydot(*)
integer,intent(inout) :: Mb
integer,intent(inout) :: Nb
real(kind=dp)         :: Pw(*)
integer               :: Ipvt(*)
integer,intent(inout) :: Ier

integer :: i , lblox , lenpw , lpb , lpc
!
   lblox = Mb*Mb*Nb
   lpb = 1 + lblox
   lpc = lpb + lblox
   lenpw = 3*lblox

   do i = 1 , lenpw
      Pw(i) = 0.0D0
   enddo

   Ier = 1
   call res(Neq,T,Y,Pw,Ydot,Ier)
   if ( Ier>1 ) return
   call adda(Neq,T,Y,Mb,Nb,Pw(1),Pw(lpb),Pw(lpc))
   call ddecbt(Mb,Nb,Pw,Pw(lpb),Pw(lpc),Ipvt,Ier)
   if ( Ier==0 ) then
      call dsolbt(Mb,Nb,Pw,Pw(lpb),Pw(lpc),Ydot,Ipvt)
      return
   endif

   Ier = -Ier
end subroutine daigbt