fipy.solvers.petsc package¶
Subpackages¶
- fipy.solvers.petsc.comms package
- Submodules
- fipy.solvers.petsc.comms.parallelPETScCommWrapper module
ParallelPETScCommWrapper
ParallelPETScCommWrapper.Barrier()
ParallelPETScCommWrapper.MaxAll()
ParallelPETScCommWrapper.MinAll()
ParallelPETScCommWrapper.Norm2()
ParallelPETScCommWrapper.Nproc
ParallelPETScCommWrapper.__getstate__()
ParallelPETScCommWrapper.__repr__()
ParallelPETScCommWrapper.__setstate__()
ParallelPETScCommWrapper.all()
ParallelPETScCommWrapper.allclose()
ParallelPETScCommWrapper.allequal()
ParallelPETScCommWrapper.allgather()
ParallelPETScCommWrapper.any()
ParallelPETScCommWrapper.bcast()
ParallelPETScCommWrapper.mpi4py_comm
ParallelPETScCommWrapper.procID
ParallelPETScCommWrapper.sum()
- fipy.solvers.petsc.comms.petscCommWrapper module
PETScCommWrapper
PETScCommWrapper.Barrier()
PETScCommWrapper.MaxAll()
PETScCommWrapper.MinAll()
PETScCommWrapper.Norm2()
PETScCommWrapper.Nproc
PETScCommWrapper.__getstate__()
PETScCommWrapper.__repr__()
PETScCommWrapper.__setstate__()
PETScCommWrapper.all()
PETScCommWrapper.allclose()
PETScCommWrapper.allequal()
PETScCommWrapper.allgather()
PETScCommWrapper.any()
PETScCommWrapper.bcast()
PETScCommWrapper.mpi4py_comm
PETScCommWrapper.procID
PETScCommWrapper.sum()
- fipy.solvers.petsc.comms.serialPETScCommWrapper module
SerialPETScCommWrapper
SerialPETScCommWrapper.Barrier()
SerialPETScCommWrapper.MaxAll()
SerialPETScCommWrapper.MinAll()
SerialPETScCommWrapper.Norm2()
SerialPETScCommWrapper.Nproc
SerialPETScCommWrapper.__getstate__()
SerialPETScCommWrapper.__repr__()
SerialPETScCommWrapper.__setstate__()
SerialPETScCommWrapper.all()
SerialPETScCommWrapper.allclose()
SerialPETScCommWrapper.allequal()
SerialPETScCommWrapper.allgather()
SerialPETScCommWrapper.any()
SerialPETScCommWrapper.bcast()
SerialPETScCommWrapper.mpi4py_comm
SerialPETScCommWrapper.procID
SerialPETScCommWrapper.sum()
- Module contents
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:
- __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¶
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:
- __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'¶