From fa96e116d66846074e0155179d4004d5e7b267ba Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 17 Jun 2016 11:39:04 +0000 Subject: [PATCH] mld2p4-2: mlprec/impl/mld_cmlprec_aply.f90 mlprec/impl/mld_dmlprec_aply.f90 mlprec/impl/mld_smlprec_aply.f90 mlprec/impl/mld_zmlprec_aply.f90 Fix in MLPREC_APLY: clarify usage of sweeps_pre and sweeps_post --- mlprec/impl/mld_cmlprec_aply.f90 | 11 ++--------- mlprec/impl/mld_dmlprec_aply.f90 | 11 ++--------- mlprec/impl/mld_smlprec_aply.f90 | 11 ++--------- mlprec/impl/mld_zmlprec_aply.f90 | 11 ++--------- 4 files changed, 8 insertions(+), 36 deletions(-) diff --git a/mlprec/impl/mld_cmlprec_aply.f90 b/mlprec/impl/mld_cmlprec_aply.f90 index 4f9da89a..b5574bcb 100644 --- a/mlprec/impl/mld_cmlprec_aply.f90 +++ b/mlprec/impl/mld_cmlprec_aply.f90 @@ -696,20 +696,13 @@ contains write(debug_unit,*) me,' inner_mult at level ',level end if - if ((level < nlev).or.(nlev == 1)) then - sweeps_post = p%precv(level)%parms%sweeps_post - sweeps_pre = p%precv(level)%parms%sweeps_pre - else - sweeps_post = p%precv(level-1)%parms%sweeps_post - sweeps_pre = p%precv(level-1)%parms%sweeps_pre - endif - + sweeps_post = p%precv(level)%parms%sweeps_post + sweeps_pre = p%precv(level)%parms%sweeps_pre pre = ((sweeps_pre>0).and.(trans=='N')).or.((sweeps_post>0).and.(trans/='N')) post = ((sweeps_post>0).and.(trans=='N')).or.((sweeps_pre>0).and.(trans/='N')) if (level < nlev) then - ! ! Apply the first smoother ! diff --git a/mlprec/impl/mld_dmlprec_aply.f90 b/mlprec/impl/mld_dmlprec_aply.f90 index 68283ef7..85220a1d 100644 --- a/mlprec/impl/mld_dmlprec_aply.f90 +++ b/mlprec/impl/mld_dmlprec_aply.f90 @@ -696,20 +696,13 @@ contains write(debug_unit,*) me,' inner_mult at level ',level end if - if ((level < nlev).or.(nlev == 1)) then - sweeps_post = p%precv(level)%parms%sweeps_post - sweeps_pre = p%precv(level)%parms%sweeps_pre - else - sweeps_post = p%precv(level-1)%parms%sweeps_post - sweeps_pre = p%precv(level-1)%parms%sweeps_pre - endif - + sweeps_post = p%precv(level)%parms%sweeps_post + sweeps_pre = p%precv(level)%parms%sweeps_pre pre = ((sweeps_pre>0).and.(trans=='N')).or.((sweeps_post>0).and.(trans/='N')) post = ((sweeps_post>0).and.(trans=='N')).or.((sweeps_pre>0).and.(trans/='N')) if (level < nlev) then - ! ! Apply the first smoother ! diff --git a/mlprec/impl/mld_smlprec_aply.f90 b/mlprec/impl/mld_smlprec_aply.f90 index 33788cf0..b7783cbf 100644 --- a/mlprec/impl/mld_smlprec_aply.f90 +++ b/mlprec/impl/mld_smlprec_aply.f90 @@ -696,20 +696,13 @@ contains write(debug_unit,*) me,' inner_mult at level ',level end if - if ((level < nlev).or.(nlev == 1)) then - sweeps_post = p%precv(level)%parms%sweeps_post - sweeps_pre = p%precv(level)%parms%sweeps_pre - else - sweeps_post = p%precv(level-1)%parms%sweeps_post - sweeps_pre = p%precv(level-1)%parms%sweeps_pre - endif - + sweeps_post = p%precv(level)%parms%sweeps_post + sweeps_pre = p%precv(level)%parms%sweeps_pre pre = ((sweeps_pre>0).and.(trans=='N')).or.((sweeps_post>0).and.(trans/='N')) post = ((sweeps_post>0).and.(trans=='N')).or.((sweeps_pre>0).and.(trans/='N')) if (level < nlev) then - ! ! Apply the first smoother ! diff --git a/mlprec/impl/mld_zmlprec_aply.f90 b/mlprec/impl/mld_zmlprec_aply.f90 index 05cfc689..16e5c992 100644 --- a/mlprec/impl/mld_zmlprec_aply.f90 +++ b/mlprec/impl/mld_zmlprec_aply.f90 @@ -696,20 +696,13 @@ contains write(debug_unit,*) me,' inner_mult at level ',level end if - if ((level < nlev).or.(nlev == 1)) then - sweeps_post = p%precv(level)%parms%sweeps_post - sweeps_pre = p%precv(level)%parms%sweeps_pre - else - sweeps_post = p%precv(level-1)%parms%sweeps_post - sweeps_pre = p%precv(level-1)%parms%sweeps_pre - endif - + sweeps_post = p%precv(level)%parms%sweeps_post + sweeps_pre = p%precv(level)%parms%sweeps_pre pre = ((sweeps_pre>0).and.(trans=='N')).or.((sweeps_post>0).and.(trans/='N')) post = ((sweeps_post>0).and.(trans=='N')).or.((sweeps_pre>0).and.(trans/='N')) if (level < nlev) then - ! ! Apply the first smoother !