|
|
|
@ -562,21 +562,24 @@ contains
|
|
|
|
|
|
|
|
|
|
subroutine i_vect_cnv(x,mold)
|
|
|
|
|
class(psb_i_vect_type), intent(inout) :: x
|
|
|
|
|
class(psb_i_base_vect_type), intent(in) :: mold
|
|
|
|
|
class(psb_i_base_vect_type), intent(in), optional :: mold
|
|
|
|
|
class(psb_i_base_vect_type), allocatable :: tmp
|
|
|
|
|
integer(psb_ipk_) :: info
|
|
|
|
|
|
|
|
|
|
if (.not.allocated(x%v)) return
|
|
|
|
|
|
|
|
|
|
if (present(mold)) then
|
|
|
|
|
#ifdef HAVE_MOLD
|
|
|
|
|
allocate(tmp,stat=info,mold=mold)
|
|
|
|
|
#else
|
|
|
|
|
call mold%mold(tmp,info)
|
|
|
|
|
#endif
|
|
|
|
|
if (allocated(x%v)) then
|
|
|
|
|
call x%v%sync()
|
|
|
|
|
if (info == psb_success_) call tmp%bld(x%v%v)
|
|
|
|
|
call x%v%free(info)
|
|
|
|
|
end if
|
|
|
|
|
call move_alloc(tmp,x%v)
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
end subroutine i_vect_cnv
|
|
|
|
|
|
|
|
|
|
end module psb_i_vect_mod
|
|
|
|
|