fipy.solvers.petsc package

Subpackages

Submodules

fipy.solvers.petsc.dummySolver module

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

Bases: 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.

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

fipy.solvers.petsc.linearBicgSolver module

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

Bases: 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).

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

solver = 'bicg'

fipy.solvers.petsc.linearCGSSolver module

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

Bases: 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).

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

solver = 'cgs'

fipy.solvers.petsc.linearGMRESSolver module

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

Bases: 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).

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

solver = 'gmres'

fipy.solvers.petsc.linearLUSolver module

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

Bases: 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.

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

fipy.solvers.petsc.linearPCGSolver module

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

Bases: 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).

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

solver = 'cg'

fipy.solvers.petsc.petscKrylovSolver module

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

Bases: 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).

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

fipy.solvers.petsc.petscSolver module

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

Bases: 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__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

Module contents

fipy.solvers.petsc.DefaultAsymmetricSolver

alias of LinearGMRESSolver

fipy.solvers.petsc.DefaultSolver

alias of LinearGMRESSolver

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

Bases: 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.

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

fipy.solvers.petsc.GeneralSolver

alias of LinearGMRESSolver

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

Bases: 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).

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

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

Bases: 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).

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

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

Bases: 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).

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

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

Bases: 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.

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

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

Bases: 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).

__del__()
__enter__()
__exit__(exc_type, exc_value, traceback)
__repr__()

Return repr(self).

solver = 'cg'
Last updated on Jun 15, 2022. Created using Sphinx 5.0.1.