mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 22:55:12 +00:00
Adjustments for new wrk methods in psblas%prec
This commit is contained in:
@@ -113,6 +113,7 @@ module mld_c_prec_type
|
||||
procedure, pass(prec) :: free => mld_c_prec_free
|
||||
procedure, pass(prec) :: allocate_wrk => mld_c_allocate_wrk
|
||||
procedure, pass(prec) :: free_wrk => mld_c_free_wrk
|
||||
procedure, pass(prec) :: is_allocated_wrk => mld_c_is_allocated_wrk
|
||||
procedure, pass(prec) :: get_complexity => mld_c_get_compl
|
||||
procedure, pass(prec) :: cmp_complexity => mld_c_cmp_compl
|
||||
procedure, pass(prec) :: get_avg_cr => mld_c_get_avg_cr
|
||||
@@ -860,7 +861,7 @@ contains
|
||||
end if
|
||||
end subroutine c_prec_move_alloc
|
||||
|
||||
subroutine mld_c_allocate_wrk(prec,info,vmold)
|
||||
subroutine mld_c_allocate_wrk(prec,info,vmold,desc)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
@@ -868,7 +869,12 @@ contains
|
||||
class(mld_cprec_type), intent(inout) :: prec
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
class(psb_c_base_vect_type), intent(in), optional :: vmold
|
||||
|
||||
!
|
||||
! In MLD the DESC optional argument is ignored, since
|
||||
! the necessary info is contained in the various entries of the
|
||||
! PRECV component.
|
||||
type(psb_desc_type), intent(in), optional :: desc
|
||||
|
||||
! Local variables
|
||||
integer(psb_ipk_) :: me,err_act,i,j,level,nlev, nc2l
|
||||
character(len=20) :: name
|
||||
@@ -900,8 +906,6 @@ contains
|
||||
|
||||
end subroutine mld_c_allocate_wrk
|
||||
|
||||
|
||||
|
||||
subroutine mld_c_free_wrk(prec,info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
@@ -936,4 +940,18 @@ contains
|
||||
|
||||
end subroutine mld_c_free_wrk
|
||||
|
||||
function mld_c_is_allocated_wrk(prec) result(res)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
class(mld_cprec_type), intent(in) :: prec
|
||||
logical :: res
|
||||
|
||||
res = .false.
|
||||
if (.not.allocated(prec%precv)) return
|
||||
res = allocated(prec%precv(1)%wrk)
|
||||
|
||||
end function mld_c_is_allocated_wrk
|
||||
|
||||
end module mld_c_prec_type
|
||||
|
||||
@@ -113,6 +113,7 @@ module mld_d_prec_type
|
||||
procedure, pass(prec) :: free => mld_d_prec_free
|
||||
procedure, pass(prec) :: allocate_wrk => mld_d_allocate_wrk
|
||||
procedure, pass(prec) :: free_wrk => mld_d_free_wrk
|
||||
procedure, pass(prec) :: is_allocated_wrk => mld_d_is_allocated_wrk
|
||||
procedure, pass(prec) :: get_complexity => mld_d_get_compl
|
||||
procedure, pass(prec) :: cmp_complexity => mld_d_cmp_compl
|
||||
procedure, pass(prec) :: get_avg_cr => mld_d_get_avg_cr
|
||||
@@ -860,7 +861,7 @@ contains
|
||||
end if
|
||||
end subroutine d_prec_move_alloc
|
||||
|
||||
subroutine mld_d_allocate_wrk(prec,info,vmold)
|
||||
subroutine mld_d_allocate_wrk(prec,info,vmold,desc)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
@@ -868,7 +869,12 @@ contains
|
||||
class(mld_dprec_type), intent(inout) :: prec
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
class(psb_d_base_vect_type), intent(in), optional :: vmold
|
||||
|
||||
!
|
||||
! In MLD the DESC optional argument is ignored, since
|
||||
! the necessary info is contained in the various entries of the
|
||||
! PRECV component.
|
||||
type(psb_desc_type), intent(in), optional :: desc
|
||||
|
||||
! Local variables
|
||||
integer(psb_ipk_) :: me,err_act,i,j,level,nlev, nc2l
|
||||
character(len=20) :: name
|
||||
@@ -900,8 +906,6 @@ contains
|
||||
|
||||
end subroutine mld_d_allocate_wrk
|
||||
|
||||
|
||||
|
||||
subroutine mld_d_free_wrk(prec,info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
@@ -936,4 +940,18 @@ contains
|
||||
|
||||
end subroutine mld_d_free_wrk
|
||||
|
||||
function mld_d_is_allocated_wrk(prec) result(res)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
class(mld_dprec_type), intent(in) :: prec
|
||||
logical :: res
|
||||
|
||||
res = .false.
|
||||
if (.not.allocated(prec%precv)) return
|
||||
res = allocated(prec%precv(1)%wrk)
|
||||
|
||||
end function mld_d_is_allocated_wrk
|
||||
|
||||
end module mld_d_prec_type
|
||||
|
||||
@@ -113,6 +113,7 @@ module mld_s_prec_type
|
||||
procedure, pass(prec) :: free => mld_s_prec_free
|
||||
procedure, pass(prec) :: allocate_wrk => mld_s_allocate_wrk
|
||||
procedure, pass(prec) :: free_wrk => mld_s_free_wrk
|
||||
procedure, pass(prec) :: is_allocated_wrk => mld_s_is_allocated_wrk
|
||||
procedure, pass(prec) :: get_complexity => mld_s_get_compl
|
||||
procedure, pass(prec) :: cmp_complexity => mld_s_cmp_compl
|
||||
procedure, pass(prec) :: get_avg_cr => mld_s_get_avg_cr
|
||||
@@ -860,7 +861,7 @@ contains
|
||||
end if
|
||||
end subroutine s_prec_move_alloc
|
||||
|
||||
subroutine mld_s_allocate_wrk(prec,info,vmold)
|
||||
subroutine mld_s_allocate_wrk(prec,info,vmold,desc)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
@@ -868,7 +869,12 @@ contains
|
||||
class(mld_sprec_type), intent(inout) :: prec
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
class(psb_s_base_vect_type), intent(in), optional :: vmold
|
||||
|
||||
!
|
||||
! In MLD the DESC optional argument is ignored, since
|
||||
! the necessary info is contained in the various entries of the
|
||||
! PRECV component.
|
||||
type(psb_desc_type), intent(in), optional :: desc
|
||||
|
||||
! Local variables
|
||||
integer(psb_ipk_) :: me,err_act,i,j,level,nlev, nc2l
|
||||
character(len=20) :: name
|
||||
@@ -900,8 +906,6 @@ contains
|
||||
|
||||
end subroutine mld_s_allocate_wrk
|
||||
|
||||
|
||||
|
||||
subroutine mld_s_free_wrk(prec,info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
@@ -936,4 +940,18 @@ contains
|
||||
|
||||
end subroutine mld_s_free_wrk
|
||||
|
||||
function mld_s_is_allocated_wrk(prec) result(res)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
class(mld_sprec_type), intent(in) :: prec
|
||||
logical :: res
|
||||
|
||||
res = .false.
|
||||
if (.not.allocated(prec%precv)) return
|
||||
res = allocated(prec%precv(1)%wrk)
|
||||
|
||||
end function mld_s_is_allocated_wrk
|
||||
|
||||
end module mld_s_prec_type
|
||||
|
||||
@@ -113,6 +113,7 @@ module mld_z_prec_type
|
||||
procedure, pass(prec) :: free => mld_z_prec_free
|
||||
procedure, pass(prec) :: allocate_wrk => mld_z_allocate_wrk
|
||||
procedure, pass(prec) :: free_wrk => mld_z_free_wrk
|
||||
procedure, pass(prec) :: is_allocated_wrk => mld_z_is_allocated_wrk
|
||||
procedure, pass(prec) :: get_complexity => mld_z_get_compl
|
||||
procedure, pass(prec) :: cmp_complexity => mld_z_cmp_compl
|
||||
procedure, pass(prec) :: get_avg_cr => mld_z_get_avg_cr
|
||||
@@ -860,7 +861,7 @@ contains
|
||||
end if
|
||||
end subroutine z_prec_move_alloc
|
||||
|
||||
subroutine mld_z_allocate_wrk(prec,info,vmold)
|
||||
subroutine mld_z_allocate_wrk(prec,info,vmold,desc)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
@@ -868,7 +869,12 @@ contains
|
||||
class(mld_zprec_type), intent(inout) :: prec
|
||||
integer(psb_ipk_), intent(out) :: info
|
||||
class(psb_z_base_vect_type), intent(in), optional :: vmold
|
||||
|
||||
!
|
||||
! In MLD the DESC optional argument is ignored, since
|
||||
! the necessary info is contained in the various entries of the
|
||||
! PRECV component.
|
||||
type(psb_desc_type), intent(in), optional :: desc
|
||||
|
||||
! Local variables
|
||||
integer(psb_ipk_) :: me,err_act,i,j,level,nlev, nc2l
|
||||
character(len=20) :: name
|
||||
@@ -900,8 +906,6 @@ contains
|
||||
|
||||
end subroutine mld_z_allocate_wrk
|
||||
|
||||
|
||||
|
||||
subroutine mld_z_free_wrk(prec,info)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
@@ -936,4 +940,18 @@ contains
|
||||
|
||||
end subroutine mld_z_free_wrk
|
||||
|
||||
function mld_z_is_allocated_wrk(prec) result(res)
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
class(mld_zprec_type), intent(in) :: prec
|
||||
logical :: res
|
||||
|
||||
res = .false.
|
||||
if (.not.allocated(prec%precv)) return
|
||||
res = allocated(prec%precv(1)%wrk)
|
||||
|
||||
end function mld_z_is_allocated_wrk
|
||||
|
||||
end module mld_z_prec_type
|
||||
|
||||
Reference in New Issue
Block a user