14 integer :: n, nx, ny, nz, nslices, mdeg, nvec, ev_int, mlan, nev
21 double precision :: a, b, lmax, lmin, tol
23 double precision,
dimension(:),
pointer :: sli
24 double precision,
dimension(4) :: xintv
26 double precision,
dimension(:),
pointer :: eigval, eigvec
28 double precision,
dimension(:),
pointer :: vals, valst
29 integer,
dimension(:),
pointer :: ia, iat
30 integer,
dimension(:),
pointer :: ja, jat
32 integer*8 :: rat, asigbss, csr, dummy
35 integer :: i, j, k, zero
41 character (len=32) :: arg
45 double precision,
dimension(:),
pointer :: rhs
46 double precision,
dimension(6) :: al
47 integer,
dimension(:),
pointer :: iau
70 if(arg(1:2) ==
'nx')
then
71 read(arg(4:), *, iostat = readerr) nx
72 elseif(arg(1:2) ==
'ny')
then
73 read(arg(4:), *, iostat = readerr) ny
74 elseif(arg(1:2) ==
'nz')
then
75 read(arg(4:), *, iostat = readerr) nz
76 elseif(arg(1:1) ==
'a')
then
77 read(arg(3:), *, iostat = readerr) a
78 elseif(arg(1:1) ==
'b')
then
79 read(arg(3:), *, iostat = readerr) b
80 elseif(arg(:7) ==
'nslices')
then
81 read(arg(9:), *, iostat = readerr) nslices
82 elseif(arg ==
'help')
then
83 write(*,*)
'Usage: ./testL.ex nx=[int] ny=[int] nz=[int] a=[double] b=[double] nslices=[int]'
87 write(*,*)
'There was an error while reading argument: ', arg
128 al(1) = 0.0d0; al(2) = 0.0d0;
129 al(3) = 0.0d0; al(4) = 0.0d0;
130 al(5) = 0.0d0; al(6) = 0.0d0;
132 call
gen57pt(nx,ny,nz,al,mode,n,vals,ja,ia,iau,rhs)
135 call
csrcsc(n, 1, 1, vals, ja, ia, valst, jat, iat)
136 call
csrcsc(n, 1, 1, valst, jat, iat, vals, ja, ia)
153 call evsl_start_f90()
156 call evsl_arr2csr_f90(n, ia, ja, vals, csr)
158 call evsl_seta_csr_f90(csr)
164 allocate(sli(nslices+1))
166 call evsl_kpm_spslicer_f90(mdeg, nvec, xintv, nslices, sli, ev_int)
175 call evsl_find_rat_f90(xintv, rat)
179 call setup_asigmabsol_direct_f90(csr, zero, dummy, rat, asigbss)
181 call set_asigmabsol_direct_f90(rat, asigbss)
185 mlan =
max(4*nev, 100)
189 call evsl_ratlannr_f90(xintv, mlan, tol, rat)
192 call evsl_get_nev_f90(nev)
195 allocate(eigval(nev))
196 allocate(eigvec(nev*
size(ia)))
199 call evsl_copy_result_f90(eigval, eigvec)
200 write(*,*) nev,
' Eigs in this slice'
206 call free_asigmabsol_direct_f90(rat, asigbss)
208 call evsl_free_rat_f90(rat)
214 call evsl_free_csr_f90(csr)
216 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 * ...