mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-20 21:02:35 +00:00
mld2p4-2:
mlprec/impl/smoother/mld_d_jac_smoother_apply_vect.f90 mlprec/impl/solver/mld_d_gs_solver_apply_vect.f90 GS apply, seems to be working now. To be further tested.
This commit is contained in:
@@ -107,17 +107,21 @@ subroutine mld_d_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
|
||||
end if
|
||||
endif
|
||||
|
||||
if ((sweeps == 1).or.(sm%nnz_nd_tot==0)) then
|
||||
|
||||
call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,info)
|
||||
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_internal_error_,&
|
||||
& name,a_err='Error in sub_aply Jacobi Sweeps = 1')
|
||||
goto 9999
|
||||
endif
|
||||
|
||||
else if (sweeps > 1) then
|
||||
!!$ write(0,*) 'Jacobi smoother with ',sweeps
|
||||
|
||||
!!$ if (sweeps == 1) then
|
||||
!!$
|
||||
!!$ call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,info)
|
||||
!!$
|
||||
!!$ if (info /= psb_success_) then
|
||||
!!$ call psb_errpush(psb_err_internal_error_,&
|
||||
!!$ & name,a_err='Error in sub_aply Jacobi Sweeps = 1')
|
||||
!!$ goto 9999
|
||||
!!$ endif
|
||||
!!$
|
||||
!!$ else if (sweeps > 1) then
|
||||
! Note: I had to take out the ==1 optimization for the sake of GS.
|
||||
if (sweeps >= 1) then
|
||||
|
||||
!
|
||||
!
|
||||
|
||||
@@ -53,12 +53,14 @@ subroutine mld_d_gs_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,inf
|
||||
integer(psb_ipk_) :: n_row,n_col, itx
|
||||
type(psb_d_vect_type) :: wv, xit
|
||||
real(psb_dpk_), pointer :: ww(:), aux(:), tx(:),ty(:)
|
||||
real(psb_dpk_), allocatable :: temp(:)
|
||||
integer(psb_ipk_) :: ictxt,np,me,i, err_act
|
||||
character :: trans_
|
||||
character(len=20) :: name='d_gs_solver_apply'
|
||||
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
ictxt = desc_data%get_ctxt()
|
||||
call psb_info(ictxt,me,np)
|
||||
info = psb_success_
|
||||
|
||||
trans_ = psb_toupper(trans)
|
||||
@@ -124,7 +126,7 @@ subroutine mld_d_gs_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,inf
|
||||
! current JAC smoother loop. A good solution would be to have a separate
|
||||
! input argument as the initial guess
|
||||
!
|
||||
|
||||
!!$ write(0,*) 'GS Iteration with ',sv%sweeps
|
||||
call psb_geaxpby(done,y,dzero,xit,desc_data,info)
|
||||
do itx=1,sv%sweeps
|
||||
call psb_geaxpby(done,x,dzero,wv,desc_data,info)
|
||||
@@ -132,6 +134,8 @@ subroutine mld_d_gs_solver_apply_vect(alpha,sv,x,beta,y,desc_data,trans,work,inf
|
||||
! from the Jacobi smoother, hence this is purely local.
|
||||
call psb_spmm(-done,sv%u,xit,done,wv,desc_data,info,doswap=.false.)
|
||||
call psb_spsm(done,sv%l,wv,dzero,xit,desc_data,info)
|
||||
!!$ temp = xit%get_vect()
|
||||
!!$ write(0,*) me,'GS Iteration ',itx,':',temp(1:n_row)
|
||||
end do
|
||||
|
||||
call psb_geaxpby(alpha,xit,beta,y,desc_data,info)
|
||||
|
||||
Reference in New Issue
Block a user