|
|
|
@ -70,60 +70,14 @@ subroutine mld_c_bwgs_solver_bld(a,desc_a,sv,info,b,amold,vmold,imold)
|
|
|
|
|
|
|
|
|
|
nrow_a = a%get_nrows()
|
|
|
|
|
nztota = a%get_nzeros()
|
|
|
|
|
!!$ if (present(b)) then
|
|
|
|
|
!!$ nztota = nztota + b%get_nzeros()
|
|
|
|
|
!!$ end if
|
|
|
|
|
|
|
|
|
|
if (sv%eps <= dzero) then
|
|
|
|
|
!
|
|
|
|
|
! This cuts out the off-diagonal part, because it's supposed to
|
|
|
|
|
! be handled by the outer Jacobi smoother.
|
|
|
|
|
!
|
|
|
|
|
call a%tril(sv%l,info,diag=-ione,jmax=nrow_a,u=sv%u)
|
|
|
|
|
!
|
|
|
|
|
! Is this an L1-GS solver?
|
|
|
|
|
!
|
|
|
|
|
if (allocated(sv%xtra)) then
|
|
|
|
|
block
|
|
|
|
|
integer(psb_ipk_) :: k, nz, nrm
|
|
|
|
|
type(psb_c_coo_sparse_mat) :: tcoo
|
|
|
|
|
!
|
|
|
|
|
! For BWGS: LX = L - D, UX = U + D
|
|
|
|
|
!
|
|
|
|
|
call sv%l%mv_to(tcoo)
|
|
|
|
|
nrm = min(psb_size(sv%xtra),tcoo%get_nrows(),tcoo%get_ncols())
|
|
|
|
|
nz = tcoo%get_nzeros()
|
|
|
|
|
call tcoo%ensure_size(nz+nrm)
|
|
|
|
|
call tcoo%set_dupl(psb_dupl_add_)
|
|
|
|
|
do k=1,nrm
|
|
|
|
|
if (sv%xtra(k) /= szero) then
|
|
|
|
|
nz = nz + 1
|
|
|
|
|
tcoo%ia(nz) = k
|
|
|
|
|
tcoo%ja(nz) = k
|
|
|
|
|
tcoo%val(nz) = -sv%xtra(k)
|
|
|
|
|
end if
|
|
|
|
|
end do
|
|
|
|
|
call tcoo%set_nzeros(nz)
|
|
|
|
|
call tcoo%fix(info)
|
|
|
|
|
call sv%l%mv_from(tcoo)
|
|
|
|
|
|
|
|
|
|
call sv%u%mv_to(tcoo)
|
|
|
|
|
nrm = min(psb_size(sv%xtra),tcoo%get_nrows(),tcoo%get_ncols())
|
|
|
|
|
nz = tcoo%get_nzeros()
|
|
|
|
|
call tcoo%ensure_size(nz+nrm)
|
|
|
|
|
call tcoo%set_dupl(psb_dupl_add_)
|
|
|
|
|
do k=1,nrm
|
|
|
|
|
if (sv%xtra(k) /= szero) then
|
|
|
|
|
nz = nz + 1
|
|
|
|
|
tcoo%ia(nz) = k
|
|
|
|
|
tcoo%ja(nz) = k
|
|
|
|
|
tcoo%val(nz) = sv%xtra(k)
|
|
|
|
|
end if
|
|
|
|
|
end do
|
|
|
|
|
call tcoo%set_nzeros(nz)
|
|
|
|
|
call tcoo%fix(info)
|
|
|
|
|
call sv%u%mv_from(tcoo)
|
|
|
|
|
end block
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
info = psb_err_missing_override_method_
|
|
|
|
|