added check for rhs = 0 , if rhs = 0 the routine sets x = 0 and returns

This commit is contained in:
ulrikey 1999-05-07 18:25:34 +00:00
parent 4bf083aba1
commit da359d1c62
2 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,7 @@ hypre_GMRESSolve(void *gmres_vdata,
/* initialize first term of hessenberg system */
rs[0] = r_norm;
if (r_norm == 0.0)
if (r_norm == 0.0 || b_norm == 0)
{
hypre_PCGCopyVector(b,x);
ierr = 0;

View File

@ -224,7 +224,7 @@ hypre_GMRESSolve(void *gmres_vdata,
/* initialize first term of hessenberg system */
rs[0] = r_norm;
if (r_norm == 0.0)
if (r_norm == 0.0 || b_norm == 0)
{
hypre_PCGCopyVector(b,x);
ierr = 0;