|
|
|
@ -227,6 +227,7 @@ subroutine mld_dbjac_bld(a,p,upd,info,data)
|
|
|
|
|
! Clip into p%av(ap_nd_) the off block-diagonal part of the local
|
|
|
|
|
! matrix. The clipped matrix is then stored in CSR format.
|
|
|
|
|
!
|
|
|
|
|
if (p%iprcparm(mld_smooth_sweeps_) > 1) then
|
|
|
|
|
call psb_sp_clip(atmp,p%av(mld_ap_nd_),info,&
|
|
|
|
|
& jmin=atmp%m+1,rscale=.false.,cscale=.false.)
|
|
|
|
|
if (info == 0) call psb_spcnv(p%av(mld_ap_nd_),info,&
|
|
|
|
@ -247,7 +248,7 @@ subroutine mld_dbjac_bld(a,p,upd,info,data)
|
|
|
|
|
!
|
|
|
|
|
p%iprcparm(mld_smooth_sweeps_) = 1
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
if (debug_level >= psb_debug_outer_) &
|
|
|
|
|
& write(debug_unit,*) me,' ',trim(name),' Factoring rows ',&
|
|
|
|
|
& atmp%m,a%m,blck%m,atmp%ia2(atmp%m+1)-1
|
|
|
|
@ -280,6 +281,19 @@ subroutine mld_dbjac_bld(a,p,upd,info,data)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
case(mld_sludist_)
|
|
|
|
|
!
|
|
|
|
|
! LU factorization through the SuperLU_DIST package. This works only
|
|
|
|
|
! when the matrix is distributed among the processes.
|
|
|
|
|
! NOTE: Should have NO overlap here!!!!
|
|
|
|
|
!
|
|
|
|
|
call psb_spcnv(a,atmp,info,afmt='csr')
|
|
|
|
|
if (info == 0) call mld_sludist_bld(atmp,p%desc_data,p,info)
|
|
|
|
|
if (info /= 0) then
|
|
|
|
|
call psb_errpush(4010,name,a_err='mld_sludist_bld')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
case(mld_umf_)
|
|
|
|
|
!
|
|
|
|
|
! LU factorization through the UMFPACK package.
|
|
|
|
@ -317,16 +331,6 @@ subroutine mld_dbjac_bld(a,p,upd,info,data)
|
|
|
|
|
!
|
|
|
|
|
case(0)
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! Compute a factorization of the diagonal block of the local matrix,
|
|
|
|
|
! according to the choice made by the user by setting p%iprcparm(sub_solve_)
|
|
|
|
|
!
|
|
|
|
|
select case(p%iprcparm(mld_sub_solve_))
|
|
|
|
|
|
|
|
|
|
case(mld_ilu_n_,mld_milu_n_,mld_ilu_t_)
|
|
|
|
|
!
|
|
|
|
|
! ILU(k)/MILU(k)/ILU(k,t) factorization.
|
|
|
|
|
!
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! In case of multiple block-Jacobi sweeps, clip into p%av(ap_nd_)
|
|
|
|
@ -364,7 +368,22 @@ subroutine mld_dbjac_bld(a,p,upd,info,data)
|
|
|
|
|
p%iprcparm(mld_smooth_sweeps_) = 1
|
|
|
|
|
end if
|
|
|
|
|
call psb_sp_free(atmp,info)
|
|
|
|
|
if (info/=0) then
|
|
|
|
|
call psb_errpush(4010,name,a_err='psb_sp_free')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! Compute a factorization of the diagonal block of the local matrix,
|
|
|
|
|
! according to the choice made by the user by setting p%iprcparm(sub_solve_)
|
|
|
|
|
!
|
|
|
|
|
select case(p%iprcparm(mld_sub_solve_))
|
|
|
|
|
|
|
|
|
|
case(mld_ilu_n_,mld_milu_n_,mld_ilu_t_)
|
|
|
|
|
!
|
|
|
|
|
! ILU(k)/MILU(k)/ILU(k,t) factorization.
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
! Compute the incomplete LU factorization.
|
|
|
|
|
!
|
|
|
|
@ -383,35 +402,6 @@ subroutine mld_dbjac_bld(a,p,upd,info,data)
|
|
|
|
|
call psb_spcnv(a,atmp,info,afmt='coo')
|
|
|
|
|
if (info == 0) call psb_rwextd(n_row,atmp,info,b=blck)
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! In case of multiple block-Jacobi sweeps, clip into p%av(ap_nd_)
|
|
|
|
|
! the off block-diagonal part of the local extended matrix. The
|
|
|
|
|
! clipped matrix is then stored in CSR format.
|
|
|
|
|
!
|
|
|
|
|
if (p%iprcparm(mld_smooth_sweeps_) > 1) then
|
|
|
|
|
|
|
|
|
|
if (info == 0) call psb_sp_clip(atmp,p%av(mld_ap_nd_),info,&
|
|
|
|
|
& jmin=atmp%m+1,rscale=.false.,cscale=.false.)
|
|
|
|
|
|
|
|
|
|
if (info == 0) call psb_spcnv(p%av(mld_ap_nd_),info,&
|
|
|
|
|
& afmt='csr',dupl=psb_dupl_add_)
|
|
|
|
|
if (info /= 0) then
|
|
|
|
|
call psb_errpush(4010,name,a_err='psb_spcnv csr 6')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
k = psb_sp_get_nnzeros(p%av(mld_ap_nd_))
|
|
|
|
|
call psb_sum(ictxt,k)
|
|
|
|
|
|
|
|
|
|
if (k == 0) then
|
|
|
|
|
!
|
|
|
|
|
! If the off block-diagonal part is emtpy, there is no point in doing
|
|
|
|
|
! multiple Jacobi sweeps. This is certain to happen when running
|
|
|
|
|
! on a single processor.
|
|
|
|
|
!
|
|
|
|
|
p%iprcparm(mld_smooth_sweeps_) = 1
|
|
|
|
|
end if
|
|
|
|
|
endif
|
|
|
|
|
!
|
|
|
|
|
! Compute the LU factorization.
|
|
|
|
|
!
|
|
|
|
@ -437,7 +427,7 @@ subroutine mld_dbjac_bld(a,p,upd,info,data)
|
|
|
|
|
call psb_spcnv(a,atmp,info,afmt='csr')
|
|
|
|
|
if (info == 0) call mld_sludist_bld(atmp,p%desc_data,p,info)
|
|
|
|
|
if (info /= 0) then
|
|
|
|
|
call psb_errpush(4010,name,a_err='mld_slu_bld')
|
|
|
|
|
call psb_errpush(4010,name,a_err='mld_sludist_bld')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
@ -462,34 +452,6 @@ subroutine mld_dbjac_bld(a,p,upd,info,data)
|
|
|
|
|
n_col = psb_cd_get_local_cols(p%desc_data)
|
|
|
|
|
call psb_rwextd(n_row,atmp,info,b=blck)
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! In case of multiple block-Jacobi sweeps, clip into p%av(ap_nd_)
|
|
|
|
|
! the off block-diagonal part of the local extended matrix. The
|
|
|
|
|
! clipped matrix is then stored in CSR format.
|
|
|
|
|
!
|
|
|
|
|
if (p%iprcparm(mld_smooth_sweeps_) > 1) then
|
|
|
|
|
|
|
|
|
|
call psb_sp_clip(atmp,p%av(mld_ap_nd_),info,&
|
|
|
|
|
& jmin=atmp%m+1,rscale=.false.,cscale=.false.)
|
|
|
|
|
if (info == 0) call psb_spcnv(p%av(mld_ap_nd_),info,&
|
|
|
|
|
& afmt='csr',dupl=psb_dupl_add_)
|
|
|
|
|
if (info /= 0) then
|
|
|
|
|
call psb_errpush(4010,name,a_err='psb_spcnv csr 8')
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
k = psb_sp_get_nnzeros(p%av(mld_ap_nd_))
|
|
|
|
|
call psb_sum(ictxt,k)
|
|
|
|
|
|
|
|
|
|
if (k == 0) then
|
|
|
|
|
!
|
|
|
|
|
! If the off block-diagonal part is emtpy, there is no point in doing
|
|
|
|
|
! multiple Jacobi sweeps. This is certain to happen when running
|
|
|
|
|
! on a single processor.
|
|
|
|
|
!
|
|
|
|
|
p%iprcparm(mld_smooth_sweeps_) = 1
|
|
|
|
|
end if
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
|
! Compute the LU factorization.
|
|
|
|
|
!
|
|
|
|
|