00001 subroutine basicilu0CRS(val_A,column_indicator_A,row_pointer_A,n,valSize,diag)
00002
00003 implicit none
00004 integer n
00005
00006
00007 integer i,j,k,valSize
00008
00009 integer e,a,a1,b,c,c1,d,g,f
00010
00011 real(8) val_A(valSize)
00012 integer column_indicator_A(valSize),row_pointer_A(n+1),diag(n)
00013
00014
00015
00016 do i=2,N
00017
00018
00019 do k=1,row_pointer_A(i+1)-row_pointer_A(i)
00020
00021
00022
00023 e=0
00024 a=row_pointer_A(i)
00025 a1=row_pointer_A(i+1)
00026 b=a+(k-1)
00027
00028
00029
00030
00031
00032
00033
00034
00035 if (column_indicator_A(b).lt.i) then
00036 c=row_pointer_A(column_indicator_A(b))
00037 c1=row_pointer_A(column_indicator_A(b)+1)
00038 do d=c,c1-1
00039 if (column_indicator_A(d).eq.column_indicator_A(b)) then
00040 val_A(b)=val_A(b)/val_A(d)
00041 e=e+1
00042 exit
00043 end if
00044 end do
00045 end if
00046 if (e.eq.0) then
00047 exit
00048 else
00049 g=b
00050 do b=a+1+(k-1),a1-1
00051 do f=c,c1-1
00052 if (column_indicator_A(f).eq.column_indicator_A(b)) then
00053 val_A(b)=val_A(b)-val_A(g)*val_A(f)
00054 exit
00055 end if
00056 end do
00057 end do
00058 end if
00059 end do
00060 end do
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 end
00126
00127
00128
00129
00130