fcn Subroutine

subroutine fcn(n, x, Indcol, Ipntr, Fvec)

Function subroutine for testing fdjs.

Arguments

Type IntentOptional Attributes Name
integer :: n
real(kind=wp) :: x(n)
integer :: Indcol(*)
integer :: Ipntr(n+1)
real(kind=wp) :: Fvec(n)

Called by

proc~~fcn~~CalledByGraph proc~fcn dsm_test::fcn program~dsm_test dsm_test program~dsm_test->proc~fcn

Source Code

      subroutine fcn(n,x,Indcol,Ipntr,Fvec)

      !! Function subroutine for testing [[fdjs]].

      implicit none

      integer n
      integer Indcol(*) , Ipntr(n+1)
      real(wp) ::x(n) , Fvec(n)

      integer i , ip
      real(wp) :: sum

      do i = 1 , n
         sum = 0.0_wp
         do ip = Ipntr(i) , Ipntr(i+1) - 1
            sum = sum + x(Indcol(ip))
         enddo
         sum = sum + x(i)
         Fvec(i) = sum*(1.0_wp+sum) + 1.0_wp
      enddo

      end subroutine fcn