fipy.solvers.petsc package

Submodules

fipy.solvers.petsc.dummySolver module

class fipy.solvers.petsc.dummySolver.DummySolver(*args, **kwargs)

Bases: fipy.solvers.petsc.petscSolver.PETScSolver

Solver that doesn’t do anything.

PETSc is intolerant of having zeros on the diagonal

Create a Solver object.

Parameters
  • tolerance (float) – Required error tolerance.

  • iterations (int) – Maximum number of iterative steps to perform.

  • precon – Preconditioner to use. Not all solver suites support preconditioners.

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.dummySolver'

fipy.solvers.petsc.linearBicgSolver module

class fipy.solvers.petsc.linearBicgSolver.LinearBicgSolver(tolerance=1e-10, iterations=1000, precon=None)

Bases: fipy.solvers.petsc.petscKrylovSolver.PETScKrylovSolver

The LinearBicgSolver is an interface to the biconjugate gradient solver in PETSc, using no preconditioner by default.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.linearBicgSolver'
solver = 'bicg'

fipy.solvers.petsc.linearCGSSolver module

class fipy.solvers.petsc.linearCGSSolver.LinearCGSSolver(tolerance=1e-10, iterations=1000, precon=None)

Bases: fipy.solvers.petsc.petscKrylovSolver.PETScKrylovSolver

The LinearCGSSolver is an interface to the conjugate gradient squared solver in PETSc, using no preconditioner by default.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.linearCGSSolver'
solver = 'cgs'

fipy.solvers.petsc.linearGMRESSolver module

class fipy.solvers.petsc.linearGMRESSolver.LinearGMRESSolver(tolerance=1e-10, iterations=1000, precon=None)

Bases: fipy.solvers.petsc.petscKrylovSolver.PETScKrylovSolver

The LinearGMRESSolver is an interface to the GMRES solver in PETSc, using no preconditioner by default.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.linearGMRESSolver'
solver = 'gmres'

fipy.solvers.petsc.linearLUSolver module

class fipy.solvers.petsc.linearLUSolver.LinearLUSolver(tolerance=1e-10, iterations=10, precon='lu')

Bases: fipy.solvers.petsc.petscSolver.PETScSolver

The LinearLUSolver is an interface to the LU preconditioner in PETSc. A direct solve is performed.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Ignored.

__annotations__ = {}
__init__(tolerance=1e-10, iterations=10, precon='lu')
Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Ignored.

__module__ = 'fipy.solvers.petsc.linearLUSolver'

fipy.solvers.petsc.linearPCGSolver module

class fipy.solvers.petsc.linearPCGSolver.LinearPCGSolver(tolerance=1e-10, iterations=1000, precon=None)

Bases: fipy.solvers.petsc.petscKrylovSolver.PETScKrylovSolver

The LinearPCGSolver is an interface to the cg solver in PETSc, using no preconditioner by default.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.linearPCGSolver'
solver = 'cg'

fipy.solvers.petsc.petscKrylovSolver module

class fipy.solvers.petsc.petscKrylovSolver.PETScKrylovSolver(tolerance=1e-10, iterations=1000, precon=None)

Bases: fipy.solvers.petsc.petscSolver.PETScSolver

Attention

This class is abstract, always create one of its subclasses. It provides the code to call all Krylov solvers from the PETSc package.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__init__(tolerance=1e-10, iterations=1000, precon=None)
Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__module__ = 'fipy.solvers.petsc.petscKrylovSolver'

fipy.solvers.petsc.petscSolver module

class fipy.solvers.petsc.petscSolver.PETScSolver(*args, **kwargs)

Bases: fipy.solvers.solver.Solver

Attention

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

Create a Solver object.

Parameters
  • tolerance (float) – Required error tolerance.

  • iterations (int) – Maximum number of iterative steps to perform.

  • precon – Preconditioner to use. Not all solver suites support preconditioners.

__del__()
__init__(*args, **kwargs)

Create a Solver object.

Parameters
  • tolerance (float) – Required error tolerance.

  • iterations (int) – Maximum number of iterative steps to perform.

  • precon – Preconditioner to use. Not all solver suites support preconditioners.

__module__ = 'fipy.solvers.petsc.petscSolver'

Module contents

fipy.solvers.petsc.DefaultAsymmetricSolver

alias of fipy.solvers.petsc.linearGMRESSolver.LinearGMRESSolver

fipy.solvers.petsc.DefaultSolver

alias of fipy.solvers.petsc.linearGMRESSolver.LinearGMRESSolver

class fipy.solvers.petsc.DummySolver(*args, **kwargs)

Bases: fipy.solvers.petsc.petscSolver.PETScSolver

Solver that doesn’t do anything.

PETSc is intolerant of having zeros on the diagonal

Create a Solver object.

Parameters
  • tolerance (float) – Required error tolerance.

  • iterations (int) – Maximum number of iterative steps to perform.

  • precon – Preconditioner to use. Not all solver suites support preconditioners.

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.dummySolver'
fipy.solvers.petsc.GeneralSolver

alias of fipy.solvers.petsc.linearGMRESSolver.LinearGMRESSolver

class fipy.solvers.petsc.LinearBicgSolver(tolerance=1e-10, iterations=1000, precon=None)

Bases: fipy.solvers.petsc.petscKrylovSolver.PETScKrylovSolver

The LinearBicgSolver is an interface to the biconjugate gradient solver in PETSc, using no preconditioner by default.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.linearBicgSolver'
solver = 'bicg'
class fipy.solvers.petsc.LinearCGSSolver(tolerance=1e-10, iterations=1000, precon=None)

Bases: fipy.solvers.petsc.petscKrylovSolver.PETScKrylovSolver

The LinearCGSSolver is an interface to the conjugate gradient squared solver in PETSc, using no preconditioner by default.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.linearCGSSolver'
solver = 'cgs'
class fipy.solvers.petsc.LinearGMRESSolver(tolerance=1e-10, iterations=1000, precon=None)

Bases: fipy.solvers.petsc.petscKrylovSolver.PETScKrylovSolver

The LinearGMRESSolver is an interface to the GMRES solver in PETSc, using no preconditioner by default.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.linearGMRESSolver'
solver = 'gmres'
class fipy.solvers.petsc.LinearLUSolver(tolerance=1e-10, iterations=10, precon='lu')

Bases: fipy.solvers.petsc.petscSolver.PETScSolver

The LinearLUSolver is an interface to the LU preconditioner in PETSc. A direct solve is performed.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Ignored.

__annotations__ = {}
__init__(tolerance=1e-10, iterations=10, precon='lu')
Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Ignored.

__module__ = 'fipy.solvers.petsc.linearLUSolver'
class fipy.solvers.petsc.LinearPCGSolver(tolerance=1e-10, iterations=1000, precon=None)

Bases: fipy.solvers.petsc.petscKrylovSolver.PETScKrylovSolver

The LinearPCGSolver is an interface to the cg solver in PETSc, using no preconditioner by default.

Parameters
  • tolerance: The required error tolerance.

  • iterations: The maximum number of iterative steps to perform.

  • precon: Preconditioner to use (string).

__annotations__ = {}
__module__ = 'fipy.solvers.petsc.linearPCGSolver'
solver = 'cg'
Last updated on Jan 14, 2021. Created using Sphinx 3.4.3.