16 integer :: n, nx, ny, nz, nslices, mdeg, nvec, ev_int, mlan, nev
24 double precision :: a, b, lmax, lmin, tol, thresh_int, thresh_ext
26 double precision,
dimension(:),
pointer :: sli
27 double precision,
dimension(4) :: xintv
29 double precision,
dimension(:),
pointer :: eigval, eigvec
34 double precision,
dimension(:),
pointer :: vals
35 integer,
dimension(:),
pointer :: ia
36 integer,
dimension(:),
pointer :: ja
49 character (len=32) :: arg
53 double precision,
dimension(:),
pointer :: rhs
54 double precision,
dimension(6) :: al
55 integer,
dimension(:),
pointer :: iau
77 if(arg(1:2) ==
'nx')
then
78 read(arg(4:), *, iostat = readerr) nx
79 elseif(arg(1:2) ==
'ny')
then
80 read(arg(4:), *, iostat = readerr) ny
81 elseif(arg(1:2) ==
'nz')
then
82 read(arg(4:), *, iostat = readerr) nz
83 elseif(arg(1:1) ==
'a')
then
84 read(arg(3:), *, iostat = readerr) a
85 elseif(arg(1:1) ==
'b')
then
86 read(arg(3:), *, iostat = readerr) b
87 elseif(arg(:7) ==
'nslices')
then
88 read(arg(9:), *, iostat = readerr) nslices
89 elseif(arg ==
'help')
then
90 write(*,*)
'Usage: ./testL.ex nx=[int] ny=[int] nz=[int] a=[double] b=[double] nslices=[int]'
94 write(*,*)
'There was an error while reading argument: ', arg
132 al(1) = 0.0d0; al(2) = 0.0d0;
133 al(3) = 0.0d0; al(4) = 0.0d0;
134 al(5) = 0.0d0; al(6) = 0.0d0;
136 call
gen57pt(nx,ny,nz,al,mode,n,vals,ja,ia,iau,rhs)
152 call evsl_start_f90()
156 call evsl_setamv_f90(mat%nrows,
csrmatvec, mat)
162 allocate(sli(nslices+1))
164 call evsl_kpm_spslicer_f90(mdeg, nvec, xintv, nslices, sli, ev_int)
175 call evsl_find_pol_f90(xintv, thresh_int, thresh_ext, pol)
179 mlan =
max(4*nev, 100)
183 call evsl_cheblannr_f90(xintv, mlan, tol, pol)
186 call evsl_get_nev_f90(nev)
189 allocate(eigval(nev))
190 allocate(eigvec(nev*
size(ia)))
193 call evsl_copy_result_f90(eigval, eigvec)
194 write(*,*) nev,
' Eigs in this slice'
200 call evsl_free_pol_f90(pol)
206 call evsl_finish_f90()
subroutine gen57pt(nx, ny, nz, al, mode, n, a, ja, ia, iau, rhs)
subroutine csrmatvec(x, y, mat)