|
Belos
Version of the Day
|
00001 // @HEADER 00002 // *********************************************************************** 00003 // 00004 // Belos: Block Linear Solvers Package 00005 // Copyright (2010) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 00023 // USA 00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 // @HEADER 00028 00029 #ifndef __Belos_StubTsqrAdapter_hpp 00030 #define __Belos_StubTsqrAdapter_hpp 00031 00032 #include <BelosConfigDefs.hpp> 00033 #include <Teuchos_ParameterListAcceptorDefaultBase.hpp> 00034 #include <Teuchos_ScalarTraits.hpp> 00035 #include <Teuchos_SerialDenseMatrix.hpp> 00036 #include <Teuchos_TypeNameTraits.hpp> 00037 #include <stdexcept> 00038 00041 00042 namespace Belos { 00043 namespace details { 00044 00070 template<class MultiVectorType> 00071 class StubTsqrAdapter : public Teuchos::ParameterListAcceptorDefaultBase { 00072 public: 00073 typedef MultiVectorType MV; 00074 typedef double scalar_type; // This doesn't really matter 00075 typedef int ordinal_type; // This doesn't matter either 00076 typedef int node_type; // Nor does this 00077 typedef Teuchos::SerialDenseMatrix<ordinal_type, scalar_type> dense_matrix_type; 00078 typedef typename Teuchos::ScalarTraits<scalar_type>::magnitudeType magnitude_type; 00079 00086 StubTsqrAdapter (const Teuchos::RCP<Teuchos::ParameterList>& plist) 00087 { 00088 TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for " 00089 "multivector type \"" << Teuchos::TypeNameTraits<MV>::name() 00090 << " is not yet implemented."); 00091 } 00092 00094 StubTsqrAdapter () 00095 { 00096 TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for " 00097 "multivector type \"" << Teuchos::TypeNameTraits<MV>::name() 00098 << " is not yet implemented."); 00099 } 00100 00102 StubTsqrAdapter (const StubTsqrAdapter& rhs) 00103 { 00104 (void) rhs; 00105 TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for " 00106 "multivector type \"" << Teuchos::TypeNameTraits<MV>::name() 00107 << " is not yet implemented."); 00108 } 00109 00111 Teuchos::RCP<const Teuchos::ParameterList> 00112 getValidParameters () const 00113 { 00114 TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for " 00115 "multivector type \"" << Teuchos::TypeNameTraits<MV>::name() 00116 << " is not yet implemented."); 00117 } 00118 00120 void 00121 setParameterList (const Teuchos::RCP<Teuchos::ParameterList>& plist) 00122 { 00123 TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for " 00124 "multivector type \"" << Teuchos::TypeNameTraits<MV>::name() 00125 << " is not yet implemented."); 00126 } 00127 00129 void 00130 factorExplicit (MV& A, 00131 MV& Q, 00132 dense_matrix_type& R, 00133 const bool forceNonnegativeDiagonal=false) 00134 { 00135 TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error, "TSQR adapter for " 00136 "multivector type \"" << Teuchos::TypeNameTraits<MV>::name() 00137 << " is not yet implemented."); 00138 } 00139 00141 int 00142 revealRank (MV& Q, 00143 dense_matrix_type& R, 00144 const magnitude_type& tol) 00145 { 00146 // mfh 07 Sep 2012: In order to prevent compiler warnings on 00147 // some platforms, we simply return some value. This code can 00148 // never execute anyway, since it is in an instance method and 00149 // all of the constructors throw exceptions. (We've overridden 00150 // the default and copy constructors to throw exceptions.) 00151 return 0; 00152 } 00153 }; 00154 00155 } // namespace details 00156 } // namespace Belos 00157 00158 #endif // __Belos_StubTsqrAdapter_hpp 00159
1.7.6.1