no.uib.cipr.matrix.sparse
Class MatrixIterationMonitor
java.lang.Object
no.uib.cipr.matrix.sparse.AbstractIterationMonitor
no.uib.cipr.matrix.sparse.DefaultIterationMonitor
no.uib.cipr.matrix.sparse.MatrixIterationMonitor
- All Implemented Interfaces:
- IterationMonitor
public class MatrixIterationMonitor
- extends DefaultIterationMonitor
Iteration monitor based on matrix norms. Extends the default linear iteration
object to compare with the norm of the system matrix and the right hand side.
Can often be a better convergence criteria than the default, but requires the
computation of the matrix norm.
Constructor Summary |
MatrixIterationMonitor(double normA,
double normb)
Constructor for MatrixIterationMonitor. |
MatrixIterationMonitor(double normA,
double normb,
int maxIter,
double rtol,
double atol,
double dtol)
Constructor for MatrixIterationMonitor |
Methods inherited from class no.uib.cipr.matrix.sparse.AbstractIterationMonitor |
converged, converged, converged, converged, getIterationReporter, getNormType, isFirst, iterations, next, residual, setFirst, setIterationReporter, setNormType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MatrixIterationMonitor
public MatrixIterationMonitor(double normA,
double normb,
int maxIter,
double rtol,
double atol,
double dtol)
- Constructor for MatrixIterationMonitor
- Parameters:
normA
- Norm of the matrix Anormb
- Norm of the vector bmaxIter
- Maximum number of iterationsrtol
- Relative convergence tolerance (to initial residual)atol
- Absolute convergence tolerancedtol
- Relative divergence tolerance (to initial residual)
MatrixIterationMonitor
public MatrixIterationMonitor(double normA,
double normb)
- Constructor for MatrixIterationMonitor. Default is 100000 iterations at
most, relative tolerance of 1e-5, absolute tolerance of 1e-50 and a
divergence tolerance of 1e+5.
setMatrixNorm
public void setMatrixNorm(double normA)
- Sets the norm of the system matrix
- Parameters:
normA
- Norm of the matrix A
setVectorNorm
public void setVectorNorm(double normb)
- Sets the norm of the right hand side vector
- Parameters:
normb
- Norm of the vector b
convergedI
protected boolean convergedI(double r,
Vector x)
throws IterativeSolverNotConvergedException
- Overrides:
convergedI
in class DefaultIterationMonitor
- Throws:
IterativeSolverNotConvergedException
convergedI
protected boolean convergedI(double r)
- Overrides:
convergedI
in class DefaultIterationMonitor