Anasazi  Version of the Day
AnasaziStatusTest.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Anasazi: Block Eigensolvers Package
5 // Copyright (2004) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
25 //
26 // ***********************************************************************
27 // @HEADER
28 //
29 
30 #ifndef ANASAZI_STATUS_TEST_HPP
31 #define ANASAZI_STATUS_TEST_HPP
32 
35 
36 #include "AnasaziTypes.hpp"
39 
40 namespace Anasazi {
41 
43 
44 
48  {public: StatusTestError(const std::string& what_arg) : AnasaziError(what_arg) {}};
49 
51 
60 
61 template <class ScalarType, class MV, class OP>
62 class StatusTest {
63 
64  public:
66 
67 
69  StatusTest() {};
70 
72  virtual ~StatusTest() {};
74 
76 
77 
82 
84  virtual TestStatus getStatus() const = 0;
85 
87  virtual std::vector<int> whichVecs() const = 0;
88 
90  virtual int howMany() const = 0;
91 
93 
95 
96 
102  virtual void reset() = 0;
103 
105 
110  virtual void clearStatus() = 0;
111 
113 
115 
116 
118  virtual std::ostream& print(std::ostream& os, int indent = 0) const = 0;
119 
121 
122 };
123 
124 } // end of Anasazi namespace
125 
126 #endif /* ANASAZI_STATUS_TEST_HPP */
virtual ~StatusTest()
Destructor.
virtual std::vector< int > whichVecs() const =0
Get the indices for the vectors that passed the test.
An exception class parent to all Anasazi exceptions.
Forward declaration of pure virtual base class Anasazi::StatusTest.
Exception thrown to signal error in a status test during Anasazi::StatusTest::checkStatus().
TestStatus
Enumerated type used to pass back information from a StatusTest.
Namespace Anasazi contains the classes, structs, enums and utilities used by the Anasazi package...
Forward declaration of the virtual base class Anasazi::Eigensolver.
virtual int howMany() const =0
Get the number of vectors that passed the test.
virtual std::ostream & print(std::ostream &os, int indent=0) const =0
Output formatted description of stopping test to output stream.
virtual void clearStatus()=0
Clears the results of the last status test.
virtual TestStatus checkStatus(Eigensolver< ScalarType, MV, OP > *solver)=0
virtual TestStatus getStatus() const =0
Return the result of the most recent checkStatus call, or undefined if it has not been run...
Types and exceptions used within Anasazi solvers and interfaces.
StatusTest()
Constructor.
Common interface of stopping criteria for Anasazi&#39;s solvers.
virtual void reset()=0
Informs the status test that it should reset its internal configuration to the uninitialized state...
The Eigensolver is a templated virtual base class that defines the basic interface that any eigensolv...