|
|
@ -43,11 +43,12 @@ module psb_c_bjacprec
|
|
|
|
procedure, pass(prec) :: precbld => psb_c_bjac_precbld
|
|
|
|
procedure, pass(prec) :: precbld => psb_c_bjac_precbld
|
|
|
|
procedure, pass(prec) :: precinit => psb_c_bjac_precinit
|
|
|
|
procedure, pass(prec) :: precinit => psb_c_bjac_precinit
|
|
|
|
procedure, pass(prec) :: precseti => psb_c_bjac_precseti
|
|
|
|
procedure, pass(prec) :: precseti => psb_c_bjac_precseti
|
|
|
|
procedure, pass(prec) :: precsetr => psb_c_bjac_precsetr
|
|
|
|
!!$ procedure, pass(prec) :: precsetr => psb_c_bjac_precsetr
|
|
|
|
procedure, pass(prec) :: precsetc => psb_c_bjac_precsetc
|
|
|
|
!!$ procedure, pass(prec) :: precsetc => psb_c_bjac_precsetc
|
|
|
|
procedure, pass(prec) :: precfree => psb_c_bjac_precfree
|
|
|
|
procedure, pass(prec) :: precfree => psb_c_bjac_precfree
|
|
|
|
procedure, pass(prec) :: precdescr => psb_c_bjac_precdescr
|
|
|
|
procedure, pass(prec) :: precdescr => psb_c_bjac_precdescr
|
|
|
|
procedure, pass(prec) :: dump => psb_c_bjac_dump
|
|
|
|
procedure, pass(prec) :: dump => psb_c_bjac_dump
|
|
|
|
|
|
|
|
procedure, pass(prec) :: clone => psb_c_bjac_clone
|
|
|
|
procedure, pass(prec) :: sizeof => psb_c_bjac_sizeof
|
|
|
|
procedure, pass(prec) :: sizeof => psb_c_bjac_sizeof
|
|
|
|
procedure, pass(prec) :: get_nzeros => psb_c_bjac_get_nzeros
|
|
|
|
procedure, pass(prec) :: get_nzeros => psb_c_bjac_get_nzeros
|
|
|
|
end type psb_c_bjac_prec_type
|
|
|
|
end type psb_c_bjac_prec_type
|
|
|
@ -210,48 +211,33 @@ contains
|
|
|
|
end function psb_c_bjac_get_nzeros
|
|
|
|
end function psb_c_bjac_get_nzeros
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_bjac_precsetr(prec,what,val,info)
|
|
|
|
subroutine psb_c_bjac_precfree(prec,info)
|
|
|
|
|
|
|
|
|
|
|
|
Implicit None
|
|
|
|
Implicit None
|
|
|
|
|
|
|
|
|
|
|
|
class(psb_c_bjac_prec_type),intent(inout) :: prec
|
|
|
|
class(psb_c_bjac_prec_type), intent(inout) :: prec
|
|
|
|
integer(psb_ipk_), intent(in) :: what
|
|
|
|
|
|
|
|
real(psb_spk_), intent(in) :: val
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_) :: err_act, nrow
|
|
|
|
|
|
|
|
character(len=20) :: name='c_bjac_precset'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
info = psb_success_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
integer(psb_ipk_) :: err_act, i
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
character(len=20) :: name='c_bjac_precfree'
|
|
|
|
if (err_act == psb_act_abort_) then
|
|
|
|
|
|
|
|
call psb_error()
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end subroutine psb_c_bjac_precsetr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_bjac_precsetc(prec,what,val,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Implicit None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class(psb_c_bjac_prec_type),intent(inout) :: prec
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(in) :: what
|
|
|
|
|
|
|
|
character(len=*), intent(in) :: val
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: err_act, nrow
|
|
|
|
|
|
|
|
character(len=20) :: name='c_bjac_precset'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
info = psb_success_
|
|
|
|
info = psb_success_
|
|
|
|
|
|
|
|
if (allocated(prec%av)) then
|
|
|
|
|
|
|
|
do i=1,size(prec%av)
|
|
|
|
|
|
|
|
call prec%av(i)%free()
|
|
|
|
|
|
|
|
enddo
|
|
|
|
|
|
|
|
deallocate(prec%av,stat=info)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (allocated(prec%dv)) then
|
|
|
|
|
|
|
|
call prec%dv%free(info)
|
|
|
|
|
|
|
|
if (info == 0) deallocate(prec%dv,stat=info)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (allocated(prec%iprcparm)) then
|
|
|
|
|
|
|
|
deallocate(prec%iprcparm,stat=info)
|
|
|
|
|
|
|
|
end if
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
@ -262,35 +248,49 @@ contains
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end subroutine psb_c_bjac_precsetc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_bjac_precfree(prec,info)
|
|
|
|
end subroutine psb_c_bjac_precfree
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_bjac_clone(prec,precout,info)
|
|
|
|
|
|
|
|
use psb_error_mod
|
|
|
|
|
|
|
|
use psb_realloc_mod
|
|
|
|
Implicit None
|
|
|
|
Implicit None
|
|
|
|
|
|
|
|
|
|
|
|
class(psb_c_bjac_prec_type), intent(inout) :: prec
|
|
|
|
class(psb_c_bjac_prec_type), intent(inout) :: prec
|
|
|
|
|
|
|
|
class(psb_c_base_prec_type), allocatable, intent(out) :: precout
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: err_act, i
|
|
|
|
integer(psb_ipk_) :: err_act, i
|
|
|
|
character(len=20) :: name='c_bjac_precfree'
|
|
|
|
character(len=20) :: name='c_bjac_clone'
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
info = psb_success_
|
|
|
|
info = psb_success_
|
|
|
|
|
|
|
|
allocate(psb_c_bjac_prec_type :: precout, stat=info)
|
|
|
|
|
|
|
|
if (info /= 0) goto 9999
|
|
|
|
|
|
|
|
select type(pout => precout)
|
|
|
|
|
|
|
|
type is (psb_c_bjac_prec_type)
|
|
|
|
|
|
|
|
call pout%set_ctxt(prec%get_ctxt())
|
|
|
|
|
|
|
|
|
|
|
|
if (allocated(prec%av)) then
|
|
|
|
if (allocated(prec%av)) then
|
|
|
|
|
|
|
|
allocate(pout%av(size(prec%av)),stat=info)
|
|
|
|
do i=1,size(prec%av)
|
|
|
|
do i=1,size(prec%av)
|
|
|
|
call prec%av(i)%free()
|
|
|
|
if (info /= psb_success_) exit
|
|
|
|
|
|
|
|
call prec%av(i)%clone(pout%av(i),info)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
deallocate(prec%av,stat=info)
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if (allocated(prec%dv)) then
|
|
|
|
if (allocated(prec%dv)) then
|
|
|
|
call prec%dv%free(info)
|
|
|
|
allocate(pout%dv,stat=info)
|
|
|
|
if (info == 0) deallocate(prec%dv,stat=info)
|
|
|
|
if (info == 0) call prec%dv%clone(pout%dv,info)
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (allocated(prec%iprcparm)) then
|
|
|
|
|
|
|
|
deallocate(prec%iprcparm,stat=info)
|
|
|
|
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
class default
|
|
|
|
|
|
|
|
info = psb_err_internal_error_
|
|
|
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
if (info /= 0) goto 9999
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
@ -302,6 +302,6 @@ contains
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine psb_c_bjac_precfree
|
|
|
|
end subroutine psb_c_bjac_clone
|
|
|
|
|
|
|
|
|
|
|
|
end module psb_c_bjacprec
|
|
|
|
end module psb_c_bjacprec
|
|
|
|