Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AnasaziStubTsqrAdapter.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 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef __Anasazi_StubTsqrAdapter_hpp
43 #define __Anasazi_StubTsqrAdapter_hpp
44 
45 #include <AnasaziConfigDefs.hpp>
46 #include <Teuchos_ParameterListAcceptorDefaultBase.hpp>
47 #include <Teuchos_ScalarTraits.hpp>
50 #include <stdexcept>
51 
54 
55 namespace Anasazi {
56 namespace details {
57 
83  template<class MultiVectorType>
85  public:
86  typedef MultiVectorType MV;
87  typedef double scalar_type; // This doesn't really matter
88  typedef int ordinal_type; // This doesn't matter either
89  typedef int node_type; // Nor does this
91  typedef typename Teuchos::ScalarTraits<scalar_type>::magnitudeType magnitude_type;
92 
100  {
101  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for "
102  "multivector type \"" << Teuchos::TypeNameTraits<MV>::name()
103  << " is not yet implemented.");
104  }
105 
108  {
109  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for "
110  "multivector type \"" << Teuchos::TypeNameTraits<MV>::name()
111  << " is not yet implemented.");
112  }
113 
116  {
117  (void) rhs;
118  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for "
119  "multivector type \"" << Teuchos::TypeNameTraits<MV>::name()
120  << " is not yet implemented.");
121  }
122 
126  {
127  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for "
128  "multivector type \"" << Teuchos::TypeNameTraits<MV>::name()
129  << " is not yet implemented.");
130  }
131 
133  void
135  {
136  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for "
137  "multivector type \"" << Teuchos::TypeNameTraits<MV>::name()
138  << " is not yet implemented.");
139  }
140 
142  void
144  MV& Q,
146  const bool forceNonnegativeDiagonal=false)
147  {
148  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for "
149  "multivector type \"" << Teuchos::TypeNameTraits<MV>::name()
150  << " is not yet implemented.");
151  }
152 
154  int
155  revealRank (MV& Q,
157  const magnitude_type& tol)
158  {
159  // mfh 08 Sep 2012: In order to prevent compiler warnings on
160  // some platforms, we simply return some value. This code can
161  // never execute anyway, since it is in an instance method and
162  // all of the constructors throw exceptions. (We've overridden
163  // the default and copy constructors to throw exceptions.)
164  return 0;
165  }
166  };
167 
168 } // namespace details
169 } // namespace Anasazi
170 
171 #endif // __Anasazi_StubTsqrAdapter_hpp
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Get list of valid default parameters (stub; throws std::logic_error).
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
int revealRank(MV &Q, dense_matrix_type &R, const magnitude_type &tol)
Rank-revealing decomposition (stub; does nothing).
StubTsqrAdapter(const Teuchos::RCP< Teuchos::ParameterList > &plist)
Constructor (that accepts a parameter list).
void factorExplicit(MV &A, MV &Q, dense_matrix_type &R, const bool forceNonnegativeDiagonal=false)
Compute QR factorization [Q,R] = qr(A,0) (stub; throws std::logic_error).
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &plist)
Set parameters (stub; throws std::logic_error).
StubTsqrAdapter()
Default constructor (stub; throws std::logic_error).
&quot;Stub&quot; TSQR adaptor for unsupported multivector types.
StubTsqrAdapter(const StubTsqrAdapter &rhs)
Copy constructor (throws std::logic_error).