added check for rhs = 0 , if rhs = 0 the routine sets x = 0 and returns
This commit is contained in:
parent
4bf083aba1
commit
da359d1c62
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user