Bookmark and Share FiPy: A Finite Volume PDE Solver Using Python
Version 3.0.1-dev139-ge5d2233

This Page

Contact

FiPy developers
Jonathan Guyer
Daniel Wheeler
James Warren

Join our mailing list

100 Bureau Drive, M/S 6555
Gaithersburg, MD 20899

301-975-5329 Telephone
301-975-4553 Facsimile

pysparse Package

pysparse Package

fipy.solvers.pysparse.DefaultSolver

alias of LinearPCGSolver

fipy.solvers.pysparse.DummySolver

alias of LinearPCGSolver

fipy.solvers.pysparse.DefaultAsymmetricSolver

alias of LinearLUSolver

fipy.solvers.pysparse.GeneralSolver

alias of LinearLUSolver

class fipy.solvers.pysparse.LinearCGSSolver(precon=None, *args, **kwargs)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearCGSSolver solves a linear system of equations using the conjugate gradient squared method (CGS), a variant of the biconjugate gradient method (BiCG). CGS solves linear systems with a general non-symmetric coefficient matrix.

The LinearCGSSolver is a wrapper class for the the PySparse itsolvers.cgs() method.

Parameters :
  • precon: Preconditioner to use
class fipy.solvers.pysparse.LinearPCGSolver(precon=<fipy.solvers.pysparse.preconditioners.ssorPreconditioner.SsorPreconditioner instance at 0x107c8c638>, *args, **kwargs)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearPCGSolver solves a linear system of equations using the preconditioned conjugate gradient method (PCG) with symmetric successive over-relaxation (SSOR) preconditioning by default. Alternatively, Jacobi preconditioning can be specified through precon. The PCG method solves systems with a symmetric positive definite coefficient matrix.

The LinearPCGSolver is a wrapper class for the the PySparse itsolvers.pcg() and precon.ssor() methods.

Parameters :
  • precon: Preconditioner to use
class fipy.solvers.pysparse.LinearGMRESSolver(precon=<fipy.solvers.pysparse.preconditioners.jacobiPreconditioner.JacobiPreconditioner instance at 0x107c8c7e8>, *args, **kwargs)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearGMRESSolver solves a linear system of equations using the generalised minimal residual method (GMRES) with Jacobi preconditioning. GMRES solves systems with a general non-symmetric coefficient matrix.

The LinearGMRESSolver is a wrapper class for the the PySparse itsolvers.gmres() and precon.jacobi() methods.

Parameters :
  • precon: Preconditioner to use
class fipy.solvers.pysparse.LinearLUSolver(tolerance=1e-10, iterations=10, maxIterations=10, precon=None)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearLUSolver solves a linear system of equations using LU-factorisation. This method solves systems with a general non-symmetric coefficient matrix using partial pivoting.

The LinearLUSolver is a wrapper class for the the PySparse superlu.factorize() method.

Creates a LinearLUSolver.

Parameters :
  • tolerance: The required error tolerance.
  • iterations: The number of LU decompositions to perform. For large systems a number of iterations is generally required.
  • precon: not used but maintains a common interface.
class fipy.solvers.pysparse.LinearJORSolver(tolerance=1e-10, iterations=1000, relaxation=1.0)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearJORSolver solves a linear system of equations using Jacobi over-relaxation. This method solves systems with a general non-symmetric coefficient matrix.

The Solver class should not be invoked directly.

Parameters :
  • tolerance: The required error tolerance.
  • iterations: The maximum number of iterative steps to perform.
  • relaxation: The relaxation.
class fipy.solvers.pysparse.JacobiPreconditioner

Bases: fipy.solvers.pysparse.preconditioners.preconditioner.Preconditioner

Jacobi preconditioner for PySparse. Really just a wrapper class for pysparse.precon.jacobi.

Create a Preconditioner object.

class fipy.solvers.pysparse.SsorPreconditioner

Bases: fipy.solvers.pysparse.preconditioners.preconditioner.Preconditioner

SSOR preconditioner for PySparse. Really just a wrapper class for pysparse.precon.jacobi.

Create a Preconditioner object.

linearCGSSolver Module

class fipy.solvers.pysparse.linearCGSSolver.LinearCGSSolver(precon=None, *args, **kwargs)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearCGSSolver solves a linear system of equations using the conjugate gradient squared method (CGS), a variant of the biconjugate gradient method (BiCG). CGS solves linear systems with a general non-symmetric coefficient matrix.

The LinearCGSSolver is a wrapper class for the the PySparse itsolvers.cgs() method.

Parameters :
  • precon: Preconditioner to use

linearGMRESSolver Module

class fipy.solvers.pysparse.linearGMRESSolver.LinearGMRESSolver(precon=<fipy.solvers.pysparse.preconditioners.jacobiPreconditioner.JacobiPreconditioner instance at 0x107c8c7e8>, *args, **kwargs)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearGMRESSolver solves a linear system of equations using the generalised minimal residual method (GMRES) with Jacobi preconditioning. GMRES solves systems with a general non-symmetric coefficient matrix.

The LinearGMRESSolver is a wrapper class for the the PySparse itsolvers.gmres() and precon.jacobi() methods.

Parameters :
  • precon: Preconditioner to use

linearJORSolver Module

class fipy.solvers.pysparse.linearJORSolver.LinearJORSolver(tolerance=1e-10, iterations=1000, relaxation=1.0)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearJORSolver solves a linear system of equations using Jacobi over-relaxation. This method solves systems with a general non-symmetric coefficient matrix.

The Solver class should not be invoked directly.

Parameters :
  • tolerance: The required error tolerance.
  • iterations: The maximum number of iterative steps to perform.
  • relaxation: The relaxation.

linearLUSolver Module

class fipy.solvers.pysparse.linearLUSolver.LinearLUSolver(tolerance=1e-10, iterations=10, maxIterations=10, precon=None)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearLUSolver solves a linear system of equations using LU-factorisation. This method solves systems with a general non-symmetric coefficient matrix using partial pivoting.

The LinearLUSolver is a wrapper class for the the PySparse superlu.factorize() method.

Creates a LinearLUSolver.

Parameters :
  • tolerance: The required error tolerance.
  • iterations: The number of LU decompositions to perform. For large systems a number of iterations is generally required.
  • precon: not used but maintains a common interface.

linearPCGSolver Module

class fipy.solvers.pysparse.linearPCGSolver.LinearPCGSolver(precon=<fipy.solvers.pysparse.preconditioners.ssorPreconditioner.SsorPreconditioner instance at 0x107c8c638>, *args, **kwargs)

Bases: fipy.solvers.pysparse.pysparseSolver.PysparseSolver

The LinearPCGSolver solves a linear system of equations using the preconditioned conjugate gradient method (PCG) with symmetric successive over-relaxation (SSOR) preconditioning by default. Alternatively, Jacobi preconditioning can be specified through precon. The PCG method solves systems with a symmetric positive definite coefficient matrix.

The LinearPCGSolver is a wrapper class for the the PySparse itsolvers.pcg() and precon.ssor() methods.

Parameters :
  • precon: Preconditioner to use

pysparseSolver Module

class fipy.solvers.pysparse.pysparseSolver.PysparseSolver(*args, **kwargs)

Bases: fipy.solvers.pysparseMatrixSolver._PysparseMatrixSolver

The base pysparseSolver class.

Attention

This class is abstract. Always create one of its subclasses.