|
|
|
@ -45,7 +45,7 @@
|
|
|
|
|
! tran - character(optional). ???.
|
|
|
|
|
! mode - integer(optional).
|
|
|
|
|
!
|
|
|
|
|
subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode)
|
|
|
|
|
subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
|
|
|
|
|
use psb_descriptor_type
|
|
|
|
|
use psb_const_mod
|
|
|
|
|
use psi_mod
|
|
|
|
@ -60,13 +60,13 @@ subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode)
|
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
complex(kind(1.d0)), intent(in), optional :: alpha
|
|
|
|
|
complex(kind(1.d0)), optional, target :: work(:)
|
|
|
|
|
integer, intent(in), optional :: mode,jx,ik
|
|
|
|
|
integer, intent(in), optional :: mode,jx,ik,data
|
|
|
|
|
character, intent(in), optional :: tran
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
|
integer :: ictxt, np, me, &
|
|
|
|
|
& err_act, m, n, iix, jjx, ix, ijx, k, maxk, nrow, imode, i,&
|
|
|
|
|
& err, liwork
|
|
|
|
|
& err, liwork,data_
|
|
|
|
|
complex(kind(1.d0)),pointer :: iwork(:), xp(:,:)
|
|
|
|
|
character :: ltran
|
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
@ -121,6 +121,12 @@ subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode)
|
|
|
|
|
imode = IOR(psb_swap_send_,psb_swap_recv_)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if (present(data)) then
|
|
|
|
|
data_ = data
|
|
|
|
|
else
|
|
|
|
|
data_ = psb_comm_halo_
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
! check vector correctness
|
|
|
|
|
call psb_chkvect(m,1,size(x,1),ix,ijx,desc_a,info,iix,jjx)
|
|
|
|
|
if(info.ne.0) then
|
|
|
|
@ -177,7 +183,7 @@ subroutine psb_zhalom(x,desc_a,info,alpha,jx,ik,work,tran,mode)
|
|
|
|
|
xp => x(iix:size(x,1),jjx:jjx+k-1)
|
|
|
|
|
if(ltran.eq.'N') then
|
|
|
|
|
call psi_swapdata(imode,k,zzero,xp,&
|
|
|
|
|
& desc_a,iwork,info,data=psb_comm_halo_)
|
|
|
|
|
& desc_a,iwork,info,data=data_)
|
|
|
|
|
else if((ltran.eq.'T').or.(ltran.eq.'H')) then
|
|
|
|
|
call psi_swaptran(imode,k,zone,xp,&
|
|
|
|
|
&desc_a,iwork,info)
|
|
|
|
@ -252,7 +258,7 @@ end subroutine psb_zhalom
|
|
|
|
|
! tran - character(optional). ???.
|
|
|
|
|
! mode - integer(optional).
|
|
|
|
|
!
|
|
|
|
|
subroutine psb_zhalov(x,desc_a,info,alpha,work,tran,mode)
|
|
|
|
|
subroutine psb_zhalov(x,desc_a,info,alpha,work,tran,mode,data)
|
|
|
|
|
use psb_descriptor_type
|
|
|
|
|
use psb_const_mod
|
|
|
|
|
use psi_mod
|
|
|
|
@ -267,12 +273,12 @@ subroutine psb_zhalov(x,desc_a,info,alpha,work,tran,mode)
|
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
complex(kind(1.d0)), intent(in), optional :: alpha
|
|
|
|
|
complex(kind(1.d0)), target, optional :: work(:)
|
|
|
|
|
integer, intent(in), optional :: mode
|
|
|
|
|
integer, intent(in), optional :: mode,data
|
|
|
|
|
character, intent(in), optional :: tran
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
|
integer :: ictxt, np, me, err_act, &
|
|
|
|
|
& m, n, iix, jjx, ix, ijx, nrow, imode, err, liwork
|
|
|
|
|
& m, n, iix, jjx, ix, ijx, nrow, imode, err, liwork,data_
|
|
|
|
|
complex(kind(1.d0)),pointer :: iwork(:)
|
|
|
|
|
character :: ltran
|
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
@ -311,6 +317,12 @@ subroutine psb_zhalov(x,desc_a,info,alpha,work,tran,mode)
|
|
|
|
|
imode = IOR(psb_swap_send_,psb_swap_recv_)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if (present(data)) then
|
|
|
|
|
data_ = data
|
|
|
|
|
else
|
|
|
|
|
data_ = psb_comm_halo_
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
! check vector correctness
|
|
|
|
|
call psb_chkvect(m,1,size(x,1),ix,ijx,desc_a,info,iix,jjx)
|
|
|
|
|
if(info.ne.0) then
|
|
|
|
@ -363,7 +375,7 @@ subroutine psb_zhalov(x,desc_a,info,alpha,work,tran,mode)
|
|
|
|
|
! exchange halo elements
|
|
|
|
|
if(ltran.eq.'N') then
|
|
|
|
|
call psi_swapdata(imode,zzero,x(iix:size(x)),&
|
|
|
|
|
& desc_a,iwork,info,data=psb_comm_halo_)
|
|
|
|
|
& desc_a,iwork,info,data=data_)
|
|
|
|
|
else if((ltran.eq.'T').or.(ltran.eq.'H')) then
|
|
|
|
|
call psi_swaptran(imode,zone,x(iix:size(x)),&
|
|
|
|
|
& desc_a,iwork,info)
|
|
|
|
|