this class defines the solver options for a linear or non-linear
solver.
The option also supports the handling of diagnostic informations.
opts=SolverOptions() print opts opts.resetDiagnostics() u=solver(opts)
print "number of iteration steps:
=",opts.getDiagnostics("num_iter")
|
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
|
|
|
|
|
|
|
|
bool
|
acceptConvergenceFailure(self)
Returns True if a failure to meet the stopping criteria
within the given number of iteration steps is not raising in
exception. |
|
|
bool
|
adaptInnerTolerance(self)
Returns True if the tolerance of the inner solver is
selected automatically. |
|
|
float
|
getAbsoluteTolerance(self)
Returns the absolute tolerance for the solver |
|
|
in the list SolverOptions.DEFAULT, SolverOptions.YAIR_SHAPIRA_COARSENING, SolverOptions.RUGE_STUEBEN_COARSENING, SolverOptions.AGGREGATION_COARSENING
|
getCoarsening(self)
Returns the key of the coarsening algorithm to be applied AMG. |
|
|
float
|
getCoarseningThreshold(self)
Returns the threshold for coarsening in the algebraic multi level
solver or preconditioner |
|
|
|
|
float
|
getDropStorage(self)
Returns the maximum allowed increase in storage for ILUT |
|
|
float
|
getDropTolerance(self)
Returns the relative drop tolerance in ILUT |
|
|
int
|
getInnerIterMax(self)
Returns maximum number of inner iteration steps |
|
|
float
|
getInnerTolerance(self)
Returns the relative tolerance for an inner iteration scheme |
|
|
int
|
getIterMax(self)
Returns maximum number of iteration steps |
|
|
int
|
getLevelMax(self)
Returns the maximum number of coarsening levels to be used in an
algebraic multi level solver or preconditioner |
|
|
int
|
getMinCoarseMatrixSize(self)
Returns the minumum size of the coarsest level matrix in AMG. |
|
|
|
getName(self,
key)
returns the name of a given key |
|
|
int
|
getNumPostSweeps(self)
Returns he number of sweeps in the post-smoothing step of a multi
level solver or preconditioner |
|
|
int
|
getNumPreSweeps(self)
Returns he number of sweeps in the pre-smoothing step of a multi
level solver or preconditioner |
|
|
int
|
getNumSweeps(self)
Returns the number of sweeps in a Jacobi or Gauss-Seidel/SOR
preconditioner. |
|
|
in the list SolverOptions.DEFAULT, SolverOptions.PASO, SolverOptions.SUPER_LU, SolverOptions.PASTIX, SolverOptions.MKL, SolverOptions.UMFPACK, SolverOptions.TRILINOS
|
getPackage(self)
Returns the solver package key |
|
|
in the list SolverOptions.SSOR, SolverOptions.ILU0, SolverOptions.ILUT, SolverOptions.JACOBI, SolverOptions.AMG, SolverOptions.REC_ILU, SolverOptions.GAUSS_SEIDEL, SolverOptions.RILU, SolverOptions.NO_PRECONDITIONER
|
getPreconditioner(self)
Returns key of the preconditioner to be used. |
|
|
float
|
getRelaxationFactor(self)
Returns the relaxation factor used to add dropped elements in RILU to
the main diagonal. |
|
|
in the list SolverOptions.NO_REORDERING, SolverOptions.NO_REORDERING, SolverOptions.NO_REORDERING, SolverOptions.DEFAULT_REORDERING
|
getReordering(self)
Returns the key of the reordering method to be applied if supported
by the solver. |
|
|
int or None
|
getRestart(self)
Returns the number of iterations steps after which GMRES is
performing a restart. |
|
|
in the list SolverOptions.DEFAULT, SolverOptions.DIRECT, SolverOptions.CHOLEVSKY, SolverOptions.PCG, SolverOptions.CR, SolverOptions.CGS, SolverOptions.BICGSTAB, SolverOptions.SSOR, SolverOptions.GMRES, SolverOptions.PRES20, SolverOptions.LUMPING, SolverOptions.ITERATIVE, SolverOptions.AMG, SolverOptions.NONLINEAR_GMRES, SolverOptions.TFQMR, SolverOptions.MINRES, SolverOptions.GAUSS_SEIDEL
|
getSolverMethod(self)
Returns key of the solver method to be used. |
|
|
|
getSummary(self)
Returns a string reporting the current settings |
|
|
float
|
getTolerance(self)
Returns the relative tolerance for the solver |
|
|
int
|
getTruncation(self)
Returns the number of residuals in GMRES to be stored for
orthogonalization |
|
|
|
hasConverged(self)
Returns True if the last solver call has been finalized
successfully. |
|
|
bool
|
isSymmetric(self)
Checks if symmetry of the coefficient matrix is indicated. |
|
|
bool
|
isVerbose(self)
Returns True if the solver is expected to be verbose. |
|
|
|
|
|
|
|
|
|
setAcceptanceConvergenceFailureOff(self)
Switches the acceptance of a failure of convergence off. |
|
|
|
setAcceptanceConvergenceFailureOn(self)
Switches the acceptance of a failure of convergence on |
|
|
|
setCoarsening(self,
method=0)
Sets the key of the coarsening method to be applied in AMG. |
|
|
|
setCoarseningThreshold(self,
theta=0.05)
Sets the threshold for coarsening in the algebraic multi level solver
or preconditioner |
|
|
|
setDropStorage(self,
storage=2.0)
Sets the maximum allowed increase in storage for ILUT. |
|
|
|
|
|
setInnerIterMax(self,
iter_max=10)
Sets the maximum number of iteration steps for the inner iteration. |
|
|
|
setInnerTolerance(self,
rtol=0.9)
Sets the relative tolerance for an inner iteration scheme for instance
on the coarsest level in a multi-level scheme. |
|
|
|
|
|
setInnerToleranceAdaptionOff(self)
Switches the automatic selection of inner tolerance off. |
|
|
|
setInnerToleranceAdaptionOn(self)
Switches the automatic selection of inner tolerance on |
|
|
|
setIterMax(self,
iter_max=100000)
Sets the maximum number of iteration steps |
|
|
|
setLevelMax(self,
level_max=10)
Sets the maximum number of coarsening levels to be used in an
algebraic multi level solver or preconditioner |
|
|
|
|
|
setNumPostSweeps(self,
sweeps=2)
Sets the number of sweeps in the post-smoothing step of a multi level
solver or preconditioner |
|
|
|
setNumPreSweeps(self,
sweeps=2)
Sets the number of sweeps in the pre-smoothing step of a multi level
solver or preconditioner |
|
|
|
setNumSweeps(self,
sweeps=2)
Sets the number of sweeps in a Jacobi or Gauss-Seidel/SOR
preconditioner. |
|
|
|
setPackage(self,
package=0)
Sets the solver package to be used as a solver. |
|
|
|
|
|
setRelaxationFactor(self,
factor=0.3)
Sets the relaxation factor used to add dropped elements in RILU to
the main diagonal. |
|
|
|
setReordering(self,
ordering=30)
Sets the key of the reordering method to be applied if supported by
the solver. |
|
|
|
setRestart(self,
restart=None)
Sets the number of iterations steps after which GMRES is performing a
restart. |
|
|
|
|
|
setSymmetry(self,
flag=False)
Sets the symmetry flag for the coefficient matrix to
flag . |
|
|
|
setSymmetryOff(self)
Clears the symmetry flag for the coefficient matrix. |
|
|
|
setSymmetryOn(self)
Sets the symmetry flag to indicate that the coefficient matrix is
symmetric. |
|
|
|
setTolerance(self,
rtol=1e-08)
Sets the relative tolerance for the solver |
|
|
|
setTruncation(self,
truncation=20)
Sets the number of residuals in GMRES to be stored for
orthogonalization. |
|
|
|
setVerbosity(self,
verbose=False)
Sets the verbosity flag for the solver to flag . |
|
|
|
setVerbosityOff(self)
Switches the verbosity of the solver off. |
|
|
|
setVerbosityOn(self)
Switches the verbosity of the solver on. |
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__
|
|
AGGREGATION_COARSENING = 35
AMG coarsening using (symmetric) aggregation
|
|
AMG = 22
Algebraic Multi Grid
|
|
BICGSTAB = 6
The stabilized Bi-Conjugate Gradient method
|
|
CGS = 5
The conjugate gradient square method
|
|
CHOLEVSKY = 2
The direct solver based on LDLt factorization (can only be applied
for symmetric PDEs)
|
|
CR = 4
The conjugate residual method
|
|
DEFAULT = 0
The default method used to solve the system of linear equations
|
|
DEFAULT_REORDERING = 30
the reordering method recommended by the solver
|
|
DIRECT = 1
The direct solver based on LDU factorization
|
|
GAUSS_SEIDEL = 28
Gauss-Seidel solver
|
|
GMRES = 11
The Gram-Schmidt minimum residual method
|
|
ILU0 = 8
The incomplete LU factorization preconditioner with no fill-in
|
|
ILUT = 9
The incomplete LU factorization preconditioner with fill-in
|
|
ITERATIVE = 20
The default iterative solver
|
|
JACOBI = 10
The Jacobi preconditioner
|
|
LUMPING = 13
Matrix lumping
|
|
MINIMUM_FILL_IN = 18
Reorder matrix to reduce fill-in during factorization
|
|
MINRES = 27
Minimum residual method
|
|
MIN_COARSE_MATRIX_SIZE = 37
minimum size of the coarsest level matrix to use direct solver.
|
|
MKL = 15
Intel's MKL solver library
|
|
NESTED_DISSECTION = 19
Reorder matrix to improve load balancing during factorization
|
|
NONLINEAR_GMRES = 25
|
|
NO_PRECONDITIONER = 36
no preconditioner is applied.
|
|
NO_REORDERING = 17
No matrix reordering allowed
|
|
PASO = 21
PASO solver package
|
|
PASTIX = 32
the Pastix direct solver_package
|
|
PCG = 3
The preconditioned conjugate gradient method (can only be applied for
symmetric PDEs)
|
|
PRES20 = 12
Special GMRES with restart after 20 steps and truncation after 5
residuals
|
|
REC_ILU = 23
recursive ILU0
|
|
RILU = 29
relaxed ILU0
|
|
RUGE_STUEBEN_COARSENING = 34
AMG coarsening method by Ruge and Stueben
|
|
SCSL
SGI SCSL solver library
|
|
SSOR = 7
The symmetric over-relaxation method
|
|
SUPER_LU = 31
the Super_LU solver package
|
|
TFQMR = 26
Transport Free Quasi Minimal Residual method
|
|
TRILINOS = 24
The TRILINOS parallel solver class library from Sandia National Labs
|
|
UMFPACK = 16
The UMFPACK library
|
|
YAIR_SHAPIRA_COARSENING = 33
AMG coarsening method by Yair-Shapira
|