|
|
|
|
@ -58,7 +58,7 @@ module psb_c_vect_mod
|
|
|
|
|
procedure, pass(x) :: is_remote_build => c_vect_is_remote_build
|
|
|
|
|
procedure, pass(x) :: set_remote_build => c_vect_set_remote_build
|
|
|
|
|
procedure, pass(x) :: get_dupl => c_vect_get_dupl
|
|
|
|
|
procedure, pass(x) :: set_dupl => c_vect_set_dupl
|
|
|
|
|
procedure, pass(x) :: set_dupl => c_vect_set_dupl
|
|
|
|
|
procedure, pass(x) :: get_nrmv => c_vect_get_nrmv
|
|
|
|
|
procedure, pass(x) :: set_nrmv => c_vect_set_nrmv
|
|
|
|
|
procedure, pass(x) :: all => c_vect_all
|
|
|
|
|
@ -129,7 +129,10 @@ module psb_c_vect_mod
|
|
|
|
|
procedure, pass(y) :: inv_a2 => c_vect_inv_a2
|
|
|
|
|
procedure, pass(y) :: inv_a2_check => c_vect_inv_a2_check
|
|
|
|
|
generic, public :: inv => inv_v, inv_v_check, inv_a2, inv_a2_check
|
|
|
|
|
procedure, pass(x) :: scal => c_vect_scal
|
|
|
|
|
procedure, pass(x) :: scal_v => c_vect_scal
|
|
|
|
|
procedure, pass(z) :: scal_v2 => c_vect_scal_v2
|
|
|
|
|
procedure, pass(z) :: scal_a2 => c_vect_scal_a2
|
|
|
|
|
generic, public :: scal => scal_v, scal_v2, scal_a2
|
|
|
|
|
procedure, pass(x) :: absval1 => c_vect_absval1
|
|
|
|
|
procedure, pass(x) :: absval2 => c_vect_absval2
|
|
|
|
|
generic, public :: absval => absval1, absval2
|
|
|
|
|
@ -222,7 +225,7 @@ contains
|
|
|
|
|
|
|
|
|
|
x%nrmv = val
|
|
|
|
|
end subroutine c_vect_set_nrmv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function c_vect_is_remote_build(x) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
@ -242,7 +245,7 @@ contains
|
|
|
|
|
x%remote_build = psb_matbld_remote_
|
|
|
|
|
end if
|
|
|
|
|
end subroutine c_vect_set_remote_build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_set_vect_default(v)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_base_vect_type), intent(in) :: v
|
|
|
|
|
@ -403,7 +406,7 @@ contains
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
info = psb_err_alloc_dealloc_
|
|
|
|
|
|
|
|
|
|
if( allocated(y%v) ) &
|
|
|
|
|
if( allocated(y%v) ) &
|
|
|
|
|
& call y%v%copy_to_real(x%v,info)
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
@ -415,7 +418,7 @@ contains
|
|
|
|
|
class(psb_s_vect_type), intent(inout) :: x
|
|
|
|
|
class(psb_c_vect_type), intent(inout) :: y
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
integer(psb_ipk_) :: err_act
|
|
|
|
|
character(len=20) :: name='vec_to_real'
|
|
|
|
|
@ -423,11 +426,11 @@ contains
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
info = psb_err_alloc_dealloc_
|
|
|
|
|
|
|
|
|
|
if( allocated(y%v) ) &
|
|
|
|
|
if( allocated(y%v) ) &
|
|
|
|
|
& call y%v%copy_from_real(x%v,info)
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine c_vect_copy_from_real
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -641,7 +644,7 @@ contains
|
|
|
|
|
allocate(tmp,stat=info,mold=psb_c_get_base_vect_default())
|
|
|
|
|
end if
|
|
|
|
|
if (allocated(x%v)) then
|
|
|
|
|
if (allocated(x%v%v)) then
|
|
|
|
|
if (allocated(x%v%v)) then
|
|
|
|
|
call x%v%sync()
|
|
|
|
|
if (info == psb_success_) call tmp%bld(x%v%v)
|
|
|
|
|
call x%v%free(info)
|
|
|
|
|
@ -1105,6 +1108,34 @@ contains
|
|
|
|
|
|
|
|
|
|
end subroutine c_vect_scal
|
|
|
|
|
|
|
|
|
|
subroutine c_vect_scal_a2(x,c,z,info)
|
|
|
|
|
use psi_serial_mod
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_spk_), intent(in) :: c
|
|
|
|
|
complex(psb_spk_), intent(inout) :: x(:)
|
|
|
|
|
class(psb_c_vect_type), intent(inout) :: z
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
info = 0
|
|
|
|
|
if (allocated(z%v)) &
|
|
|
|
|
& call z%scal(x,c,info)
|
|
|
|
|
|
|
|
|
|
end subroutine c_vect_scal_a2
|
|
|
|
|
|
|
|
|
|
subroutine c_vect_scal_v2(x,c,z,info)
|
|
|
|
|
use psi_serial_mod
|
|
|
|
|
implicit none
|
|
|
|
|
real(psb_spk_), intent(in) :: c
|
|
|
|
|
class(psb_c_vect_type), intent(inout) :: x
|
|
|
|
|
class(psb_c_vect_type), intent(inout) :: z
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
info = 0
|
|
|
|
|
if (allocated(x%v).and.allocated(z%v)) &
|
|
|
|
|
& call z%v%scal(x%v,c,info)
|
|
|
|
|
|
|
|
|
|
end subroutine c_vect_scal_v2
|
|
|
|
|
|
|
|
|
|
subroutine c_vect_absval1(x)
|
|
|
|
|
class(psb_c_vect_type), intent(inout) :: x
|
|
|
|
|
|
|
|
|
|
@ -1198,7 +1229,7 @@ contains
|
|
|
|
|
! Temp vectors
|
|
|
|
|
type(psb_c_vect_type) :: wtemp
|
|
|
|
|
|
|
|
|
|
info = 0
|
|
|
|
|
info = 0
|
|
|
|
|
if( allocated(w%v) ) then
|
|
|
|
|
if (.not.present(aux)) then
|
|
|
|
|
allocate(wtemp%v, mold=w%v)
|
|
|
|
|
@ -1390,7 +1421,7 @@ module psb_c_multivect_mod
|
|
|
|
|
|
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function c_mvect_get_dupl(x) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
class(psb_c_multivect_type), intent(in) :: x
|
|
|
|
|
@ -1409,7 +1440,7 @@ contains
|
|
|
|
|
x%dupl = psb_dupl_def_
|
|
|
|
|
end if
|
|
|
|
|
end subroutine c_mvect_set_dupl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function c_mvect_is_remote_build(x) result(res)
|
|
|
|
|
implicit none
|
|
|
|
|
@ -1429,7 +1460,7 @@ contains
|
|
|
|
|
x%remote_build = psb_matbld_remote_
|
|
|
|
|
end if
|
|
|
|
|
end subroutine c_mvect_set_remote_build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_set_multivect_default(v)
|
|
|
|
|
implicit none
|
|
|
|
|
|