|
|
@ -126,9 +126,9 @@ module mld_prec_type
|
|
|
|
! iprcparm - integer, dimension(:), allocatable.
|
|
|
|
! iprcparm - integer, dimension(:), allocatable.
|
|
|
|
! The integer parameters defining the base preconditioner K(ilev)
|
|
|
|
! The integer parameters defining the base preconditioner K(ilev)
|
|
|
|
! (the iprcparm entries and values are specified below).
|
|
|
|
! (the iprcparm entries and values are specified below).
|
|
|
|
! dprcparm - real(psb_dpk_), dimension(:), allocatable.
|
|
|
|
! rprcparm - real(psb_dpk_), dimension(:), allocatable.
|
|
|
|
! The real parameters defining the base preconditioner K(ilev)
|
|
|
|
! The real parameters defining the base preconditioner K(ilev)
|
|
|
|
! (the dprcparm entries and values are specified below).
|
|
|
|
! (the rprcparm entries and values are specified below).
|
|
|
|
! perm - integer, dimension(:), allocatable.
|
|
|
|
! perm - integer, dimension(:), allocatable.
|
|
|
|
! The row and column permutations applied to the local part of
|
|
|
|
! The row and column permutations applied to the local part of
|
|
|
|
! A(ilev) (defined only if iprcparm(mld_sub_ren_)>0).
|
|
|
|
! A(ilev) (defined only if iprcparm(mld_sub_ren_)>0).
|
|
|
@ -164,7 +164,7 @@ module mld_prec_type
|
|
|
|
real(psb_dpk_), allocatable :: d(:)
|
|
|
|
real(psb_dpk_), allocatable :: d(:)
|
|
|
|
type(psb_desc_type) :: desc_data , desc_ac
|
|
|
|
type(psb_desc_type) :: desc_data , desc_ac
|
|
|
|
integer, allocatable :: iprcparm(:)
|
|
|
|
integer, allocatable :: iprcparm(:)
|
|
|
|
real(psb_dpk_), allocatable :: dprcparm(:)
|
|
|
|
real(psb_dpk_), allocatable :: rprcparm(:)
|
|
|
|
integer, allocatable :: perm(:), invperm(:)
|
|
|
|
integer, allocatable :: perm(:), invperm(:)
|
|
|
|
integer, allocatable :: mlia(:), nlaggr(:)
|
|
|
|
integer, allocatable :: mlia(:), nlaggr(:)
|
|
|
|
type(psb_dspmat_type), pointer :: base_a => null()
|
|
|
|
type(psb_dspmat_type), pointer :: base_a => null()
|
|
|
@ -183,7 +183,7 @@ module mld_prec_type
|
|
|
|
complex(psb_dpk_), allocatable :: d(:)
|
|
|
|
complex(psb_dpk_), allocatable :: d(:)
|
|
|
|
type(psb_desc_type) :: desc_data , desc_ac
|
|
|
|
type(psb_desc_type) :: desc_data , desc_ac
|
|
|
|
integer, allocatable :: iprcparm(:)
|
|
|
|
integer, allocatable :: iprcparm(:)
|
|
|
|
real(psb_dpk_), allocatable :: dprcparm(:)
|
|
|
|
real(psb_dpk_), allocatable :: rprcparm(:)
|
|
|
|
integer, allocatable :: perm(:), invperm(:)
|
|
|
|
integer, allocatable :: perm(:), invperm(:)
|
|
|
|
integer, allocatable :: mlia(:), nlaggr(:)
|
|
|
|
integer, allocatable :: mlia(:), nlaggr(:)
|
|
|
|
type(psb_zspmat_type), pointer :: base_a => null()
|
|
|
|
type(psb_zspmat_type), pointer :: base_a => null()
|
|
|
@ -278,12 +278,12 @@ module mld_prec_type
|
|
|
|
integer, parameter :: mld_prec_built_=98765
|
|
|
|
integer, parameter :: mld_prec_built_=98765
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Entries in dprcparm: ILU(k,t) threshold, smoothed aggregation omega
|
|
|
|
! Entries in rprcparm: ILU(k,t) threshold, smoothed aggregation omega
|
|
|
|
!
|
|
|
|
!
|
|
|
|
integer, parameter :: mld_fact_thrs_=1
|
|
|
|
integer, parameter :: mld_fact_thrs_=1
|
|
|
|
integer, parameter :: mld_aggr_damp_=2
|
|
|
|
integer, parameter :: mld_aggr_damp_=2
|
|
|
|
integer, parameter :: mld_aggr_thresh_=3
|
|
|
|
integer, parameter :: mld_aggr_thresh_=3
|
|
|
|
integer, parameter :: mld_dfpsz_=4
|
|
|
|
integer, parameter :: mld_rfpsz_=4
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Fields for sparse matrices ensembles stored in av()
|
|
|
|
! Fields for sparse matrices ensembles stored in av()
|
|
|
@ -409,7 +409,7 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
if (allocated(prec%dprcparm)) val = val + psb_sizeof_dp * size(prec%dprcparm)
|
|
|
|
if (allocated(prec%rprcparm)) val = val + psb_sizeof_dp * size(prec%rprcparm)
|
|
|
|
if (allocated(prec%d)) val = val + psb_sizeof_dp * size(prec%d)
|
|
|
|
if (allocated(prec%d)) val = val + psb_sizeof_dp * size(prec%d)
|
|
|
|
if (allocated(prec%perm)) val = val + psb_sizeof_int * size(prec%perm)
|
|
|
|
if (allocated(prec%perm)) val = val + psb_sizeof_int * size(prec%perm)
|
|
|
|
if (allocated(prec%invperm)) val = val + psb_sizeof_int * size(prec%invperm)
|
|
|
|
if (allocated(prec%invperm)) val = val + psb_sizeof_int * size(prec%invperm)
|
|
|
@ -446,7 +446,7 @@ contains
|
|
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
if (allocated(prec%dprcparm)) val = val + psb_sizeof_dp * size(prec%dprcparm)
|
|
|
|
if (allocated(prec%rprcparm)) val = val + psb_sizeof_dp * size(prec%rprcparm)
|
|
|
|
if (allocated(prec%d)) val = val + 2 * psb_sizeof_dp * size(prec%d)
|
|
|
|
if (allocated(prec%d)) val = val + 2 * psb_sizeof_dp * size(prec%d)
|
|
|
|
if (allocated(prec%perm)) val = val + psb_sizeof_int * size(prec%perm)
|
|
|
|
if (allocated(prec%perm)) val = val + psb_sizeof_int * size(prec%perm)
|
|
|
|
if (allocated(prec%invperm)) val = val + psb_sizeof_int * size(prec%invperm)
|
|
|
|
if (allocated(prec%invperm)) val = val + psb_sizeof_int * size(prec%invperm)
|
|
|
@ -531,7 +531,7 @@ contains
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%dprcparm(mld_fact_thrs_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%rprcparm(mld_fact_thrs_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case default
|
|
|
|
case default
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
@ -543,7 +543,7 @@ contains
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%dprcparm(mld_fact_thrs_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%rprcparm(mld_fact_thrs_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case default
|
|
|
|
case default
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
@ -573,7 +573,7 @@ contains
|
|
|
|
& aggr_kinds(p%baseprecv(ilev)%iprcparm(mld_aggr_kind_))
|
|
|
|
& aggr_kinds(p%baseprecv(ilev)%iprcparm(mld_aggr_kind_))
|
|
|
|
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
|
|
|
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
|
|
|
write(iout,*) 'Damping omega: ', &
|
|
|
|
write(iout,*) 'Damping omega: ', &
|
|
|
|
& p%baseprecv(ilev)%dprcparm(mld_aggr_damp_)
|
|
|
|
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
|
|
|
write(iout,*) 'Multilevel smoother position: ',&
|
|
|
|
write(iout,*) 'Multilevel smoother position: ',&
|
|
|
|
& smooth_names(p%baseprecv(ilev)%iprcparm(mld_smooth_pos_))
|
|
|
|
& smooth_names(p%baseprecv(ilev)%iprcparm(mld_smooth_pos_))
|
|
|
|
end if
|
|
|
|
end if
|
|
|
@ -589,7 +589,7 @@ contains
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%dprcparm(mld_fact_thrs_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%rprcparm(mld_fact_thrs_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case default
|
|
|
|
case default
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
@ -657,7 +657,7 @@ contains
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%dprcparm(mld_fact_thrs_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%rprcparm(mld_fact_thrs_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case default
|
|
|
|
case default
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
@ -669,7 +669,7 @@ contains
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%dprcparm(mld_fact_thrs_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%rprcparm(mld_fact_thrs_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case default
|
|
|
|
case default
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
@ -699,7 +699,7 @@ contains
|
|
|
|
& aggr_kinds(p%baseprecv(ilev)%iprcparm(mld_aggr_kind_))
|
|
|
|
& aggr_kinds(p%baseprecv(ilev)%iprcparm(mld_aggr_kind_))
|
|
|
|
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
|
|
|
if (p%baseprecv(ilev)%iprcparm(mld_aggr_kind_) /= mld_no_smooth_) then
|
|
|
|
write(iout,*) 'Smoothing omega: ', &
|
|
|
|
write(iout,*) 'Smoothing omega: ', &
|
|
|
|
& p%baseprecv(ilev)%dprcparm(mld_aggr_damp_)
|
|
|
|
& p%baseprecv(ilev)%rprcparm(mld_aggr_damp_)
|
|
|
|
write(iout,*) 'Smoothing position: ',&
|
|
|
|
write(iout,*) 'Smoothing position: ',&
|
|
|
|
& smooth_names(p%baseprecv(ilev)%iprcparm(mld_smooth_pos_))
|
|
|
|
& smooth_names(p%baseprecv(ilev)%iprcparm(mld_smooth_pos_))
|
|
|
|
end if
|
|
|
|
end if
|
|
|
@ -715,7 +715,7 @@ contains
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
case(mld_ilu_n_,mld_milu_n_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
write(iout,*) 'Fill level:',p%baseprecv(ilev)%iprcparm(mld_sub_fill_in_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
case(mld_ilu_t_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%dprcparm(mld_fact_thrs_)
|
|
|
|
write(iout,*) 'Fill threshold :',p%baseprecv(ilev)%rprcparm(mld_fact_thrs_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case(mld_slu_,mld_umf_,mld_sludist_)
|
|
|
|
case default
|
|
|
|
case default
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
|
write(iout,*) 'Should never get here!'
|
|
|
@ -946,8 +946,8 @@ contains
|
|
|
|
if (allocated(p%desc_ac%matrix_data)) &
|
|
|
|
if (allocated(p%desc_ac%matrix_data)) &
|
|
|
|
& call psb_cdfree(p%desc_ac,info)
|
|
|
|
& call psb_cdfree(p%desc_ac,info)
|
|
|
|
|
|
|
|
|
|
|
|
if (allocated(p%dprcparm)) then
|
|
|
|
if (allocated(p%rprcparm)) then
|
|
|
|
deallocate(p%dprcparm,stat=info)
|
|
|
|
deallocate(p%rprcparm,stat=info)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
! This is a pointer to something else, must not free it here.
|
|
|
|
! This is a pointer to something else, must not free it here.
|
|
|
|
nullify(p%base_a)
|
|
|
|
nullify(p%base_a)
|
|
|
@ -1029,8 +1029,8 @@ contains
|
|
|
|
if (allocated(p%desc_ac%matrix_data)) &
|
|
|
|
if (allocated(p%desc_ac%matrix_data)) &
|
|
|
|
& call psb_cdfree(p%desc_ac,info)
|
|
|
|
& call psb_cdfree(p%desc_ac,info)
|
|
|
|
|
|
|
|
|
|
|
|
if (allocated(p%dprcparm)) then
|
|
|
|
if (allocated(p%rprcparm)) then
|
|
|
|
deallocate(p%dprcparm,stat=info)
|
|
|
|
deallocate(p%rprcparm,stat=info)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
! This is a pointer to something else, must not free it here.
|
|
|
|
! This is a pointer to something else, must not free it here.
|
|
|
|
nullify(p%base_a)
|
|
|
|
nullify(p%base_a)
|
|
|
|