how to resolve linear equations of system

Barry Smith bsmith at mcs.anl.gov
Wed Jun 25 16:53:16 CDT 2008


On Jun 25, 2008, at 4:29 PM, enjoywm at cs.wm.edu wrote:

> Hi,
> I have a linear equations of system such as Kx=u.
> 1. If K is singular, can I use KSPSolve to solve it?

    If you know the null space of K you may be able to use the PETSc  
iterative solvers.
If K is rectangular then likely you would not benefit from using PETSc

If your linear systems are sparse and less than 50 to 100,000 unknowns  
then I recommend
using Matlab for your computations. The learning curve for PETSc means  
it
is reserved for problems so large that simpler techniques/packages do  
not work.

>
> 2. If K is non-singular I also can use x= inverse(K)u to do it.

    Suggest you read a good book on Iterative methods for linear  
systems like
by Saad.

   Barry


>
> Which one is better?
>
> Best,
> Yixun
>




More information about the petsc-users mailing list