On Mon, Sep 2, 2013 at 5:42 PM, Jose David Bermeol <[email protected]>wrote:
> Hi, right now I'm trying to extend Petsc to be able to solve linear system > of equations(Ax = b) using Pardiso for LU decomposition. So I have a couple > of questions: > > 1. What is the difference between the methods MatSolve and KSPSolve. And > in which context should I use each? > KSPSolve gives an approximate solution to a linear system, MatSolve applies the action of the inverse of a linear operator. Obviously, the latter is a special case of the former. > 2. Should I extend the KSP interface or the Mat interface, or what factors > I have to take into account to make my decision?. > Mat. You can look at the existing implementations for SuperLU, MUMPS, CHOLMOD, etc. For example, https://bitbucket.org/petsc/petsc/src/716d05691c0666f2035d7b0ccb9332de1aca83df/src/mat/impls/aij/seq/superlu?at=master Thanks, Matt > For now that would be all. > > Thanks > > > > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
