From 997cef4a94975000dfd97b8423f29acf84eb6fab Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 28 Jul 2011 12:02:52 +0000 Subject: [PATCH] psblas3: base/modules/psb_base_mat_mod.f90 krylov/psb_cbicg.f90 krylov/psb_ccg.f90 krylov/psb_ccgs.f90 krylov/psb_ccgstab.f90 krylov/psb_ccgstabl.f90 krylov/psb_ckrylov.f90 krylov/psb_crgmres.f90 krylov/psb_dbicg.f90 krylov/psb_dcg.F90 krylov/psb_dcgs.f90 krylov/psb_dcgstab.F90 krylov/psb_dcgstabl.f90 krylov/psb_dkrylov.f90 krylov/psb_drgmres.f90 krylov/psb_sbicg.f90 krylov/psb_scg.F90 krylov/psb_scgs.f90 krylov/psb_scgstab.F90 krylov/psb_scgstabl.f90 krylov/psb_skrylov.f90 krylov/psb_srgmres.f90 krylov/psb_zbicg.f90 krylov/psb_zcg.F90 krylov/psb_zcgs.f90 krylov/psb_zcgstab.f90 krylov/psb_zcgstabl.f90 krylov/psb_zkrylov.f90 krylov/psb_zrgmres.f90 opt/psb_c_rsb_mat_mod.F90 opt/psb_s_rsb_mat_mod.F90 opt/psb_z_rsb_mat_mod.F90 util/psb_hbio_impl.f90 Fixes in comments to Krylov methods. --- base/modules/psb_base_mat_mod.f90 | 1 + krylov/psb_cbicg.f90 | 6 +- krylov/psb_ccg.f90 | 6 +- krylov/psb_ccgs.f90 | 6 +- krylov/psb_ccgstab.f90 | 6 +- krylov/psb_ccgstabl.f90 | 6 +- krylov/psb_ckrylov.f90 | 4 +- krylov/psb_crgmres.f90 | 6 +- krylov/psb_dbicg.f90 | 6 +- krylov/psb_dcg.F90 | 6 +- krylov/psb_dcgs.f90 | 6 +- krylov/psb_dcgstab.F90 | 6 +- krylov/psb_dcgstabl.f90 | 6 +- krylov/psb_dkrylov.f90 | 4 +- krylov/psb_drgmres.f90 | 6 +- krylov/psb_sbicg.f90 | 6 +- krylov/psb_scg.F90 | 6 +- krylov/psb_scgs.f90 | 6 +- krylov/psb_scgstab.F90 | 6 +- krylov/psb_scgstabl.f90 | 6 +- krylov/psb_skrylov.f90 | 4 +- krylov/psb_srgmres.f90 | 6 +- krylov/psb_zbicg.f90 | 6 +- krylov/psb_zcg.F90 | 6 +- krylov/psb_zcgs.f90 | 6 +- krylov/psb_zcgstab.f90 | 6 +- krylov/psb_zcgstabl.f90 | 6 +- krylov/psb_zkrylov.f90 | 4 +- krylov/psb_zrgmres.f90 | 6 +- opt/psb_c_rsb_mat_mod.F90 | 92 +++++++++++++++---------------- opt/psb_s_rsb_mat_mod.F90 | 92 +++++++++++++++---------------- opt/psb_z_rsb_mat_mod.F90 | 92 +++++++++++++++---------------- util/psb_hbio_impl.f90 | 2 +- 33 files changed, 220 insertions(+), 219 deletions(-) diff --git a/base/modules/psb_base_mat_mod.f90 b/base/modules/psb_base_mat_mod.f90 index 81878c81..ff93bd93 100644 --- a/base/modules/psb_base_mat_mod.f90 +++ b/base/modules/psb_base_mat_mod.f90 @@ -37,6 +37,7 @@ ! type variants, such as number of rows and columns, whether the ! matrix is supposed to be triangular (upper or lower) and with a unit ! (i.e. assumed) diagonal, together with some state variables. This + ! base class is in common among all variants of real/complex, ! short/long precision; as such, it only contains information that is ! inherently integer in nature. diff --git a/krylov/psb_cbicg.f90 b/krylov/psb_cbicg.f90 index ac8ef39a..ccdd78c1 100644 --- a/krylov/psb_cbicg.f90 +++ b/krylov/psb_cbicg.f90 @@ -85,10 +85,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_ccg.f90 b/krylov/psb_ccg.f90 index 0a32859b..877c074f 100644 --- a/krylov/psb_ccg.f90 +++ b/krylov/psb_ccg.f90 @@ -87,10 +87,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_ccgs.f90 b/krylov/psb_ccgs.f90 index d6c2b390..049c0a0b 100644 --- a/krylov/psb_ccgs.f90 +++ b/krylov/psb_ccgs.f90 @@ -85,10 +85,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_ccgstab.f90 b/krylov/psb_ccgstab.f90 index a8755492..9cbdfe1f 100644 --- a/krylov/psb_ccgstab.f90 +++ b/krylov/psb_ccgstab.f90 @@ -86,10 +86,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_ccgstabl.f90 b/krylov/psb_ccgstabl.f90 index 4260d315..d85344b9 100644 --- a/krylov/psb_ccgstabl.f90 +++ b/krylov/psb_ccgstabl.f90 @@ -93,10 +93,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration +! 1: err = |r|/(|a||x|+|b|); here the iteration ! is stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! irst - integer(optional) Input: restart parameter L diff --git a/krylov/psb_ckrylov.f90 b/krylov/psb_ckrylov.f90 index 09a5f2d5..3272ce4e 100644 --- a/krylov/psb_ckrylov.f90 +++ b/krylov/psb_ckrylov.f90 @@ -74,8 +74,8 @@ ! BICGSTAB(L) methods ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. - ! 1: err = |r|/|b| - ! 2: err = |r|/(|a||x|+|b|) + ! 1: err = |r|/(|a||x|+|b|) + ! 2: err = |r|/|b| ! where r is the (preconditioned, recursive ! estimate of) residual ! diff --git a/krylov/psb_crgmres.f90 b/krylov/psb_crgmres.f90 index cdac01a6..ce8c300b 100644 --- a/krylov/psb_crgmres.f90 +++ b/krylov/psb_crgmres.f90 @@ -97,10 +97,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! irst - integer(optional) Input: restart parameter diff --git a/krylov/psb_dbicg.f90 b/krylov/psb_dbicg.f90 index be1eaf07..40b93fe2 100644 --- a/krylov/psb_dbicg.f90 +++ b/krylov/psb_dbicg.f90 @@ -86,10 +86,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_dcg.F90 b/krylov/psb_dcg.F90 index d60a4787..92f3844d 100644 --- a/krylov/psb_dcg.F90 +++ b/krylov/psb_dcg.F90 @@ -87,10 +87,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_dcgs.f90 b/krylov/psb_dcgs.f90 index ac0218c8..f528c1fa 100644 --- a/krylov/psb_dcgs.f90 +++ b/krylov/psb_dcgs.f90 @@ -86,10 +86,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_dcgstab.F90 b/krylov/psb_dcgstab.F90 index 394125a9..38fd7483 100644 --- a/krylov/psb_dcgstab.F90 +++ b/krylov/psb_dcgstab.F90 @@ -85,10 +85,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_dcgstabl.f90 b/krylov/psb_dcgstabl.f90 index b61d8e70..7b8655b2 100644 --- a/krylov/psb_dcgstabl.f90 +++ b/krylov/psb_dcgstabl.f90 @@ -93,10 +93,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! irst - integer(optional) Input: restart parameter L diff --git a/krylov/psb_dkrylov.f90 b/krylov/psb_dkrylov.f90 index 66f9cdca..ad34a186 100644 --- a/krylov/psb_dkrylov.f90 +++ b/krylov/psb_dkrylov.f90 @@ -71,8 +71,8 @@ ! BICGSTAB(L) methods ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. - ! 1: err = |r|/|b| - ! 2: err = |r|/(|a||x|+|b|) + ! 1: err = |r|/(|a||x|+|b|) + ! 2: err = |r|/|b| ! where r is the (preconditioned, recursive ! estimate of) residual ! diff --git a/krylov/psb_drgmres.f90 b/krylov/psb_drgmres.f90 index 92474d83..cb2ab607 100644 --- a/krylov/psb_drgmres.f90 +++ b/krylov/psb_drgmres.f90 @@ -97,10 +97,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! irst - integer(optional) Input: restart parameter diff --git a/krylov/psb_sbicg.f90 b/krylov/psb_sbicg.f90 index 44867f82..3a755fef 100644 --- a/krylov/psb_sbicg.f90 +++ b/krylov/psb_sbicg.f90 @@ -86,10 +86,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_scg.F90 b/krylov/psb_scg.F90 index 42406ea7..c4dfc70f 100644 --- a/krylov/psb_scg.F90 +++ b/krylov/psb_scg.F90 @@ -87,10 +87,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_scgs.f90 b/krylov/psb_scgs.f90 index f142f660..087eb2eb 100644 --- a/krylov/psb_scgs.f90 +++ b/krylov/psb_scgs.f90 @@ -86,10 +86,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_scgstab.F90 b/krylov/psb_scgstab.F90 index e775b100..a6bb4af0 100644 --- a/krylov/psb_scgstab.F90 +++ b/krylov/psb_scgstab.F90 @@ -85,10 +85,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_scgstabl.f90 b/krylov/psb_scgstabl.f90 index d6f97ff1..2e949f5b 100644 --- a/krylov/psb_scgstabl.f90 +++ b/krylov/psb_scgstabl.f90 @@ -93,10 +93,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! irst - integer(optional) Input: restart parameter L diff --git a/krylov/psb_skrylov.f90 b/krylov/psb_skrylov.f90 index d8c62ffe..927a461c 100644 --- a/krylov/psb_skrylov.f90 +++ b/krylov/psb_skrylov.f90 @@ -70,8 +70,8 @@ ! BICGSTAB(L) methods ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. - ! 1: err = |r|/|b| - ! 2: err = |r|/(|a||x|+|b|) + ! 1: err = |r|/(|a||x|+|b|) + ! 2: err = |r|/|b| ! where r is the (preconditioned, recursive ! estimate of) residual ! diff --git a/krylov/psb_srgmres.f90 b/krylov/psb_srgmres.f90 index 1da59f00..c805329e 100644 --- a/krylov/psb_srgmres.f90 +++ b/krylov/psb_srgmres.f90 @@ -97,10 +97,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! irst - integer(optional) Input: restart parameter diff --git a/krylov/psb_zbicg.f90 b/krylov/psb_zbicg.f90 index eceaa85c..c9540538 100644 --- a/krylov/psb_zbicg.f90 +++ b/krylov/psb_zbicg.f90 @@ -85,10 +85,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_zcg.F90 b/krylov/psb_zcg.F90 index 41dde14a..239c1d29 100644 --- a/krylov/psb_zcg.F90 +++ b/krylov/psb_zcg.F90 @@ -87,10 +87,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_zcgs.f90 b/krylov/psb_zcgs.f90 index 6520dfd7..d4e2746c 100644 --- a/krylov/psb_zcgs.f90 +++ b/krylov/psb_zcgs.f90 @@ -85,10 +85,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_zcgstab.f90 b/krylov/psb_zcgstab.f90 index a1abc571..743db7f7 100644 --- a/krylov/psb_zcgstab.f90 +++ b/krylov/psb_zcgstab.f90 @@ -86,10 +86,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! diff --git a/krylov/psb_zcgstabl.f90 b/krylov/psb_zcgstabl.f90 index 448beeb1..06374e18 100644 --- a/krylov/psb_zcgstabl.f90 +++ b/krylov/psb_zcgstabl.f90 @@ -93,10 +93,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration +! 1: err = |r|/(|a||x|+|b|); here the iteration ! is stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! irst - integer(optional) Input: restart parameter L diff --git a/krylov/psb_zkrylov.f90 b/krylov/psb_zkrylov.f90 index 79faca2d..7f6d7ff2 100644 --- a/krylov/psb_zkrylov.f90 +++ b/krylov/psb_zkrylov.f90 @@ -72,8 +72,8 @@ ! BICGSTAB(L) methods ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. - ! 1: err = |r|/|b| - ! 2: err = |r|/(|a||x|+|b|) + ! 1: err = |r|/(|a||x|+|b|) + ! 2: err = |r|/|b| ! where r is the (preconditioned, recursive ! estimate of) residual ! diff --git a/krylov/psb_zrgmres.f90 b/krylov/psb_zrgmres.f90 index ea702d36..7db1454e 100644 --- a/krylov/psb_zrgmres.f90 +++ b/krylov/psb_zrgmres.f90 @@ -97,10 +97,10 @@ ! iterations ! istop - integer(optional) Input: stopping criterion, or how ! to estimate the error. -! 1: err = |r|/|b|; here the iteration is -! stopped when |r| <= eps * |b| -! 2: err = |r|/(|a||x|+|b|); here the iteration is +! 1: err = |r|/(|a||x|+|b|); here the iteration is ! stopped when |r| <= eps * (|a||x|+|b|) +! 2: err = |r|/|b|; here the iteration is +! stopped when |r| <= eps * |b| ! where r is the (preconditioned, recursive ! estimate of) residual. ! irst - integer(optional) Input: restart parameter diff --git a/opt/psb_c_rsb_mat_mod.F90 b/opt/psb_c_rsb_mat_mod.F90 index 5e25fd3a..e9673dcd 100644 --- a/opt/psb_c_rsb_mat_mod.F90 +++ b/opt/psb_c_rsb_mat_mod.F90 @@ -756,36 +756,36 @@ subroutine psb_c_rsb_csgetptn(imin,imax,a,nz,ia,ja,info,& integer :: nzin_, jmin_, jmax_, err_act, i character(len=20) :: name='csget' logical, parameter :: debug=.false. - PSBRSB_DEBUG('') + PSBRSB_DEBUG('') - if (present(iren).or.present(rscale).or.present(cscale)) then - ! FIXME: error condition - PSBRSB_ERROR("unsupported optional arguments!") - call psb_error() - endif + if (present(iren).or.present(rscale).or.present(cscale)) then + ! FIXME: error condition + PSBRSB_ERROR("unsupported optional arguments!") + call psb_error() + endif - if (present(append)) then - append_ = append - else - append_ = .false. - endif - if (present(append).and.append.and.present(nzin)) then - nzin_ = nzin - else - nzin_ = 0 - endif + if (present(append)) then + append_ = append + else + append_ = .false. + endif + if (present(append).and.append.and.present(nzin)) then + nzin_ = nzin + else + nzin_ = 0 + endif - if (present(jmin)) then - jmin_ = jmin - else - jmin_ = 1 - endif + if (present(jmin)) then + jmin_ = jmin + else + jmin_ = 1 + endif - if (present(jmax)) then - jmax_ = jmax - else - jmax_ = a%get_nrows() - endif + if (present(jmax)) then + jmax_ = jmax + else + jmax_ = a%get_nrows() + endif if (present(rscale)) then rscale_ = rscale @@ -804,34 +804,34 @@ subroutine psb_c_rsb_csgetptn(imin,imax,a,nz,ia,ja,info,& end if if (present(iren)) then info = c_psbrsb_err_ - PSBRSB_ERROR("ERROR: the RSB pattern get needs iren support !!") + PSBRSB_ERROR("ERROR: the RSB pattern get needs iren support !!") goto 9999 end if - !nzt = .. - nz = 0 + !nzt = .. + nz = 0 - call psb_ensure_size(nzin_,ia,info) - if (info == psb_success_) call psb_ensure_size(nzin_,ja,info) + call psb_ensure_size(nzin_,ia,info) + if (info == psb_success_) call psb_ensure_size(nzin_,ja,info) - if (info /= psb_success_) return - nz=rsb_get_block_nnz(a%rsbmptr,imin,imax,jmin_,jmax_,c_for_flags,info) - !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ - ! FIXME: unfinished; missing error handling .. + if (info /= psb_success_) return + nz=rsb_get_block_nnz(a%rsbmptr,imin,imax,jmin_,jmax_,c_for_flags,info) + !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ + ! FIXME: unfinished; missing error handling .. - call psb_ensure_size(nzin_+nz,ia,info) - if (info == psb_success_) call psb_ensure_size(nzin_+nz,ja,info) - if (info /= psb_success_)then - PSBRSB_ERROR("!") - return - endif - - info=d_rsb_to_psb_info(rsb_get_block_sparse_pattern& - &(a%rsbmptr,imin,imax,jmin_,jmax_,ia,ja,c_null_ptr,c_null_ptr,nzin_,c_for_flags)) - ! FIXME: unfinished; missing error handling .. + call psb_ensure_size(nzin_+nz,ia,info) + if (info == psb_success_) call psb_ensure_size(nzin_+nz,ja,info) + if (info /= psb_success_)then + PSBRSB_ERROR("!") + return + endif + + info=d_rsb_to_psb_info(rsb_get_block_sparse_pattern& + &(a%rsbmptr,imin,imax,jmin_,jmax_,ia,ja,c_null_ptr,c_null_ptr,nzin_,c_for_flags)) + ! FIXME: unfinished; missing error handling .. - !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ + !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ if (rscale_) then do i=nzin_+1, nzin_+nz ia(i) = ia(i) - imin + 1 diff --git a/opt/psb_s_rsb_mat_mod.F90 b/opt/psb_s_rsb_mat_mod.F90 index 8635273c..2a6890f3 100644 --- a/opt/psb_s_rsb_mat_mod.F90 +++ b/opt/psb_s_rsb_mat_mod.F90 @@ -756,36 +756,36 @@ subroutine psb_s_rsb_csgetptn(imin,imax,a,nz,ia,ja,info,& integer :: nzin_, jmin_, jmax_, err_act, i character(len=20) :: name='csget' logical, parameter :: debug=.false. - PSBRSB_DEBUG('') + PSBRSB_DEBUG('') - if (present(iren).or.present(rscale).or.present(cscale)) then - ! FIXME: error condition - PSBRSB_ERROR("unsupported optional arguments!") - call psb_error() - endif + if (present(iren).or.present(rscale).or.present(cscale)) then + ! FIXME: error condition + PSBRSB_ERROR("unsupported optional arguments!") + call psb_error() + endif - if (present(append)) then - append_ = append - else - append_ = .false. - endif - if (present(append).and.append.and.present(nzin)) then - nzin_ = nzin - else - nzin_ = 0 - endif + if (present(append)) then + append_ = append + else + append_ = .false. + endif + if (present(append).and.append.and.present(nzin)) then + nzin_ = nzin + else + nzin_ = 0 + endif - if (present(jmin)) then - jmin_ = jmin - else - jmin_ = 1 - endif + if (present(jmin)) then + jmin_ = jmin + else + jmin_ = 1 + endif - if (present(jmax)) then - jmax_ = jmax - else - jmax_ = a%get_nrows() - endif + if (present(jmax)) then + jmax_ = jmax + else + jmax_ = a%get_nrows() + endif if (present(rscale)) then rscale_ = rscale @@ -804,34 +804,34 @@ subroutine psb_s_rsb_csgetptn(imin,imax,a,nz,ia,ja,info,& end if if (present(iren)) then info = c_psbrsb_err_ - PSBRSB_ERROR("ERROR: the RSB pattern get needs iren support !!") + PSBRSB_ERROR("ERROR: the RSB pattern get needs iren support !!") goto 9999 end if - !nzt = .. - nz = 0 + !nzt = .. + nz = 0 - call psb_ensure_size(nzin_,ia,info) - if (info == psb_success_) call psb_ensure_size(nzin_,ja,info) + call psb_ensure_size(nzin_,ia,info) + if (info == psb_success_) call psb_ensure_size(nzin_,ja,info) - if (info /= psb_success_) return - nz=rsb_get_block_nnz(a%rsbmptr,imin,imax,jmin_,jmax_,c_for_flags,info) - !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ - ! FIXME: unfinished; missing error handling .. + if (info /= psb_success_) return + nz=rsb_get_block_nnz(a%rsbmptr,imin,imax,jmin_,jmax_,c_for_flags,info) + !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ + ! FIXME: unfinished; missing error handling .. - call psb_ensure_size(nzin_+nz,ia,info) - if (info == psb_success_) call psb_ensure_size(nzin_+nz,ja,info) - if (info /= psb_success_)then - PSBRSB_ERROR("!") - return - endif - - info=d_rsb_to_psb_info(rsb_get_block_sparse_pattern& - &(a%rsbmptr,imin,imax,jmin_,jmax_,ia,ja,c_null_ptr,c_null_ptr,nzin_,c_for_flags)) - ! FIXME: unfinished; missing error handling .. + call psb_ensure_size(nzin_+nz,ia,info) + if (info == psb_success_) call psb_ensure_size(nzin_+nz,ja,info) + if (info /= psb_success_)then + PSBRSB_ERROR("!") + return + endif + + info=d_rsb_to_psb_info(rsb_get_block_sparse_pattern& + &(a%rsbmptr,imin,imax,jmin_,jmax_,ia,ja,c_null_ptr,c_null_ptr,nzin_,c_for_flags)) + ! FIXME: unfinished; missing error handling .. - !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ + !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ if (rscale_) then do i=nzin_+1, nzin_+nz ia(i) = ia(i) - imin + 1 diff --git a/opt/psb_z_rsb_mat_mod.F90 b/opt/psb_z_rsb_mat_mod.F90 index c59e4878..657a06cd 100644 --- a/opt/psb_z_rsb_mat_mod.F90 +++ b/opt/psb_z_rsb_mat_mod.F90 @@ -756,36 +756,36 @@ subroutine psb_z_rsb_csgetptn(imin,imax,a,nz,ia,ja,info,& integer :: nzin_, jmin_, jmax_, err_act, i character(len=20) :: name='csget' logical, parameter :: debug=.false. - PSBRSB_DEBUG('') + PSBRSB_DEBUG('') - if (present(iren).or.present(rscale).or.present(cscale)) then - ! FIXME: error condition - PSBRSB_ERROR("unsupported optional arguments!") - call psb_error() - endif + if (present(iren).or.present(rscale).or.present(cscale)) then + ! FIXME: error condition + PSBRSB_ERROR("unsupported optional arguments!") + call psb_error() + endif - if (present(append)) then - append_ = append - else - append_ = .false. - endif - if (present(append).and.append.and.present(nzin)) then - nzin_ = nzin - else - nzin_ = 0 - endif + if (present(append)) then + append_ = append + else + append_ = .false. + endif + if (present(append).and.append.and.present(nzin)) then + nzin_ = nzin + else + nzin_ = 0 + endif - if (present(jmin)) then - jmin_ = jmin - else - jmin_ = 1 - endif + if (present(jmin)) then + jmin_ = jmin + else + jmin_ = 1 + endif - if (present(jmax)) then - jmax_ = jmax - else - jmax_ = a%get_nrows() - endif + if (present(jmax)) then + jmax_ = jmax + else + jmax_ = a%get_nrows() + endif if (present(rscale)) then rscale_ = rscale @@ -804,34 +804,34 @@ subroutine psb_z_rsb_csgetptn(imin,imax,a,nz,ia,ja,info,& end if if (present(iren)) then info = c_psbrsb_err_ - PSBRSB_ERROR("ERROR: the RSB pattern get needs iren support !!") + PSBRSB_ERROR("ERROR: the RSB pattern get needs iren support !!") goto 9999 end if - !nzt = .. - nz = 0 + !nzt = .. + nz = 0 - call psb_ensure_size(nzin_,ia,info) - if (info == psb_success_) call psb_ensure_size(nzin_,ja,info) + call psb_ensure_size(nzin_,ia,info) + if (info == psb_success_) call psb_ensure_size(nzin_,ja,info) - if (info /= psb_success_) return - nz=rsb_get_block_nnz(a%rsbmptr,imin,imax,jmin_,jmax_,c_for_flags,info) - !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ - ! FIXME: unfinished; missing error handling .. + if (info /= psb_success_) return + nz=rsb_get_block_nnz(a%rsbmptr,imin,imax,jmin_,jmax_,c_for_flags,info) + !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ + ! FIXME: unfinished; missing error handling .. - call psb_ensure_size(nzin_+nz,ia,info) - if (info == psb_success_) call psb_ensure_size(nzin_+nz,ja,info) - if (info /= psb_success_)then - PSBRSB_ERROR("!") - return - endif - - info=d_rsb_to_psb_info(rsb_get_block_sparse_pattern& - &(a%rsbmptr,imin,imax,jmin_,jmax_,ia,ja,c_null_ptr,c_null_ptr,nzin_,c_for_flags)) - ! FIXME: unfinished; missing error handling .. + call psb_ensure_size(nzin_+nz,ia,info) + if (info == psb_success_) call psb_ensure_size(nzin_+nz,ja,info) + if (info /= psb_success_)then + PSBRSB_ERROR("!") + return + endif + + info=d_rsb_to_psb_info(rsb_get_block_sparse_pattern& + &(a%rsbmptr,imin,imax,jmin_,jmax_,ia,ja,c_null_ptr,c_null_ptr,nzin_,c_for_flags)) + ! FIXME: unfinished; missing error handling .. - !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ + !write(*,*) 'debug:',nzin_,nz,imin,imax,jmin_,jmax_ if (rscale_) then do i=nzin_+1, nzin_+nz ia(i) = ia(i) - imin + 1 diff --git a/util/psb_hbio_impl.f90 b/util/psb_hbio_impl.f90 index f6843d62..89de8193 100644 --- a/util/psb_hbio_impl.f90 +++ b/util/psb_hbio_impl.f90 @@ -255,7 +255,7 @@ subroutine shb_write(a,iret,iunit,filename,key,rhs,g,x,mtitle) acpnt => aa - class default + class default call acsc%cp_from_fmt(aa, iret) if (iret /= 0) return