mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 22:55:12 +00:00
mld2p4:
Make.inc mlprec/mld_basep_bld_mod.f90 mlprec/mld_daggrmat_smth_asb.F90 mlprec/mld_das_aply.f90 mlprec/mld_dbaseprec_aply.f90 mlprec/mld_dilu0_fact.f90 mlprec/mld_diluk_fact.f90 mlprec/mld_dilut_fact.f90 mlprec/mld_dmlprec_aply.f90 mlprec/mld_dprec_aply.f90 mlprec/mld_dprecset.f90 mlprec/mld_dsp_renum.f90 mlprec/mld_dsub_aply.f90 mlprec/mld_dsub_solve.f90 mlprec/mld_inner_mod.f90 mlprec/mld_prec_mod.f90 mlprec/mld_prec_type.f90 mlprec/mld_zaggrmat_smth_asb.F90 mlprec/mld_zas_aply.f90 mlprec/mld_zbaseprec_aply.f90 mlprec/mld_zilu0_fact.f90 mlprec/mld_ziluk_fact.f90 mlprec/mld_zilut_fact.f90 mlprec/mld_zmlprec_aply.f90 mlprec/mld_zprec_aply.f90 mlprec/mld_zprecset.f90 mlprec/mld_zsp_renum.f90 mlprec/mld_zsub_aply.f90 mlprec/mld_zsub_solve.f90 test/fileread/df_bench.f90 test/fileread/getp.f90 test/fileread/precdata.f90 test/fileread/zf_bench.f90 test/pargen/ppde.f90 Merged changes for parametrization of data types from psblas (psb_dpk_)
This commit is contained in:
@@ -22,10 +22,10 @@ program df_bench
|
||||
|
||||
|
||||
! dense matrices
|
||||
real(kind(1.d0)), allocatable, target :: aux_b(:,:), d(:)
|
||||
real(kind(1.d0)), allocatable , save :: b_col(:), x_col(:), r_col(:), &
|
||||
real(psb_dpk_), allocatable, target :: aux_b(:,:), d(:)
|
||||
real(psb_dpk_), allocatable , save :: b_col(:), x_col(:), r_col(:), &
|
||||
& x_col_glob(:), r_col_glob(:)
|
||||
real(kind(1.d0)), pointer :: b_col_glob(:)
|
||||
real(psb_dpk_), pointer :: b_col_glob(:)
|
||||
! communications data structure
|
||||
type(psb_desc_type):: desc_a
|
||||
|
||||
@@ -36,7 +36,7 @@ program df_bench
|
||||
! solver paramters
|
||||
integer :: iter, itmax, ierr, itrace, ircode, ipart,nlev,&
|
||||
& methd, istopc, iprec, ml, irnum, irst, ntry, nmat, ilev,ipsize,asize,cdsize
|
||||
real(kind(1.d0)) :: err, eps
|
||||
real(psb_dpk_) :: err, eps
|
||||
|
||||
character(len=5) :: afmt
|
||||
character(len=20) :: name
|
||||
@@ -45,7 +45,7 @@ program df_bench
|
||||
! other variables
|
||||
integer :: i,info,j,m_problem, nm, nt
|
||||
integer :: internal, m,ii,nnzero, nprecs, pp
|
||||
real(kind(1.d0)) :: t1, t2, tprec, r_amax, b_amax,&
|
||||
real(psb_dpk_) :: t1, t2, tprec, r_amax, b_amax,&
|
||||
&scale,resmx,resmxp, mttot, mtslv, mtprec
|
||||
integer :: nrhs, nrow, n_row, dim, nv, ne
|
||||
integer, allocatable :: ipv(:), neigh(:), ivg(:)
|
||||
|
||||
@@ -21,7 +21,7 @@ contains
|
||||
type(precdata),allocatable :: precs(:)
|
||||
integer :: iret, istopc,itmax,itrace,ipart,nmat,nprecs,irst,irnum,ntry
|
||||
character(len=1024) :: charbuf
|
||||
real(kind(1.d0)) :: eps, omega,thr1,thr2
|
||||
real(psb_dpk_) :: eps, omega,thr1,thr2
|
||||
character :: afmt*5, lv1*10, lv2*10, pdescr*40
|
||||
integer :: iam, nm, np, i, idx
|
||||
integer, parameter :: npparms=14
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module precd
|
||||
|
||||
use psb_base_mod, only : psb_dpk_
|
||||
type precdata
|
||||
character(len=10) :: lv1, lv2 ! First and second level prec type
|
||||
integer :: nlev !
|
||||
@@ -8,7 +8,7 @@ module precd
|
||||
integer :: prol ! prolongation over application of as
|
||||
integer :: ftype1 ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
integer :: fill1 ! Fill-in for factorization 1
|
||||
real(kind(1.d0)) :: thr1 ! Threshold for fact. 1 ILU(T)
|
||||
real(psb_dpk_) :: thr1 ! Threshold for fact. 1 ILU(T)
|
||||
integer :: mltype ! additive or multiplicative 2nd level prec
|
||||
integer :: aggr ! local or global aggregation
|
||||
integer :: smthkind ! smoothing type
|
||||
@@ -17,9 +17,9 @@ module precd
|
||||
integer :: glbsmth ! global smoothing
|
||||
integer :: ftype2 ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
integer :: fill2 ! Fill-in for factorization 1
|
||||
real(kind(1.d0)) :: thr2 ! Threshold for fact. 1 ILU(T)
|
||||
real(psb_dpk_) :: thr2 ! Threshold for fact. 1 ILU(T)
|
||||
integer :: jswp ! Jacobi sweeps
|
||||
real(kind(1.d0)) :: omega ! smoother omega
|
||||
real(psb_dpk_) :: omega ! smoother omega
|
||||
character(len=40) :: descr ! verbose description of the prec
|
||||
end type precdata
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ program zf_bench
|
||||
integer :: igsmth, matop, novr
|
||||
|
||||
! dense matrices
|
||||
complex(kind(1.d0)), allocatable, target :: aux_b(:,:), d(:)
|
||||
complex(kind(1.d0)), allocatable , save :: b_col(:), x_col(:), r_col(:), &
|
||||
complex(psb_dpk_), allocatable, target :: aux_b(:,:), d(:)
|
||||
complex(psb_dpk_), allocatable , save :: b_col(:), x_col(:), r_col(:), &
|
||||
& x_col_glob(:), r_col_glob(:)
|
||||
complex(kind(1.d0)), pointer :: b_col_glob(:)
|
||||
complex(psb_dpk_), pointer :: b_col_glob(:)
|
||||
|
||||
! communications data structure
|
||||
type(psb_desc_type):: desc_a
|
||||
@@ -37,7 +37,7 @@ program zf_bench
|
||||
! solver paramters
|
||||
integer :: iter, itmax, ierr, itrace, ircode, ipart,nlev,&
|
||||
& methd, istopc, iprec, ml, irnum, irst, ntry, nmat, ilev,ipsize,asize,cdsize
|
||||
real(kind(1.d0)) :: err, eps
|
||||
real(psb_dpk_) :: err, eps
|
||||
|
||||
character(len=5) :: afmt
|
||||
character(len=20) :: name
|
||||
@@ -46,7 +46,7 @@ program zf_bench
|
||||
! other variables
|
||||
integer :: i,info,j,m_problem, nm, nt
|
||||
integer :: internal, m,ii,nnzero, nprecs, pp
|
||||
real(kind(1.d0)) :: t1, t2, tprec, r_amax, b_amax,&
|
||||
real(psb_dpk_) :: t1, t2, tprec, r_amax, b_amax,&
|
||||
&scale,resmx,resmxp, mttot, mtslv, mtprec
|
||||
integer :: nrhs, nrow, n_row, dim, nv, ne
|
||||
integer, allocatable :: ipv(:), neigh(:), ivg(:)
|
||||
|
||||
+35
-28
@@ -90,8 +90,8 @@ program ppde
|
||||
integer :: idim
|
||||
|
||||
! miscellaneous
|
||||
real(kind(1.d0)), parameter :: one = 1.d0
|
||||
real(kind(1.d0)) :: t1, t2, tprec
|
||||
real(psb_dpk_), parameter :: one = 1.d0
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
|
||||
! sparse matrix and preconditioner
|
||||
type(psb_dspmat_type) :: a
|
||||
@@ -99,13 +99,13 @@ program ppde
|
||||
! descriptor
|
||||
type(psb_desc_type) :: desc_a
|
||||
! dense matrices
|
||||
real(kind(1.d0)), allocatable :: b(:), x(:)
|
||||
real(psb_dpk_), allocatable :: b(:), x(:)
|
||||
! blacs parameters
|
||||
integer :: ictxt, iam, np
|
||||
|
||||
! solver parameters
|
||||
integer :: iter, itmax,itrace, istopc, irst
|
||||
real(kind(1.d0)) :: err, eps
|
||||
real(psb_dpk_) :: err, eps
|
||||
|
||||
type precdata
|
||||
character(len=10) :: lv1, lvn ! First level(s) and last level prec type
|
||||
@@ -115,7 +115,7 @@ program ppde
|
||||
integer :: prol ! prolongation over application of as
|
||||
integer :: ftype1 ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
integer :: fill1 ! Fill-in for factorization 1
|
||||
real(kind(1.d0)) :: thr1 ! Threshold for fact. 1 ILU(T)
|
||||
real(psb_dpk_) :: thr1 ! Threshold for fact. 1 ILU(T)
|
||||
integer :: mltype ! additive or multiplicative 2nd level prec
|
||||
integer :: aggr ! local or global aggregation
|
||||
integer :: smthkind ! smoothing type
|
||||
@@ -124,9 +124,9 @@ program ppde
|
||||
integer :: glbsmth ! global smoothing
|
||||
integer :: ftype2 ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
integer :: fill2 ! Fill-in for factorization 1
|
||||
real(kind(1.d0)) :: thr2 ! Threshold for fact. 1 ILU(T)
|
||||
real(psb_dpk_) :: thr2 ! Threshold for fact. 1 ILU(T)
|
||||
integer :: jswp ! Jacobi sweeps
|
||||
real(kind(1.d0)) :: omega ! smoother omega
|
||||
real(psb_dpk_) :: omega ! smoother omega
|
||||
character(len=20) :: descr ! verbose description of the prec
|
||||
end type precdata
|
||||
type(precdata) :: prectype
|
||||
@@ -471,7 +471,7 @@ contains
|
||||
implicit none
|
||||
integer :: idim
|
||||
integer, parameter :: nbmax=10
|
||||
real(kind(1.d0)), allocatable :: b(:),xv(:)
|
||||
real(psb_dpk_), allocatable :: b(:),xv(:)
|
||||
type(psb_desc_type) :: desc_a
|
||||
integer :: ictxt, info
|
||||
character :: afmt*5
|
||||
@@ -485,21 +485,21 @@ contains
|
||||
end subroutine parts
|
||||
end interface ! local variables
|
||||
type(psb_dspmat_type) :: a
|
||||
real(kind(1.d0)) :: zt(nbmax),glob_x,glob_y,glob_z
|
||||
real(psb_dpk_) :: zt(nbmax),glob_x,glob_y,glob_z
|
||||
integer :: m,n,nnz,glob_row
|
||||
integer :: x,y,z,ia,indx_owner
|
||||
integer :: np, iam
|
||||
integer :: element
|
||||
integer :: nv, inv
|
||||
integer, allocatable :: irow(:),icol(:)
|
||||
real(kind(1.d0)), allocatable :: val(:)
|
||||
real(psb_dpk_), allocatable :: val(:)
|
||||
integer, allocatable :: prv(:)
|
||||
! deltah dimension of each grid cell
|
||||
! deltat discretization time
|
||||
real(kind(1.d0)) :: deltah
|
||||
real(kind(1.d0)),parameter :: rhs=0.d0,one=1.d0,zero=0.d0
|
||||
real(kind(1.d0)) :: t1, t2, t3, tins, tasb
|
||||
real(kind(1.d0)) :: a1, a2, a3, a4, b1, b2, b3
|
||||
real(psb_dpk_) :: deltah
|
||||
real(psb_dpk_),parameter :: rhs=0.d0,one=1.d0,zero=0.d0
|
||||
real(psb_dpk_) :: t1, t2, t3, tins, tasb
|
||||
real(psb_dpk_) :: a1, a2, a3, a4, b1, b2, b3
|
||||
external :: a1, a2, a3, a4, b1, b2, b3
|
||||
integer :: err_act
|
||||
! common area
|
||||
@@ -750,38 +750,45 @@ end program ppde
|
||||
! functions parametrizing the differential equation
|
||||
!
|
||||
function a1(x,y,z)
|
||||
real(kind(1.d0)) :: a1
|
||||
real(kind(1.d0)) :: x,y,z
|
||||
use psb_base_mod, only : psb_dpk_
|
||||
real(psb_dpk_) :: a1
|
||||
real(psb_dpk_) :: x,y,z
|
||||
a1=1.d0
|
||||
end function a1
|
||||
function a2(x,y,z)
|
||||
real(kind(1.d0)) :: a2
|
||||
real(kind(1.d0)) :: x,y,z
|
||||
use psb_base_mod, only : psb_dpk_
|
||||
real(psb_dpk_) :: a2
|
||||
real(psb_dpk_) :: x,y,z
|
||||
a2=2.d1*y
|
||||
end function a2
|
||||
function a3(x,y,z)
|
||||
real(kind(1.d0)) :: a3
|
||||
real(kind(1.d0)) :: x,y,z
|
||||
use psb_base_mod, only : psb_dpk_
|
||||
real(psb_dpk_) :: a3
|
||||
real(psb_dpk_) :: x,y,z
|
||||
a3=1.d0
|
||||
end function a3
|
||||
function a4(x,y,z)
|
||||
real(kind(1.d0)) :: a4
|
||||
real(kind(1.d0)) :: x,y,z
|
||||
use psb_base_mod, only : psb_dpk_
|
||||
real(psb_dpk_) :: a4
|
||||
real(psb_dpk_) :: x,y,z
|
||||
a4=1.d0
|
||||
end function a4
|
||||
function b1(x,y,z)
|
||||
real(kind(1.d0)) :: b1
|
||||
real(kind(1.d0)) :: x,y,z
|
||||
use psb_base_mod, only : psb_dpk_
|
||||
real(psb_dpk_) :: b1
|
||||
real(psb_dpk_) :: x,y,z
|
||||
b1=1.d0
|
||||
end function b1
|
||||
function b2(x,y,z)
|
||||
real(kind(1.d0)) :: b2
|
||||
real(kind(1.d0)) :: x,y,z
|
||||
use psb_base_mod, only : psb_dpk_
|
||||
real(psb_dpk_) :: b2
|
||||
real(psb_dpk_) :: x,y,z
|
||||
b2=1.d0
|
||||
end function b2
|
||||
function b3(x,y,z)
|
||||
real(kind(1.d0)) :: b3
|
||||
real(kind(1.d0)) :: x,y,z
|
||||
use psb_base_mod, only : psb_dpk_
|
||||
real(psb_dpk_) :: b3
|
||||
real(psb_dpk_) :: x,y,z
|
||||
b3=1.d0
|
||||
end function b3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user