darsia.BeckmannCGSolver#
- class BeckmannCGSolver(amg_options, linear_solver_options)[source]#
Bases:
BeckmannLinearSolverMethods
setup(matrix)Setup an CG solver with AMG preconditioner for the given matrix.
Attributes
dict: options for the AMG solver
dict: options for the iterative linear solver
Initialize CG solver with AMG preconditioner.
- setup(matrix)[source]#
Setup an CG solver with AMG preconditioner for the given matrix.
- Parameters:
- matrix
sps.csc_matrix Matrix.
- matrix
Notes
Sets up the AMG solver (
pyamg) and a dict of AMG solver options.
- amg_options#
dict: options for the AMG solver
- linear_solver#
Initialize CG solver with AMG preconditioner.
- solver_options#
dict: options for the iterative linear solver