setid Subroutine

public pure subroutine setid(mx, my, ns, nsd, lid, iwork)

This routine sets the ID array in iwork, indicating which components are differential and which are algebraic.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: mx
integer, intent(in) :: my
integer, intent(in) :: ns
integer, intent(in) :: nsd
integer, intent(in) :: lid
integer, intent(inout) :: iwork(*)

Called by

proc~~setid~~CalledByGraph proc~setid setid program~example_web example_web program~example_web->proc~setid

Variables

Type Visibility Attributes Name Initial
integer, public :: i
integer, public :: i0
integer, public :: i00
integer, public :: jx
integer, public :: jy
integer, public :: nsdp1

Source Code

   pure subroutine setid(mx, my, ns, nsd, lid, iwork)
   !! This routine sets the ID array in `iwork`, indicating which components are differential
   !! and which are algebraic.
      integer, intent(in) :: mx
      integer, intent(in) :: my
      integer, intent(in) :: ns
      integer, intent(in) :: nsd
      integer, intent(in) :: lid
      integer, intent(inout) :: iwork(*)

      integer :: i, i0, i00, jx, jy, nsdp1

      nsdp1 = nsd + 1
      do jy = 1, my
         i00 = mx*ns*(jy - 1) + lid
         do jx = 1, mx
            i0 = i00 + ns*(jx - 1)
            do i = 1, nsd
               iwork(i0 + i) = 1
            end do
            do i = nsdp1, ns
               iwork(i0 + i) = -1
            end do
         end do
      end do

   end subroutine setid