14 integer :: n, nx, ny, nz, nslices, mdeg, nvec, ev_int, mlan, nev
22 double precision :: a, b, lmax, lmin, tol, thresh_int, thresh_ext
24 double precision,
dimension(:),
pointer :: sli
26 double precision,
dimension(4) :: xintv
28 double precision,
dimension(:),
pointer :: eigval, eigvec
30 double precision,
dimension(:),
pointer :: vals
31 integer,
dimension(:),
pointer :: ia
32 integer,
dimension(:),
pointer :: ja
43 character (len=32) :: arg
47 double precision,
dimension(:),
pointer :: rhs
48 double precision,
dimension(6) :: al
49 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
126 al(1) = 0.0d0; al(2) = 0.0d0;
127 al(3) = 0.0d0; al(4) = 0.0d0;
128 al(5) = 0.0d0; al(6) = 0.0d0;
130 call
gen57pt(nx,ny,nz,al,mode,n,vals,ja,ia,iau,rhs)
144 call evsl_start_f90()
147 call evsl_arr2csr_f90(n, ia, ja, vals, csr)
150 call evsl_seta_csr_f90(csr)
156 allocate(sli(nslices+1))
158 call evsl_kpm_spslicer_f90(mdeg, nvec, xintv, nslices, sli, ev_int)
169 call evsl_find_pol_f90(xintv, thresh_int, thresh_ext, pol)
173 mlan =
max(4*nev, 100)
177 call evsl_cheblannr_f90(xintv, mlan, tol, pol)
180 call evsl_get_nev_f90(nev)
183 allocate(eigval(nev))
184 allocate(eigvec(nev*
size(ia)))
187 call evsl_copy_result_f90(eigval, eigvec)
189 write(*,*) nev,
' Eigs in this slice'
195 call evsl_free_pol_f90(pol)
201 call evsl_free_csr_f90(csr)
204 call evsl_finish_f90()
subroutine gen57pt(nx, ny, nz, al, mode, n, a, ja, ia, iau, rhs)