15 integer :: n, nx, ny, nz, nslices, mdeg, nvec, ev_int, mlan, nev, max_its
22 double precision :: a, b, lmax, lmin, tol
24 double precision,
dimension(:),
pointer :: sli
25 double precision,
dimension(4) :: xintv
27 double precision,
dimension(:),
pointer :: eigval, eigvec
29 double precision,
dimension(:),
pointer :: vals, valst
30 integer,
dimension(:),
pointer :: ia, iat
31 integer,
dimension(:),
pointer :: ja, jat
33 integer*8 :: rat, asigbss, csr, dummy
36 integer :: i, j, k, zero
42 character (len=32) :: arg
46 double precision,
dimension(:),
pointer :: rhs
47 double precision,
dimension(6) :: al
48 integer,
dimension(:),
pointer :: iau
71 if(arg(1:2) ==
'nx')
then
72 read(arg(4:), *, iostat = readerr) nx
73 elseif(arg(1:2) ==
'ny')
then
74 read(arg(4:), *, iostat = readerr) ny
75 elseif(arg(1:2) ==
'nz')
then
76 read(arg(4:), *, iostat = readerr) nz
77 elseif(arg(1:1) ==
'a')
then
78 read(arg(3:), *, iostat = readerr) a
79 elseif(arg(1:1) ==
'b')
then
80 read(arg(3:), *, iostat = readerr) b
81 elseif(arg(:7) ==
'nslices')
then
82 read(arg(9:), *, iostat = readerr) nslices
83 elseif(arg ==
'help')
then
84 write(*,*)
'Usage: ./testL.ex nx=[int] ny=[int] nz=[int] a=[double] b=[double] nslices=[int]'
88 write(*,*)
'There was an error while reading argument: ', arg
129 al(1) = 0.0d0; al(2) = 0.0d0;
130 al(3) = 0.0d0; al(4) = 0.0d0;
131 al(5) = 0.0d0; al(6) = 0.0d0;
133 call
gen57pt(nx,ny,nz,al,mode,n,vals,ja,ia,iau,rhs)
136 call
csrcsc(n, 1, 1, vals, ja, ia, valst, jat, iat)
137 call
csrcsc(n, 1, 1, valst, jat, iat, vals, ja, ia)
154 call evsl_start_f90()
157 call evsl_arr2csr_f90(n, ia, ja, vals, csr)
159 call evsl_seta_csr_f90(csr)
165 allocate(sli(nslices+1))
167 call evsl_kpm_spslicer_f90(mdeg, nvec, xintv, nslices, sli, ev_int)
176 call evsl_find_rat_f90(xintv, rat)
180 call setup_asigmabsol_direct_f90(csr, zero, dummy, rat, asigbss)
182 call set_asigmabsol_direct_f90(rat, asigbss)
186 mlan =
max(4*nev, 100)
190 call evsl_ratlantr_f90(mlan, nev, xintv, max_its, tol, rat)
193 call evsl_get_nev_f90(nev)
196 allocate(eigval(nev))
197 allocate(eigvec(nev*
size(ia)))
200 call evsl_copy_result_f90(eigval, eigvec)
201 write(*,*) nev,
' Eigs in this slice'
207 call free_asigmabsol_direct_f90(rat, asigbss)
209 call evsl_free_rat_f90(rat)
215 call evsl_free_csr_f90(csr)
217 call evsl_finish_f90()
subroutine gen57pt(nx, ny, nz, al, mode, n, a, ja, ia, iau, rhs)
void csrcsc(int OUTINDEX, const int nrow, const int ncol, int job, double *a, int *ja, int *ia, double *ao, int *jao, int *iao)
convert csr to csc Assume input csr is 0-based index output csc 0/1 index specified by OUTINDEX * ...