PETScLinearSolver#

class PETScLinearSolver(tol=1e-08, maxiter=1000)[source]#

Solves the sparse linear system Ax = b using petsc solvers.

Notes

Parallel computing is supported and matrix partitioning over the available cores is automatically handled by running:

$ mpirun -np num_cores python script.py

where num_cores must be substituted with the number of cores.

Methods

solve(A, b[, x0, solver_type, precondioner, ...])

Solves and returns the solution to the linear system, Ax = b.