From 64604ec07539dc41171aad0a97976977d71d5e78 Mon Sep 17 00:00:00 2001 From: adam-sim-dev <76020022+adam-sim-dev@users.noreply.github.com> Date: Sat, 24 Jun 2023 20:47:02 +0800 Subject: [PATCH] Fix typo in krylov solvers comments (#938) --- src/krylov/bicgstab.c | 4 ++-- src/krylov/cgnr.c | 6 +++--- src/krylov/cogmres.c | 4 ++-- src/krylov/flexgmres.c | 4 ++-- src/krylov/gmres.c | 4 ++-- src/krylov/lgmres.c | 4 ++-- src/krylov/pcg.c | 4 ++-- src/parcsr_ls/par_amg_solve.c | 2 +- src/parcsr_ls/par_amgdd_solve.c | 2 +- src/parcsr_ls/par_ilu_solve.c | 4 ++-- src/parcsr_ls/par_mgr_solve.c | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/krylov/bicgstab.c b/src/krylov/bicgstab.c index f1c0e327e..42c5efc71 100644 --- a/src/krylov/bicgstab.c +++ b/src/krylov/bicgstab.c @@ -295,7 +295,7 @@ hypre_BiCGSTABSolve(void *bicgstab_vdata, b_norm = hypre_sqrt((*(bicgstab_functions->InnerProd))(b, b)); - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (b_norm != 0.) { ieee_check = b_norm / b_norm; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) @@ -323,7 +323,7 @@ hypre_BiCGSTABSolve(void *bicgstab_vdata, r_norm = hypre_sqrt(res); r_norm_0 = r_norm; - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (r_norm != 0.) { ieee_check = r_norm / r_norm; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) diff --git a/src/krylov/cgnr.c b/src/krylov/cgnr.c index af9ae13a0..d8944ca3a 100644 --- a/src/krylov/cgnr.c +++ b/src/krylov/cgnr.c @@ -237,7 +237,7 @@ hypre_CGNRSolve(void *cgnr_vdata, /* compute eps */ bi_prod = (*(cgnr_functions->InnerProd))(b, b); - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (bi_prod != 0.) { ieee_check = bi_prod / bi_prod; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) @@ -294,7 +294,7 @@ hypre_CGNRSolve(void *cgnr_vdata, { norms[0] = hypre_sqrt((*(cgnr_functions->InnerProd))(r, r)); - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (norms[0] != 0.) { ieee_check = norms[0] / norms[0]; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) @@ -330,7 +330,7 @@ hypre_CGNRSolve(void *cgnr_vdata, /* gamma = */ gamma = (*(cgnr_functions->InnerProd))(t, t); - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (gamma != 0.) { ieee_check = gamma / gamma; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) diff --git a/src/krylov/cogmres.c b/src/krylov/cogmres.c index 8e1718f2a..7c3db39cd 100644 --- a/src/krylov/cogmres.c +++ b/src/krylov/cogmres.c @@ -373,7 +373,7 @@ hypre_COGMRESSolve(void *cogmres_vdata, b_norm = hypre_sqrt((*(cogmres_functions->InnerProd))(b, b)); real_r_norm_old = b_norm; - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (b_norm != 0.) { ieee_check = b_norm / b_norm; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) @@ -400,7 +400,7 @@ hypre_COGMRESSolve(void *cogmres_vdata, r_norm = hypre_sqrt((*(cogmres_functions->InnerProd))(p[0], p[0])); r_norm_0 = r_norm; - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (r_norm != 0.) { ieee_check = r_norm / r_norm; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) diff --git a/src/krylov/flexgmres.c b/src/krylov/flexgmres.c index afe62086a..4e015ca81 100644 --- a/src/krylov/flexgmres.c +++ b/src/krylov/flexgmres.c @@ -376,7 +376,7 @@ hypre_FlexGMRESSolve(void *fgmres_vdata, b_norm = hypre_sqrt((*(fgmres_functions->InnerProd))(b, b)); - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (b_norm != 0.) { ieee_check = b_norm / b_norm; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) @@ -403,7 +403,7 @@ hypre_FlexGMRESSolve(void *fgmres_vdata, r_norm = hypre_sqrt((*(fgmres_functions->InnerProd))(p[0], p[0])); r_norm_0 = r_norm; - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (r_norm != 0.) { ieee_check = r_norm / r_norm; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) diff --git a/src/krylov/gmres.c b/src/krylov/gmres.c index d85cacf7c..f5837bd85 100644 --- a/src/krylov/gmres.c +++ b/src/krylov/gmres.c @@ -364,7 +364,7 @@ hypre_GMRESSolve(void *gmres_vdata, b_norm = hypre_sqrt((*(gmres_functions->InnerProd))(b, b)); real_r_norm_old = b_norm; - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (b_norm != 0.) { @@ -394,7 +394,7 @@ hypre_GMRESSolve(void *gmres_vdata, r_norm = hypre_sqrt((*(gmres_functions->InnerProd))(p[0], p[0])); r_norm_0 = r_norm; - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (r_norm != 0.) { diff --git a/src/krylov/lgmres.c b/src/krylov/lgmres.c index 8e9e05129..3ae5fad4a 100644 --- a/src/krylov/lgmres.c +++ b/src/krylov/lgmres.c @@ -417,7 +417,7 @@ hypre_LGMRESSolve(void *lgmres_vdata, b_norm = hypre_sqrt((*(lgmres_functions->InnerProd))(b, b)); - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (b_norm != 0.) { ieee_check = b_norm / b_norm; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) @@ -444,7 +444,7 @@ hypre_LGMRESSolve(void *lgmres_vdata, r_norm = hypre_sqrt((*(lgmres_functions->InnerProd))(p[0], p[0])); r_norm_0 = r_norm; - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (r_norm != 0.) { ieee_check = r_norm / r_norm; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) diff --git a/src/krylov/pcg.c b/src/krylov/pcg.c index 68655423e..4fb24d301 100644 --- a/src/krylov/pcg.c +++ b/src/krylov/pcg.c @@ -375,7 +375,7 @@ hypre_PCGSolve( void *pcg_vdata, } }; - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (bi_prod != 0.) { ieee_check = bi_prod / bi_prod; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) @@ -453,7 +453,7 @@ hypre_PCGSolve( void *pcg_vdata, /* gamma = */ gamma = (*(pcg_functions->InnerProd))(r, p); - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (gamma != 0.) { ieee_check = gamma / gamma; } /* INF -> NaN conversion */ if (ieee_check != ieee_check) diff --git a/src/parcsr_ls/par_amg_solve.c b/src/parcsr_ls/par_amg_solve.c index 884949b47..5d8dbe09c 100644 --- a/src/parcsr_ls/par_amg_solve.c +++ b/src/parcsr_ls/par_amg_solve.c @@ -188,7 +188,7 @@ hypre_BoomerAMGSolve( void *amg_vdata, resid_nrm = hypre_sqrt(hypre_ParVectorInnerProd(Vtemp, Vtemp)); } - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (resid_nrm != 0.) { diff --git a/src/parcsr_ls/par_amgdd_solve.c b/src/parcsr_ls/par_amgdd_solve.c index 9d24d3294..0af33b34b 100644 --- a/src/parcsr_ls/par_amgdd_solve.c +++ b/src/parcsr_ls/par_amgdd_solve.c @@ -135,7 +135,7 @@ hypre_BoomerAMGDDSolve( void *amgdd_vdata, resid_nrm = hypre_sqrt(hypre_ParVectorInnerProd(Vtemp, Vtemp)); } - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (resid_nrm != 0.) { diff --git a/src/parcsr_ls/par_ilu_solve.c b/src/parcsr_ls/par_ilu_solve.c index 0ff517bdf..80b0c7d4f 100644 --- a/src/parcsr_ls/par_ilu_solve.c +++ b/src/parcsr_ls/par_ilu_solve.c @@ -172,7 +172,7 @@ hypre_ILUSolve( void *ilu_vdata, resnorm = hypre_sqrt(hypre_ParVectorInnerProd(Ftemp, Ftemp)); } - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (resnorm != 0.) { @@ -1578,7 +1578,7 @@ hypre_NSHSolve( void *nsh_vdata, resnorm = hypre_sqrt(hypre_ParVectorInnerProd(Ftemp, Ftemp)); } - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag and notify users when they supply bad input. */ if (resnorm != 0.) { diff --git a/src/parcsr_ls/par_mgr_solve.c b/src/parcsr_ls/par_mgr_solve.c index 455a4128f..450274927 100644 --- a/src/parcsr_ls/par_mgr_solve.c +++ b/src/parcsr_ls/par_mgr_solve.c @@ -144,7 +144,7 @@ hypre_MGRSolve( void *mgr_vdata, resnorm = hypre_sqrt(hypre_ParVectorInnerProd(Vtemp, Vtemp)); } - /* Since it is does not diminish performance, attempt to return an error flag + /* Since it does not diminish performance, attempt to return an error flag * and notify users when they supply bad input. */ if (resnorm != 0.) {