fipy.solvers.petsc package¶
- fipy.solvers.petsc.DefaultAsymmetricSolver¶
alias of
LinearGMRESSolver
- fipy.solvers.petsc.DefaultSolver¶
alias of
LinearGMRESSolver
- class fipy.solvers.petsc.DummySolver(*args, **kwargs)¶
Bases:
PETScSolverSolver 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:
PETScKrylovSolverThe 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:
PETScKrylovSolverThe 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:
PETScKrylovSolverThe 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:
PETScSolverThe 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:
PETScKrylovSolverThe 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'¶
Subpackages¶
- fipy.solvers.petsc.comms package
- Submodules
- fipy.solvers.petsc.comms.parallelPETScCommWrapper module
ParallelPETScCommWrapperParallelPETScCommWrapper.Barrier()ParallelPETScCommWrapper.MaxAll()ParallelPETScCommWrapper.MinAll()ParallelPETScCommWrapper.Norm2()ParallelPETScCommWrapper.NprocParallelPETScCommWrapper.__getstate__()ParallelPETScCommWrapper.__repr__()ParallelPETScCommWrapper.__setstate__()ParallelPETScCommWrapper.all()ParallelPETScCommWrapper.allclose()ParallelPETScCommWrapper.allequal()ParallelPETScCommWrapper.allgather()ParallelPETScCommWrapper.any()ParallelPETScCommWrapper.bcast()ParallelPETScCommWrapper.mpi4py_commParallelPETScCommWrapper.procIDParallelPETScCommWrapper.sum()
- fipy.solvers.petsc.comms.petscCommWrapper module
PETScCommWrapperPETScCommWrapper.Barrier()PETScCommWrapper.MaxAll()PETScCommWrapper.MinAll()PETScCommWrapper.Norm2()PETScCommWrapper.NprocPETScCommWrapper.__getstate__()PETScCommWrapper.__repr__()PETScCommWrapper.__setstate__()PETScCommWrapper.all()PETScCommWrapper.allclose()PETScCommWrapper.allequal()PETScCommWrapper.allgather()PETScCommWrapper.any()PETScCommWrapper.bcast()PETScCommWrapper.mpi4py_commPETScCommWrapper.procIDPETScCommWrapper.sum()
- fipy.solvers.petsc.comms.serialPETScCommWrapper module
SerialPETScCommWrapperSerialPETScCommWrapper.Barrier()SerialPETScCommWrapper.MaxAll()SerialPETScCommWrapper.MinAll()SerialPETScCommWrapper.Norm2()SerialPETScCommWrapper.NprocSerialPETScCommWrapper.__getstate__()SerialPETScCommWrapper.__repr__()SerialPETScCommWrapper.__setstate__()SerialPETScCommWrapper.all()SerialPETScCommWrapper.allclose()SerialPETScCommWrapper.allequal()SerialPETScCommWrapper.allgather()SerialPETScCommWrapper.any()SerialPETScCommWrapper.bcast()SerialPETScCommWrapper.mpi4py_commSerialPETScCommWrapper.procIDSerialPETScCommWrapper.sum()
Submodules¶
fipy.solvers.petsc.dummySolver module¶
- class fipy.solvers.petsc.dummySolver.DummySolver(*args, **kwargs)¶
Bases:
PETScSolverSolver 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:
PETScKrylovSolverThe 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:
PETScKrylovSolverThe 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:
PETScKrylovSolverThe 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:
PETScSolverThe 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:
PETScKrylovSolverThe 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:
PETScSolverAttention
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