about MatSolve() and KSP

Yujie recrusader at gmail.com
Tue Jan 27 11:43:22 CST 2009

Dear PETSc Developers:

I have checked the differerence between 2.3.3 and 3.0.0 in using external

Now, we don't need to use Matconvert() to convert the matrix to the type
suitable for external package, just to use MatGetFactor().

The following codes are the realization of MatSolveXXX() after calling

53: MatFactorInfoInitialize(&info);

 55: MatLUFactorSymbolic(A,C,row,col,&info);
 56: MatLUFactorNumeric(A,C,&info);

 57: MatSolveTranspose(A,b,x);

I have checked the description to MatSolveXXX() or MatMatSolve().

Most users should employ the simplified KSP interface for linear solvers
instead of working directly with matrix algebra routines such as this. See,
e.g., KSPCreate()."

You advise to use KSP interface for calling MatSolveXXX(). I am wondering if
it is ok to directly call MatSolveXX(), why need KSP interface? thanks a


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090127/45250db3/attachment.htm>

More information about the petsc-users mailing list