From 32d550ed0512a6165597fd8725ab49493a9f399d Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 12 May 2020 14:31:51 +0200 Subject: [PATCH] Improve use of TRIM in precinit --- mlprec/impl/mld_cprecinit.F90 | 5 ++--- mlprec/impl/mld_dprecinit.F90 | 5 ++--- mlprec/impl/mld_sprecinit.F90 | 5 ++--- mlprec/impl/mld_zprecinit.F90 | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/mlprec/impl/mld_cprecinit.F90 b/mlprec/impl/mld_cprecinit.F90 index 077c3cde..901dc382 100644 --- a/mlprec/impl/mld_cprecinit.F90 +++ b/mlprec/impl/mld_cprecinit.F90 @@ -126,7 +126,7 @@ subroutine mld_cprecinit(ictxt,prec,ptype,info) prec%ictxt = ictxt prec%ag_data%min_coarse_size = -1 - select case(psb_toupper(ptype(1:len_trim(ptype)))) + select case(psb_toupper(trim(ptype))) case ('NOPREC','NONE') nlev_ = 1 ilev_ = 1 @@ -225,8 +225,7 @@ subroutine mld_cprecinit(ictxt,prec,ptype,info) #else call prec%set('COARSE_SOLVE','ILU',info) #endif - !call prec%precv(nlev_)%default() - + case default write(psb_err_unit,*) name,& &': Warning: Unknown preconditioner type request "',ptype,'"' diff --git a/mlprec/impl/mld_dprecinit.F90 b/mlprec/impl/mld_dprecinit.F90 index 0a6fe849..9156d5ad 100644 --- a/mlprec/impl/mld_dprecinit.F90 +++ b/mlprec/impl/mld_dprecinit.F90 @@ -129,7 +129,7 @@ subroutine mld_dprecinit(ictxt,prec,ptype,info) prec%ictxt = ictxt prec%ag_data%min_coarse_size = -1 - select case(psb_toupper(ptype(1:len_trim(ptype)))) + select case(psb_toupper(trim(ptype))) case ('NOPREC','NONE') nlev_ = 1 ilev_ = 1 @@ -230,8 +230,7 @@ subroutine mld_dprecinit(ictxt,prec,ptype,info) #else call prec%set('COARSE_SOLVE','ILU',info) #endif - !call prec%precv(nlev_)%default() - + case default write(psb_err_unit,*) name,& &': Warning: Unknown preconditioner type request "',ptype,'"' diff --git a/mlprec/impl/mld_sprecinit.F90 b/mlprec/impl/mld_sprecinit.F90 index 412d99b8..218c5802 100644 --- a/mlprec/impl/mld_sprecinit.F90 +++ b/mlprec/impl/mld_sprecinit.F90 @@ -126,7 +126,7 @@ subroutine mld_sprecinit(ictxt,prec,ptype,info) prec%ictxt = ictxt prec%ag_data%min_coarse_size = -1 - select case(psb_toupper(ptype(1:len_trim(ptype)))) + select case(psb_toupper(trim(ptype))) case ('NOPREC','NONE') nlev_ = 1 ilev_ = 1 @@ -225,8 +225,7 @@ subroutine mld_sprecinit(ictxt,prec,ptype,info) #else call prec%set('COARSE_SOLVE','ILU',info) #endif - !call prec%precv(nlev_)%default() - + case default write(psb_err_unit,*) name,& &': Warning: Unknown preconditioner type request "',ptype,'"' diff --git a/mlprec/impl/mld_zprecinit.F90 b/mlprec/impl/mld_zprecinit.F90 index 98e05b51..851e0a4f 100644 --- a/mlprec/impl/mld_zprecinit.F90 +++ b/mlprec/impl/mld_zprecinit.F90 @@ -129,7 +129,7 @@ subroutine mld_zprecinit(ictxt,prec,ptype,info) prec%ictxt = ictxt prec%ag_data%min_coarse_size = -1 - select case(psb_toupper(ptype(1:len_trim(ptype)))) + select case(psb_toupper(trim(ptype))) case ('NOPREC','NONE') nlev_ = 1 ilev_ = 1 @@ -230,8 +230,7 @@ subroutine mld_zprecinit(ictxt,prec,ptype,info) #else call prec%set('COARSE_SOLVE','ILU',info) #endif - !call prec%precv(nlev_)%default() - + case default write(psb_err_unit,*) name,& &': Warning: Unknown preconditioner type request "',ptype,'"'