Belos Version of the Day
Public Member Functions
Belos::GmresCantExtendBasis Class Reference

Raised by GmresBase::extendBasis() if can't extend basis. More...

#include <BelosGmresBase.hpp>

Inheritance diagram for Belos::GmresCantExtendBasis:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GmresCantExtendBasis (const std::string &what_arg)

Detailed Description

Raised by GmresBase::extendBasis() if can't extend basis.

Author:
Mark Hoemmen Implementations of GmresBase's extendBasis() method must raise this exception if no more candidate basis vectors can be generated. The cause should not be due to the numerical values in the candidate basis vector(s); the orthogonalization will detect that. The usual cause is that the allotted maximum number of basis vectors has been reached. Subclasses may choose instead to increase this maximum number and attempt to reallocate storage.
Note:
BelosError is a subclass of std::logic_error. GmresCantExtendBasis "is a" logic_error, because callers of GmresBase::advance() should use the canAdvance() method rather than a try/catch to limit the number of iterations. GmresBase is an implementation class (with the interface that I want). It will be wrapped by a subclass of Belos::Iteration (with the interface I don't want but have to use for the sake of backwards compatibility). The Iteration subclass will use the status test to control iteration and limit the number of iterations to the maximum number accepted by GmresBase. So, GmresCantExtendBasis should never be thrown by correct code, thus it's a logic_error.
Incidentally, Belos' exception hierarchy is a bit broken, since BelosError inherits from std::logic_error. Logic errors are programmer bugs, and thus attempting to recover from them is a bad idea. However, one can imagine some iterative method errors from which recovery is possible. These should not be considered logic errors.

Definition at line 152 of file BelosGmresBase.hpp.


Constructor & Destructor Documentation

Belos::GmresCantExtendBasis::GmresCantExtendBasis ( const std::string &  what_arg) [inline]

Definition at line 154 of file BelosGmresBase.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines