|
|
|
@ -41,11 +41,11 @@
|
|
|
|
|
!
|
|
|
|
|
module mld_c_base_aggregator_mod
|
|
|
|
|
|
|
|
|
|
use mld_base_prec_type, only : mld_sml_parms
|
|
|
|
|
use mld_base_prec_type, only : mld_sml_parms, mld_saggr_data
|
|
|
|
|
use psb_base_mod, only : psb_cspmat_type, psb_lcspmat_type, psb_c_vect_type, &
|
|
|
|
|
& psb_c_base_vect_type, psb_clinmap_type, psb_spk_, &
|
|
|
|
|
& psb_ipk_, psb_epk_, psb_lpk_, psb_desc_type, psb_i_base_vect_type, &
|
|
|
|
|
& psb_erractionsave, psb_error_handler, psb_success_
|
|
|
|
|
& psb_erractionsave, psb_error_handler, psb_success_, psb_toupper
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
@ -79,7 +79,8 @@ module mld_c_base_aggregator_mod
|
|
|
|
|
!! cseti, csetr, csetc - Set internal parameters, if any
|
|
|
|
|
!
|
|
|
|
|
type mld_c_base_aggregator_type
|
|
|
|
|
|
|
|
|
|
! Do we want to purge explicit zeros when aggregating?
|
|
|
|
|
logical :: do_clean_zeros
|
|
|
|
|
contains
|
|
|
|
|
procedure, pass(ag) :: bld_tprol => mld_c_base_aggregator_build_tprol
|
|
|
|
|
procedure, pass(ag) :: mat_asb => mld_c_base_aggregator_mat_asb
|
|
|
|
@ -96,6 +97,19 @@ module mld_c_base_aggregator_mod
|
|
|
|
|
generic, public :: set => cseti, csetr, csetc
|
|
|
|
|
end type mld_c_base_aggregator_type
|
|
|
|
|
|
|
|
|
|
abstract interface
|
|
|
|
|
subroutine mld_c_soc_map_bld(iorder,theta,clean_zeros,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
|
import :: psb_cspmat_type, psb_desc_type, psb_spk_, psb_ipk_, psb_lpk_
|
|
|
|
|
implicit none
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iorder
|
|
|
|
|
logical, intent(in) :: clean_zeros
|
|
|
|
|
type(psb_cspmat_type), intent(in) :: a
|
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
|
real(psb_spk_), intent(in) :: theta
|
|
|
|
|
integer(psb_lpk_), allocatable, intent(out) :: ilaggr(:),nlaggr(:)
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
end subroutine mld_c_soc_map_bld
|
|
|
|
|
end interface
|
|
|
|
|
|
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
@ -137,7 +151,16 @@ contains
|
|
|
|
|
character(len=*), intent(in) :: val
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
integer(psb_ipk_), intent(in), optional :: idx
|
|
|
|
|
! Do nothing
|
|
|
|
|
! Set clean zeros, or do nothing.
|
|
|
|
|
select case (psb_toupper(trim(what)))
|
|
|
|
|
case('AGGR_CLEAN_ZEROS')
|
|
|
|
|
select case (psb_toupper(trim(val)))
|
|
|
|
|
case('TRUE','T')
|
|
|
|
|
ag%do_clean_zeros = .true.
|
|
|
|
|
case('FALSE','F')
|
|
|
|
|
ag%do_clean_zeros = .false.
|
|
|
|
|
end select
|
|
|
|
|
end select
|
|
|
|
|
info = 0
|
|
|
|
|
end subroutine mld_c_base_aggregator_csetc
|
|
|
|
|
|
|
|
|
@ -181,8 +204,8 @@ contains
|
|
|
|
|
subroutine mld_c_base_aggregator_default(ag)
|
|
|
|
|
implicit none
|
|
|
|
|
class(mld_c_base_aggregator_type), intent(inout) :: ag
|
|
|
|
|
|
|
|
|
|
! Here we need do nothing
|
|
|
|
|
! Only one default setting
|
|
|
|
|
ag%do_clean_zeros = .true.
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
end subroutine mld_c_base_aggregator_default
|
|
|
|
@ -228,9 +251,12 @@ contains
|
|
|
|
|
!! will contribute, in global numbering.
|
|
|
|
|
!! Many aggregation produce a binary tentative prolongator, but some
|
|
|
|
|
!! do not, hence we also need the OP_PROL output.
|
|
|
|
|
!! AG_DATA is passed here just in case some of the
|
|
|
|
|
!! aggregators need it internally, most of them will ignore.
|
|
|
|
|
!!
|
|
|
|
|
!! \param ag The input aggregator object
|
|
|
|
|
!! \param parms The auxiliary parameters object
|
|
|
|
|
!! \param ag_data Auxiliary global aggregation info
|
|
|
|
|
!! \param a The local matrix part
|
|
|
|
|
!! \param desc_a The descriptor
|
|
|
|
|
!! \param ilaggr Output aggregation map
|
|
|
|
@ -239,11 +265,13 @@ contains
|
|
|
|
|
!! \param info Return code
|
|
|
|
|
!!
|
|
|
|
|
!
|
|
|
|
|
subroutine mld_c_base_aggregator_build_tprol(ag,parms,a,desc_a,ilaggr,nlaggr,op_prol,info)
|
|
|
|
|
subroutine mld_c_base_aggregator_build_tprol(ag,parms,ag_data,&
|
|
|
|
|
& a,desc_a,ilaggr,nlaggr,op_prol,info)
|
|
|
|
|
use psb_base_mod
|
|
|
|
|
implicit none
|
|
|
|
|
class(mld_c_base_aggregator_type), target, intent(inout) :: ag
|
|
|
|
|
type(mld_sml_parms), intent(inout) :: parms
|
|
|
|
|
type(mld_sml_parms), intent(inout) :: parms
|
|
|
|
|
type(mld_saggr_data), intent(in) :: ag_data
|
|
|
|
|
type(psb_cspmat_type), intent(in) :: a
|
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
|
integer(psb_lpk_), allocatable, intent(out) :: ilaggr(:),nlaggr(:)
|
|
|
|
|