|
|
|
@ -36,7 +36,7 @@
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
subroutine mld_c_ilu_solver_apply_vect(alpha,sv,x,beta,y,desc_data,&
|
|
|
|
|
& trans,work,info,init,initu)
|
|
|
|
|
& trans,work,wv,info,init,initu)
|
|
|
|
|
|
|
|
|
|
use psb_base_mod
|
|
|
|
|
use mld_c_ilu_solver, mld_protect_name => mld_c_ilu_solver_apply_vect
|
|
|
|
@ -48,12 +48,13 @@ subroutine mld_c_ilu_solver_apply_vect(alpha,sv,x,beta,y,desc_data,&
|
|
|
|
|
complex(psb_spk_),intent(in) :: alpha,beta
|
|
|
|
|
character(len=1),intent(in) :: trans
|
|
|
|
|
complex(psb_spk_),target, intent(inout) :: work(:)
|
|
|
|
|
type(psb_c_vect_type),intent(inout) :: wv(:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
character, intent(in), optional :: init
|
|
|
|
|
type(psb_c_vect_type),intent(inout), optional :: initu
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: n_row,n_col
|
|
|
|
|
type(psb_c_vect_type) :: wv, wv1
|
|
|
|
|
type(psb_c_vect_type) :: tw, tw1
|
|
|
|
|
complex(psb_spk_), pointer :: ww(:), aux(:), tx(:),ty(:)
|
|
|
|
|
integer(psb_ipk_) :: ictxt,np,me,i, err_act
|
|
|
|
|
character :: trans_
|
|
|
|
@ -124,31 +125,31 @@ subroutine mld_c_ilu_solver_apply_vect(alpha,sv,x,beta,y,desc_data,&
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
call psb_geasb(wv,desc_data,info,mold=x%v,scratch=.true.)
|
|
|
|
|
call psb_geasb(wv1,desc_data,info,mold=x%v,scratch=.true.)
|
|
|
|
|
call psb_geasb(tw,desc_data,info,mold=x%v,scratch=.true.)
|
|
|
|
|
call psb_geasb(tw1,desc_data,info,mold=x%v,scratch=.true.)
|
|
|
|
|
|
|
|
|
|
select case(trans_)
|
|
|
|
|
case('N')
|
|
|
|
|
call psb_spsm(cone,sv%l,x,czero,wv,desc_data,info,&
|
|
|
|
|
call psb_spsm(cone,sv%l,x,czero,tw,desc_data,info,&
|
|
|
|
|
& trans=trans_,scale='L',diag=sv%dv,choice=psb_none_,work=aux)
|
|
|
|
|
|
|
|
|
|
if (info == psb_success_) call psb_spsm(alpha,sv%u,wv,beta,y,desc_data,info,&
|
|
|
|
|
if (info == psb_success_) call psb_spsm(alpha,sv%u,tw,beta,y,desc_data,info,&
|
|
|
|
|
& trans=trans_,scale='U',choice=psb_none_, work=aux)
|
|
|
|
|
|
|
|
|
|
case('T')
|
|
|
|
|
call psb_spsm(cone,sv%u,x,czero,wv,desc_data,info,&
|
|
|
|
|
call psb_spsm(cone,sv%u,x,czero,tw,desc_data,info,&
|
|
|
|
|
& trans=trans_,scale='L',diag=sv%dv,choice=psb_none_,work=aux)
|
|
|
|
|
if (info == psb_success_) call psb_spsm(alpha,sv%l,wv,beta,y,desc_data,info,&
|
|
|
|
|
if (info == psb_success_) call psb_spsm(alpha,sv%l,tw,beta,y,desc_data,info,&
|
|
|
|
|
& trans=trans_,scale='U',choice=psb_none_,work=aux)
|
|
|
|
|
|
|
|
|
|
case('C')
|
|
|
|
|
|
|
|
|
|
call psb_spsm(cone,sv%u,x,czero,wv,desc_data,info,&
|
|
|
|
|
call psb_spsm(cone,sv%u,x,czero,tw,desc_data,info,&
|
|
|
|
|
& trans=trans_,scale='U',choice=psb_none_,work=aux)
|
|
|
|
|
|
|
|
|
|
call wv1%mlt(cone,sv%dv,wv,czero,info,conjgx=trans_)
|
|
|
|
|
call tw1%mlt(cone,sv%dv,tw,czero,info,conjgx=trans_)
|
|
|
|
|
|
|
|
|
|
if (info == psb_success_) call psb_spsm(alpha,sv%l,wv1,beta,y,desc_data,info,&
|
|
|
|
|
if (info == psb_success_) call psb_spsm(alpha,sv%l,tw1,beta,y,desc_data,info,&
|
|
|
|
|
& trans=trans_,scale='U',choice=psb_none_,work=aux)
|
|
|
|
|
|
|
|
|
|
case default
|
|
|
|
@ -164,8 +165,8 @@ subroutine mld_c_ilu_solver_apply_vect(alpha,sv,x,beta,y,desc_data,&
|
|
|
|
|
& a_err='Error in subsolve')
|
|
|
|
|
goto 9999
|
|
|
|
|
endif
|
|
|
|
|
call wv%free(info)
|
|
|
|
|
call wv1%free(info)
|
|
|
|
|
call tw%free(info)
|
|
|
|
|
call tw1%free(info)
|
|
|
|
|
if (n_col <= size(work)) then
|
|
|
|
|
if ((4*n_col+n_col) <= size(work)) then
|
|
|
|
|
else
|
|
|
|
|