Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
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 
39 #include "AnasaziConfigDefs.hpp"
40 #include "AnasaziTypes.hpp"
41 
44 
45 namespace Anasazi {
46 
48 
49 
53  {public: StatusTestError(const std::string& what_arg) : AnasaziError(what_arg) {}};
54 
56 
57 
58 template <class ScalarType, class MV, class OP>
59 class StatusTest {
60 
61  public:
63 
64 
66  StatusTest() {};
67 
69  virtual ~StatusTest() {};
71 
73 
74 
79 
81  virtual TestStatus getStatus() const = 0;
82 
84  virtual std::vector<int> whichVecs() const = 0;
85 
87  virtual int howMany() const = 0;
88 
90 
92 
93 
99  virtual void reset() = 0;
100 
102 
107  virtual void clearStatus() = 0;
108 
110 
112 
113 
115  virtual std::ostream& print(std::ostream& os, int indent = 0) const = 0;
116 
118 
119 };
120 
121 } // end of Anasazi namespace
122 
123 #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.
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.
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
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.
A pure virtual class for defining the status tests for the Anasazi iterative 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...