diff --git a/samples/advanced/pdegen/amg_d_pde2d.F90 b/samples/advanced/pdegen/amg_d_pde2d.F90 index 51e1c211..52debd1e 100644 --- a/samples/advanced/pdegen/amg_d_pde2d.F90 +++ b/samples/advanced/pdegen/amg_d_pde2d.F90 @@ -472,9 +472,16 @@ program amg_d_pde2d ! call psb_barrier(ctxt) t1 = psb_wtime() - call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,& - & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,& - & istop=s_choice%istopc,irst=s_choice%irst) + if (psb_toupper(trim(s_choice%kmethd)) == 'RICHARDSON') then + call psb_richardson(a,prec,b,x,s_choice%eps,& + & desc_a,info,itmax=s_choice%itmax,iter=iter,& + & err=err,itrace=s_choice%itrace,& + & istop=s_choice%istopc) + else + call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,& + & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,& + & istop=s_choice%istopc,irst=s_choice%irst) + end if call psb_barrier(ctxt) tslv = psb_wtime() - t1 diff --git a/samples/advanced/pdegen/amg_d_pde3d.F90 b/samples/advanced/pdegen/amg_d_pde3d.F90 index 97ae4a1f..eb8b4344 100644 --- a/samples/advanced/pdegen/amg_d_pde3d.F90 +++ b/samples/advanced/pdegen/amg_d_pde3d.F90 @@ -476,9 +476,16 @@ program amg_d_pde3d ! call psb_barrier(ctxt) t1 = psb_wtime() - call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,& - & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,& - & istop=s_choice%istopc,irst=s_choice%irst) + if (psb_toupper(trim(s_choice%kmethd)) == 'RICHARDSON') then + call psb_richardson(a,prec,b,x,s_choice%eps,& + & desc_a,info,itmax=s_choice%itmax,iter=iter,& + & err=err,itrace=s_choice%itrace,& + & istop=s_choice%istopc) + else + call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,& + & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,& + & istop=s_choice%istopc,irst=s_choice%irst) + end if call psb_barrier(ctxt) tslv = psb_wtime() - t1 diff --git a/samples/advanced/pdegen/amg_s_pde2d.F90 b/samples/advanced/pdegen/amg_s_pde2d.F90 index 07c38bad..7732bdbb 100644 --- a/samples/advanced/pdegen/amg_s_pde2d.F90 +++ b/samples/advanced/pdegen/amg_s_pde2d.F90 @@ -472,9 +472,16 @@ program amg_s_pde2d ! call psb_barrier(ctxt) t1 = psb_wtime() - call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,& - & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,& - & istop=s_choice%istopc,irst=s_choice%irst) + if (psb_toupper(trim(s_choice%kmethd)) == 'RICHARDSON') then + call psb_richardson(a,prec,b,x,s_choice%eps,& + & desc_a,info,itmax=s_choice%itmax,iter=iter,& + & err=err,itrace=s_choice%itrace,& + & istop=s_choice%istopc) + else + call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,& + & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,& + & istop=s_choice%istopc,irst=s_choice%irst) + end if call psb_barrier(ctxt) tslv = psb_wtime() - t1 diff --git a/samples/advanced/pdegen/amg_s_pde3d.F90 b/samples/advanced/pdegen/amg_s_pde3d.F90 index 0ae2bdc8..f6571bdb 100644 --- a/samples/advanced/pdegen/amg_s_pde3d.F90 +++ b/samples/advanced/pdegen/amg_s_pde3d.F90 @@ -476,9 +476,16 @@ program amg_s_pde3d ! call psb_barrier(ctxt) t1 = psb_wtime() - call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,& - & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,& - & istop=s_choice%istopc,irst=s_choice%irst) + if (psb_toupper(trim(s_choice%kmethd)) == 'RICHARDSON') then + call psb_richardson(a,prec,b,x,s_choice%eps,& + & desc_a,info,itmax=s_choice%itmax,iter=iter,& + & err=err,itrace=s_choice%itrace,& + & istop=s_choice%istopc) + else + call psb_krylov(s_choice%kmethd,a,prec,b,x,s_choice%eps,& + & desc_a,info,itmax=s_choice%itmax,iter=iter,err=err,itrace=s_choice%itrace,& + & istop=s_choice%istopc,irst=s_choice%irst) + end if call psb_barrier(ctxt) tslv = psb_wtime() - t1