MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
csrutilsmodule Module Reference

Functions/Subroutines

integer(i4b) function, public getcsrindex (i, j, ia, ja)
 Return index for element i,j in CSR storage,. More...
 

Function/Subroutine Documentation

◆ getcsrindex()

integer(i4b) function, public csrutilsmodule::getcsrindex ( integer(i4b), intent(in)  i,
integer(i4b), intent(in)  j,
integer(i4b), dimension(:), intent(in)  ia,
integer(i4b), dimension(:), intent(in)  ja 
)
Parameters
[in]ithe row index
[in]jthe column index
[in]iaCSR ia array
[in]jaCSR ja array
Returns
the CSR ndex of element i,j

Definition at line 12 of file CsrUtils.f90.

13  use kindmodule, only: i4b
14  integer(I4B), intent(in) :: i !< the row index
15  integer(I4B), intent(in) :: j !< the column index
16  integer(I4B), dimension(:), intent(in) :: ia !< CSR ia array
17  integer(I4B), dimension(:), intent(in) :: ja !< CSR ja array
18  integer(I4B) :: csrIndex !< the CSR ndex of element i,j
19  ! local
20  integer(I4B) :: idx
21 
22  csrindex = -1
23  do idx = ia(i), ia(i + 1) - 1
24  if (ja(idx) == j) then
25  csrindex = idx
26  return
27  end if
28  end do
29 
This module defines variable data types.
Definition: kind.f90:8
Here is the caller graph for this function: