|
|
|
@ -49,6 +49,7 @@ module psb_c_prec_type
|
|
|
|
& psb_c_apply1_vect, psb_c_apply2_vect
|
|
|
|
& psb_c_apply1_vect, psb_c_apply2_vect
|
|
|
|
procedure, pass(prec) :: sizeof => psb_cprec_sizeof
|
|
|
|
procedure, pass(prec) :: sizeof => psb_cprec_sizeof
|
|
|
|
procedure, pass(prec) :: clone => psb_c_prec_clone
|
|
|
|
procedure, pass(prec) :: clone => psb_c_prec_clone
|
|
|
|
|
|
|
|
procedure, pass(prec) :: free => psb_c_prec_free
|
|
|
|
end type psb_cprec_type
|
|
|
|
end type psb_cprec_type
|
|
|
|
|
|
|
|
|
|
|
|
interface psb_precfree
|
|
|
|
interface psb_precfree
|
|
|
|
@ -171,11 +172,37 @@ contains
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
me=-1
|
|
|
|
me=-1
|
|
|
|
|
|
|
|
call p%free(info)
|
|
|
|
|
|
|
|
|
|
|
|
if (allocated(p%prec)) then
|
|
|
|
if (info /= 0) goto 9999
|
|
|
|
call p%prec%precfree(info)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
if (err_act == psb_act_abort_) then
|
|
|
|
|
|
|
|
call psb_error()
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end subroutine psb_c_precfree
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psb_c_prec_free(prec,info)
|
|
|
|
|
|
|
|
class(psb_cprec_type), intent(inout) :: prec
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: me, err_act,i
|
|
|
|
|
|
|
|
character(len=20) :: name
|
|
|
|
|
|
|
|
if(psb_get_errstatus() /= 0) return
|
|
|
|
|
|
|
|
info=psb_success_
|
|
|
|
|
|
|
|
name = 'psb_precfree'
|
|
|
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
me=-1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (allocated(prec%prec)) then
|
|
|
|
|
|
|
|
call prec%prec%free(info)
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
deallocate(p%prec,stat=info)
|
|
|
|
deallocate(prec%prec,stat=info)
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
if (info /= psb_success_) goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
@ -188,7 +215,7 @@ contains
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end subroutine psb_c_precfree
|
|
|
|
end subroutine psb_c_prec_free
|
|
|
|
|
|
|
|
|
|
|
|
function psb_cprec_sizeof(prec) result(val)
|
|
|
|
function psb_cprec_sizeof(prec) result(val)
|
|
|
|
class(psb_cprec_type), intent(in) :: prec
|
|
|
|
class(psb_cprec_type), intent(in) :: prec
|
|
|
|
|