mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-07 07:04:59 +00:00
mld2p4-2:
mlprec/mld_c_prec_type.f90 mlprec/mld_cmlprec_bld.f90 mlprec/mld_cprecbld.f90 mlprec/mld_csp_renum.f90 mlprec/mld_d_prec_type.f90 mlprec/mld_dmlprec_bld.f90 mlprec/mld_dprecbld.f90 mlprec/mld_s_prec_type.f90 mlprec/mld_smlprec_bld.f90 mlprec/mld_sprecbld.f90 mlprec/mld_ssp_renum.f90 mlprec/mld_z_prec_type.f90 mlprec/mld_zas_bld.f90 mlprec/mld_zilu_bld.f90 mlprec/mld_zmlprec_bld.f90 mlprec/mld_zprecbld.f90 mlprec/mld_zsp_renum.f90 Wipe out direct use of DESC internal components.
This commit is contained in:
@@ -571,6 +571,7 @@ contains
|
||||
end subroutine mld_cbase_precfree
|
||||
|
||||
subroutine mld_c_onelev_precfree(p,info)
|
||||
use psb_sparse_mod
|
||||
implicit none
|
||||
|
||||
type(mld_conelev_type), intent(inout) :: p
|
||||
@@ -584,7 +585,7 @@ contains
|
||||
call mld_precfree(p%prec,info)
|
||||
|
||||
call p%ac%free()
|
||||
if (allocated(p%desc_ac%matrix_data)) &
|
||||
if (psb_is_ok_desc(p%desc_ac)) &
|
||||
& call psb_cdfree(p%desc_ac,info)
|
||||
|
||||
if (allocated(p%rprcparm)) then
|
||||
|
||||
@@ -107,7 +107,7 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info)
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Entering ',desc_a%matrix_data(:)
|
||||
& 'Entering '
|
||||
!
|
||||
! For the time being we are commenting out the UPDATE argument
|
||||
! we plan to resurrect it later.
|
||||
|
||||
@@ -103,7 +103,7 @@ subroutine mld_cprecbld(a,desc_a,p,info)
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Entering ',desc_a%matrix_data(:)
|
||||
& 'Entering '
|
||||
!
|
||||
! For the time being we are commenting out the UPDATE argument
|
||||
! we plan to resurrect it later.
|
||||
|
||||
@@ -130,7 +130,7 @@ subroutine mld_csp_renum(a,blck,p,atmp,info)
|
||||
! Remember: we have switched IA1=COLS and IA2=ROWS.
|
||||
! Now identify the set of distinct local column indices.
|
||||
!
|
||||
nnr = p%desc_data%matrix_data(psb_n_row_)
|
||||
nnr = psb_cd_get_local_rows(p%desc_data)
|
||||
allocate(p%perm(nnr),p%invperm(nnr),itmp2(nnr),stat=info)
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate')
|
||||
|
||||
@@ -215,9 +215,9 @@ module mld_d_prec_type
|
||||
type(mld_dbaseprec_type) :: prec
|
||||
integer, allocatable :: iprcparm(:)
|
||||
real(psb_dpk_), allocatable :: rprcparm(:)
|
||||
type(psb_dspmat_type) :: ac
|
||||
type(psb_dspmat_type) :: ac
|
||||
type(psb_desc_type) :: desc_ac
|
||||
type(psb_dspmat_type), pointer :: base_a => null()
|
||||
type(psb_dspmat_type), pointer :: base_a => null()
|
||||
type(psb_desc_type), pointer :: base_desc => null()
|
||||
type(psb_dlinmap_type) :: map
|
||||
contains
|
||||
@@ -550,9 +550,6 @@ contains
|
||||
!!$ deallocate(p%av,stat=info)
|
||||
!!$ end if
|
||||
!!$
|
||||
!!$ if (allocated(p%desc_data%matrix_data)) &
|
||||
!!$ & call psb_cdfree(p%desc_data,info)
|
||||
!!$
|
||||
if (allocated(p%rprcparm)) then
|
||||
deallocate(p%rprcparm,stat=info)
|
||||
end if
|
||||
@@ -585,6 +582,7 @@ contains
|
||||
end subroutine mld_dbase_precfree
|
||||
|
||||
subroutine mld_d_onelev_precfree(p,info)
|
||||
use psb_sparse_mod
|
||||
implicit none
|
||||
|
||||
type(mld_donelev_type), intent(inout) :: p
|
||||
@@ -598,7 +596,7 @@ contains
|
||||
call mld_precfree(p%prec,info)
|
||||
|
||||
call p%ac%free()
|
||||
if (allocated(p%desc_ac%matrix_data)) &
|
||||
if (psb_is_ok_desc(p%desc_ac)) &
|
||||
& call psb_cdfree(p%desc_ac,info)
|
||||
|
||||
if (allocated(p%rprcparm)) then
|
||||
|
||||
@@ -107,7 +107,7 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info)
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Entering ',desc_a%matrix_data(:)
|
||||
& 'Entering '
|
||||
!
|
||||
! For the time being we are commenting out the UPDATE argument
|
||||
! we plan to resurrect it later.
|
||||
|
||||
@@ -102,7 +102,7 @@ subroutine mld_dprecbld(a,desc_a,p,info)
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Entering ',desc_a%matrix_data(:)
|
||||
& 'Entering '
|
||||
!
|
||||
! For the time being we are commenting out the UPDATE argument;
|
||||
! we plan to resurrect it later.
|
||||
|
||||
@@ -520,6 +520,7 @@ contains
|
||||
! error code.
|
||||
!
|
||||
subroutine mld_sbase_precfree(p,info)
|
||||
use psb_sparse_mod
|
||||
implicit none
|
||||
|
||||
type(mld_sbaseprec_type), intent(inout) :: p
|
||||
@@ -547,8 +548,6 @@ contains
|
||||
!!$ deallocate(p%av,stat=info)
|
||||
!!$ end if
|
||||
!!$
|
||||
!!$ if (allocated(p%desc_data%matrix_data)) &
|
||||
!!$ & call psb_cdfree(p%desc_data,info)
|
||||
!!$
|
||||
if (allocated(p%rprcparm)) then
|
||||
deallocate(p%rprcparm,stat=info)
|
||||
@@ -575,6 +574,7 @@ contains
|
||||
end subroutine mld_sbase_precfree
|
||||
|
||||
subroutine mld_s_onelev_precfree(p,info)
|
||||
use psb_sparse_mod
|
||||
implicit none
|
||||
|
||||
type(mld_sonelev_type), intent(inout) :: p
|
||||
@@ -588,7 +588,7 @@ contains
|
||||
call mld_precfree(p%prec,info)
|
||||
|
||||
call p%ac%free()
|
||||
if (allocated(p%desc_ac%matrix_data)) &
|
||||
if (psb_is_ok_desc(p%desc_ac)) &
|
||||
& call psb_cdfree(p%desc_ac,info)
|
||||
|
||||
if (allocated(p%rprcparm)) then
|
||||
|
||||
@@ -107,7 +107,7 @@ subroutine mld_smlprec_bld(a,desc_a,p,info)
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Entering ',desc_a%matrix_data(:)
|
||||
& 'Entering '
|
||||
!
|
||||
! For the time being we are commenting out the UPDATE argument
|
||||
! we plan to resurrect it later.
|
||||
|
||||
@@ -102,7 +102,7 @@ subroutine mld_sprecbld(a,desc_a,p,info)
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Entering ',desc_a%matrix_data(:)
|
||||
& 'Entering '
|
||||
!
|
||||
! For the time being we are commenting out the UPDATE argument
|
||||
! we plan to resurrect it later.
|
||||
|
||||
@@ -130,7 +130,7 @@ subroutine mld_ssp_renum(a,blck,p,atmp,info)
|
||||
! Remember: we have switched IA1=COLS and IA2=ROWS.
|
||||
! Now identify the set of distinct local column indices.
|
||||
!
|
||||
nnr = p%desc_data%matrix_data(psb_n_row_)
|
||||
nnr = psb_cd_get_local_rows(p%desc_data)
|
||||
allocate(p%perm(nnr),p%invperm(nnr),itmp2(nnr),stat=info)
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate')
|
||||
|
||||
@@ -544,8 +544,6 @@ contains
|
||||
!!$ deallocate(p%av,stat=info)
|
||||
!!$ end if
|
||||
!!$
|
||||
!!$ if (allocated(p%desc_data%matrix_data)) &
|
||||
!!$ & call psb_cdfree(p%desc_data,info)
|
||||
!!$
|
||||
if (allocated(p%rprcparm)) then
|
||||
deallocate(p%rprcparm,stat=info)
|
||||
@@ -571,6 +569,7 @@ contains
|
||||
end subroutine mld_zbase_precfree
|
||||
|
||||
subroutine mld_z_onelev_precfree(p,info)
|
||||
use psb_sparse_mod
|
||||
implicit none
|
||||
|
||||
type(mld_zonelev_type), intent(inout) :: p
|
||||
@@ -584,7 +583,7 @@ contains
|
||||
call mld_precfree(p%prec,info)
|
||||
|
||||
call p%ac%free()
|
||||
if (allocated(p%desc_ac%matrix_data)) &
|
||||
if (psb_is_ok_desc(p%desc_ac)) &
|
||||
& call psb_cdfree(p%desc_ac,info)
|
||||
|
||||
if (allocated(p%rprcparm)) then
|
||||
|
||||
@@ -216,8 +216,8 @@ subroutine mld_zas_bld(a,desc_a,p,upd,info)
|
||||
call psb_cdbldext(a,desc_a,novr,p%desc_data,info,extype=psb_ovt_asov_)
|
||||
if(debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& ' From cdbldext _:',p%desc_data%matrix_data(psb_n_row_),&
|
||||
& p%desc_data%matrix_data(psb_n_col_)
|
||||
& ' From cdbldext _:',psb_cd_get_local_rows(p%desc_data),&
|
||||
& psb_cd_get_local_cols(p%desc_data)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
info=psb_err_from_subroutine_
|
||||
|
||||
@@ -157,7 +157,7 @@ subroutine mld_zilu_bld(a,p,upd,info,blck)
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& ': out get_nnzeros',nztota,a%m,a%k,nrow_a
|
||||
|
||||
n_row = p%desc_data%matrix_data(psb_n_row_)
|
||||
n_row = psb_cd_get_local_rows(p%desc_data)
|
||||
p%av(mld_l_pr_)%m = n_row
|
||||
p%av(mld_l_pr_)%k = n_row
|
||||
p%av(mld_u_pr_)%m = n_row
|
||||
|
||||
@@ -107,7 +107,7 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info)
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Entering ',desc_a%matrix_data(:)
|
||||
& 'Entering '
|
||||
!
|
||||
! For the time being we are commenting out the UPDATE argument
|
||||
! we plan to resurrect it later.
|
||||
|
||||
@@ -103,7 +103,7 @@ subroutine mld_zprecbld(a,desc_a,p,info)
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Entering ',desc_a%matrix_data(:)
|
||||
& 'Entering '
|
||||
!
|
||||
! For the time being we are commenting out the UPDATE argument;
|
||||
! we plan to resurrect it later.
|
||||
|
||||
@@ -130,7 +130,7 @@ subroutine mld_zsp_renum(a,blck,p,atmp,info)
|
||||
! Remember: we have switched IA1=COLS and IA2=ROWS.
|
||||
! Now identify the set of distinct local column indices.
|
||||
!
|
||||
nnr = p%desc_data%matrix_data(psb_n_row_)
|
||||
nnr = psb_cd_get_local_rows(p%desc_data)
|
||||
allocate(p%perm(nnr),p%invperm(nnr),itmp2(nnr),stat=info)
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='Allocate')
|
||||
|
||||
Reference in New Issue
Block a user