[petsc-users] Expecting zeros in solution when A_{I, I} != 0 A_{I, J} = 0. where I!=J and B_I = 0.

Barry Smith bsmith at mcs.anl.gov
Sat Oct 27 18:07:15 CDT 2012



   PETSc, by default, using iterative solvers which only solve the problem within a certain accuracy. You can control this accuracy by using -ksp_rtol tol   where for example you could pick tol = 1.0e-12   You can also use a direct solver 
-pc_type lu   Run with -ksp_monitor_true_residual -ksp_converged_reason to see if the linear solver is solving to the requested accuracy.

   Barry

On Oct 27, 2012, at 3:46 PM, Chung-Kan Huang <ckhuangf at gmail.com> wrote:

> Hi,
> 
> I am solving a linear system A * X = B that sometime contains A_{I,I} != 0 A_{I,J} = 0. where I!=J and B_I = 0. so I would expect X_i to be perfect zero not some tiny small value. The same linear system is solved by other solvers but they gave zero for aforementioned situation even the system is fair large to our applications. I have tried several configurations in PETSc hoping that problem can be solved but all attempts failed. I wonder if someone can give me some pointers that help to solve this issue. Thanks,
> 
> Chung-Kan
> 
> 
> 
> -- 
> Cheers
> 
> 



More information about the petsc-users mailing list