AztecOO
Development
|
AztecOO_StatusTest: A pure virtual class for extending the status testing capabilities of AztecOO. More...
#include <AztecOO_StatusTest.h>
Public Member Functions | |
virtual void | PrintStatus (std::ostream &os, AztecOO_StatusType type) const |
AztecOO_StatusTest () | |
Constructor. | |
virtual | ~AztecOO_StatusTest () |
Destructor. | |
virtual bool | ResidualVectorRequired () const =0 |
Indicates if residual vector is required by this convergence test. More... | |
virtual AztecOO_StatusType | CheckStatus (int CurrentIter, Epetra_MultiVector *CurrentResVector, double CurrentResNormEst, bool SolutionUpdated)=0 |
Check convergence status: Unconverged, Converged, Failed. More... | |
virtual AztecOO_StatusType | GetStatus () const =0 |
Return the result of the most recent checkStatus call. | |
virtual std::ostream & | Print (std::ostream &stream, int indent=0) const =0 |
Output formatted description of stopping test to output stream. | |
AztecOO_StatusTest: A pure virtual class for extending the status testing capabilities of AztecOO.
|
pure virtual |
Check convergence status: Unconverged, Converged, Failed.
This method checks to see if the convergence criteria are met. The calling routine may pass in the current native residual vector (the one naturally produced as part of the iterative method) or a pre-computed estimate of the two-norm of the current residual, or both or neither. The calling routine should also indicate if the solution of the linear problem has been updated to be compatible with the residual. Some methods, such as GMRES do update the solution at each iteration.
CurrentIter | (In) Current iteration of iterative method. |
CurrentResVector | (In) The current residuals of the iterative process. These values are assumed to be the residuals that are a "natural" by-product of the iterative process. Typically this means they are not explicitly generated and are therefore subject to round-off error. These values will also reflect the influence of any Any rigorous use of stopping criteria should not rely solely on results using this vector. Instead, tests can be performed using this vector and, after convergence is reached with this vector. |
CurrentResNormEst | (In) If the iterative method can cheaply provide this estimate, as an alternative or in addition to providing the CurrentResVector, this value will contain that estimate. The value will be set to -1.0 if no estimate is available. |
SolutionUpdated | (In) If this argument is true, then the solution vector that is part of the Epetra_LinearProblem object being solved is consistent with the residual. Some iterative methods do not keep the solution vector updated with the residual at each iteration. For example GMRES does not generate the solution until the least- square problem is solved at the end of the Arnoldi process. |
Implemented in AztecOO_StatusTestResNorm, AztecOO_StatusTestCombo, and AztecOO_StatusTestMaxIters.
|
pure virtual |
Indicates if residual vector is required by this convergence test.
If this method returns true, then the ResidualVector argument to the Converged() method will defined. If this method returns false, then the ResidualVector may not be defined when Converged() is called. Some iterative methods do not explicitly construct the residual vector at each iteration. Thus, if this vector is not required, this vector will not need to be constructed if this method returns false.
Implemented in AztecOO_StatusTestResNorm, AztecOO_StatusTestCombo, and AztecOO_StatusTestMaxIters.
Referenced by AztecOO_StatusTestCombo::ResidualVectorRequired().