diff --git a/amgprec/Makefile b/amgprec/Makefile index 6b8035b1..f3813c74 100644 --- a/amgprec/Makefile +++ b/amgprec/Makefile @@ -114,7 +114,7 @@ amg_c_prec_type.o: amg_c_onelev_mod.o amg_z_prec_type.o: amg_z_onelev_mod.o amg_s_onelev_mod.o: amg_s_base_smoother_mod.o amg_s_dec_aggregator_mod.o amg_s_parmatch_aggregator_mod.o -amg_d_onelev_mod.o: amg_d_base_smoother_mod.o amg_d_dec_aggregator_mod.o amg_d_parmatch_aggregator_mod.o +amg_d_onelev_mod.o: amg_d_base_smoother_mod.o amg_d_dec_aggregator_mod.o amg_d_parmatch_aggregator_mod.o amg_d_newmatch_aggregator_mod.o amg_c_onelev_mod.o: amg_c_base_smoother_mod.o amg_c_dec_aggregator_mod.o amg_z_onelev_mod.o: amg_z_base_smoother_mod.o amg_z_dec_aggregator_mod.o diff --git a/amgprec/amg_base_prec_type.F90 b/amgprec/amg_base_prec_type.F90 index 69ebf0ab..faa2bf69 100644 --- a/amgprec/amg_base_prec_type.F90 +++ b/amgprec/amg_base_prec_type.F90 @@ -283,6 +283,7 @@ module amg_base_prec_type integer(psb_ipk_), parameter :: amg_soc1_ = 1 integer(psb_ipk_), parameter :: amg_soc2_ = 2 integer(psb_ipk_), parameter :: amg_matchboxp_ = 3 + integer(psb_ipk_), parameter :: amg_newmatch_ = 4 ! ! Legal values for entry: amg_aggr_prol_ ! @@ -371,9 +372,9 @@ module amg_base_prec_type character(len=15), parameter, private :: & & matrix_names(0:1)=(/'distributed ','replicated '/) character(len=18), parameter, private :: & - & aggr_type_names(0:3)=(/'None ',& + & aggr_type_names(0:4)=(/'None ',& & 'SOC measure 1 ', 'SOC Measure 2 ',& - & 'Parallel Matching '/) + & 'Parallel Matching ','Decoupled Matching'/) character(len=18), parameter, private :: & & par_aggr_alg_names(0:3)=(/& & 'decoupled aggr. ', 'sym. dec. aggr. ',& @@ -516,6 +517,8 @@ contains val = amg_soc2_ case('SOC1') val = amg_soc1_ + case('NEWMATCH') + val = amg_newmatch_ case('MATCHBOXP','PARMATCH') val = amg_matchboxp_ case('COUPLED','COUP') diff --git a/amgprec/amg_d_decmatch_mod.f90 b/amgprec/amg_d_decmatch_mod.f90 index 050bda4c..39020925 100644 --- a/amgprec/amg_d_decmatch_mod.f90 +++ b/amgprec/amg_d_decmatch_mod.f90 @@ -281,6 +281,8 @@ contains !!$ ilaggr(k) = -2 !!$ end if !!$ end if + else + write(0,*) 'Really? mate(k) > nr? ',mate(k),nr end if else if (abs(w(k)) amg_d_newmatch_aggregator_mat_bld + use amg_d_prec_type, amg_protect_name => amg_d_newmatch_aggregator_mat_bld + !use amg_d_newmatch_aggregator_mod, amg_protect_name => amg_d_newmatch_aggregator_mat_bld implicit none class(amg_d_newmatch_aggregator_type), target, intent(inout) :: ag diff --git a/amgprec/impl/level/amg_d_base_onelev_csetc.F90 b/amgprec/impl/level/amg_d_base_onelev_csetc.F90 index eaacabbc..caedc4d9 100644 --- a/amgprec/impl/level/amg_d_base_onelev_csetc.F90 +++ b/amgprec/impl/level/amg_d_base_onelev_csetc.F90 @@ -43,6 +43,7 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx) use amg_d_dec_aggregator_mod use amg_d_symdec_aggregator_mod use amg_d_parmatch_aggregator_mod + use amg_d_newmatch_aggregator_mod use amg_d_jac_smoother use amg_d_as_smoother use amg_d_diag_solver @@ -252,8 +253,6 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx) lv%parms%ml_cycle = amg_stringval(val) case ('PAR_AGGR_ALG') - ival = amg_stringval(val) - lv%parms%par_aggr_alg = ival if (allocated(lv%aggr)) then call lv%aggr%free(info) if (info == 0) deallocate(lv%aggr,stat=info) @@ -263,6 +262,9 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx) end if end if + ival = amg_stringval(val) + lv%parms%par_aggr_alg = ival + select case(val) case('DEC') allocate(amg_d_dec_aggregator_type :: lv%aggr, stat=info) @@ -270,9 +272,12 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx) allocate(amg_d_symdec_aggregator_type :: lv%aggr, stat=info) case('COUP','COUPLED') allocate(amg_d_parmatch_aggregator_type :: lv%aggr, stat=info) + case('NEWMTC') + allocate(amg_d_newmatch_aggregator_type :: lv%aggr, stat=info) case default info = psb_err_internal_error_ end select + if (info == psb_success_) call lv%aggr%default() case ('AGGR_ORD')