diff --git a/amgprec/amg_base_prec_type.F90 b/amgprec/amg_base_prec_type.F90 index 373da1d7..34fe1eff 100644 --- a/amgprec/amg_base_prec_type.F90 +++ b/amgprec/amg_base_prec_type.F90 @@ -408,8 +408,24 @@ module amg_base_prec_type module procedure amg_d_equal_aggregation, amg_s_equal_aggregation end interface amg_equal_aggregation + logical, private, save :: do_remap=.false. + contains + + function amg_get_do_remap() result(res) + implicit none + logical :: res + + res = do_remap + end function amg_get_do_remap + subroutine amg_set_do_remap(val) + implicit none + logical, intent(in) :: val + + do_remap = val + end subroutine amg_set_do_remap + ! ! Function: amg_stringval ! diff --git a/amgprec/impl/amg_c_hierarchy_bld.f90 b/amgprec/impl/amg_c_hierarchy_bld.f90 index cfb7e53d..d08712bf 100644 --- a/amgprec/impl/amg_c_hierarchy_bld.f90 +++ b/amgprec/impl/amg_c_hierarchy_bld.f90 @@ -457,7 +457,7 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info) !write(0,*) 'Should we remap? ' - if (.true..and.(np>=4)) then + if (amg_get_do_remap().and.(np>=4)) then write(0,*) 'Going for remapping ' if (.true.) then associate(lv=>prec%precv(iszv), rmp => prec%precv(iszv)%remap_data) diff --git a/amgprec/impl/amg_d_hierarchy_bld.f90 b/amgprec/impl/amg_d_hierarchy_bld.f90 index c0140f92..d2069ec5 100644 --- a/amgprec/impl/amg_d_hierarchy_bld.f90 +++ b/amgprec/impl/amg_d_hierarchy_bld.f90 @@ -457,7 +457,7 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info) !write(0,*) 'Should we remap? ' - if (.true..and.(np>=4)) then + if (amg_get_do_remap().and.(np>=4)) then write(0,*) 'Going for remapping ' if (.true.) then associate(lv=>prec%precv(iszv), rmp => prec%precv(iszv)%remap_data) diff --git a/amgprec/impl/amg_s_hierarchy_bld.f90 b/amgprec/impl/amg_s_hierarchy_bld.f90 index 93cad383..d9c1d5d2 100644 --- a/amgprec/impl/amg_s_hierarchy_bld.f90 +++ b/amgprec/impl/amg_s_hierarchy_bld.f90 @@ -457,7 +457,7 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info) !write(0,*) 'Should we remap? ' - if (.true..and.(np>=4)) then + if (amg_get_do_remap().and.(np>=4)) then write(0,*) 'Going for remapping ' if (.true.) then associate(lv=>prec%precv(iszv), rmp => prec%precv(iszv)%remap_data) diff --git a/amgprec/impl/amg_z_hierarchy_bld.f90 b/amgprec/impl/amg_z_hierarchy_bld.f90 index 173c515e..5aee5d06 100644 --- a/amgprec/impl/amg_z_hierarchy_bld.f90 +++ b/amgprec/impl/amg_z_hierarchy_bld.f90 @@ -457,7 +457,7 @@ subroutine amg_z_hierarchy_bld(a,desc_a,prec,info) !write(0,*) 'Should we remap? ' - if (.true..and.(np>=4)) then + if (amg_get_do_remap().and.(np>=4)) then write(0,*) 'Going for remapping ' if (.true.) then associate(lv=>prec%precv(iszv), rmp => prec%precv(iszv)%remap_data)