Anasazi Version of the Day
AnasaziMultiVecTraits.hpp
Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 //
00004 //                 Anasazi: Block Eigensolvers Package
00005 //                 Copyright (2004) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
00025 //
00026 // ***********************************************************************
00027 // @HEADER
00028 //
00029 #ifndef ANASAZI_MULTI_VEC_TRAITS_HPP
00030 #define ANASAZI_MULTI_VEC_TRAITS_HPP
00031 
00042 
00043 #include "AnasaziTypes.hpp"
00044 #include "Teuchos_Range1D.hpp"
00045 #include "Teuchos_RCP.hpp"
00046 #include "Teuchos_SerialDenseMatrix.hpp"
00047 
00048 namespace Anasazi {
00049 
00053   template< class ScalarType, class MV >
00054   struct UndefinedMultiVecTraits
00055   {
00057 
00061     static inline ScalarType notDefined() { return MV::this_type_is_missing_a_specialization(); };
00062   };
00063 
00064 
00072   template<class ScalarType, class MV>
00073   class MultiVecTraits 
00074   {
00075   public:
00076 
00078 
00079 
00084     static Teuchos::RCP<MV> Clone( const MV& mv, const int numvecs )
00085     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return Teuchos::null; }     
00086 
00091     static Teuchos::RCP<MV> CloneCopy( const MV& mv )
00092     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return Teuchos::null; }     
00093 
00099     static Teuchos::RCP<MV> CloneCopy( const MV& mv, const std::vector<int>& index )
00100     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return Teuchos::null; }     
00101 
00111     static Teuchos::RCP<MV> CloneCopy( const MV& mv, const Teuchos::Range1D& index )
00112     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return Teuchos::null; }     
00113 
00119     static Teuchos::RCP<MV> CloneViewNonConst( MV& mv, const std::vector<int>& index )
00120     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return Teuchos::null; }     
00121 
00130     static Teuchos::RCP<MV> CloneViewNonConst( MV& mv, const Teuchos::Range1D& index )
00131     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return Teuchos::null; }     
00132 
00138     static Teuchos::RCP<const MV> CloneView( const MV& mv, const std::vector<int>& index )
00139     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return Teuchos::null; }     
00140 
00149     static Teuchos::RCP<MV> CloneView( MV& mv, const Teuchos::Range1D& index )
00150     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return Teuchos::null; }     
00151 
00153 
00155 
00156 
00158     static int GetVecLength( const MV& mv )
00159     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return 0; }     
00160 
00162     static int GetNumberVecs( const MV& mv )
00163     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); return 0; }     
00164 
00166 
00168 
00169 
00172     static void MvTimesMatAddMv( const ScalarType alpha, const MV& A, 
00173                                  const Teuchos::SerialDenseMatrix<int,ScalarType>& B, 
00174                                  const ScalarType beta, MV& mv )
00175     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00176 
00179     static void MvAddMv( const ScalarType alpha, const MV& A, const ScalarType beta, const MV& B, MV& mv )
00180     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00181 
00184     static void MvScale ( MV& mv, const ScalarType alpha )
00185     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }
00186     
00189     static void MvScale ( MV& mv, const std::vector<ScalarType>& alpha )
00190     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }
00191 
00194     static void MvTransMv( const ScalarType alpha, const MV& A, const MV& mv, Teuchos::SerialDenseMatrix<int,ScalarType>& B)
00195     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00196 
00199     static void MvDot ( const MV& mv, const MV& A, std::vector<ScalarType> &b) 
00200     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00201 
00203 
00204 
00205 
00209     static void MvNorm( const MV& mv, std::vector<typename Teuchos::ScalarTraits<ScalarType>::magnitudeType> &normvec )
00210     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00211 
00213 
00215 
00216 
00221     static void SetBlock( const MV& A, const std::vector<int>& index, MV& mv )
00222     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00223 
00236     static void SetBlock( const MV& A, const Teuchos::Range1D& index, MV& mv )
00237     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00238 
00242     static void Assign( const MV& A, MV& mv )
00243     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00244 
00247     static void MvRandom( MV& mv )
00248     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00249 
00252     static void MvInit( MV& mv, const ScalarType alpha = Teuchos::ScalarTraits<ScalarType>::zero() )
00253     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00254 
00256 
00258 
00259 
00262     static void MvPrint( const MV& mv, std::ostream& os )
00263     { UndefinedMultiVecTraits<ScalarType, MV>::notDefined(); }     
00264 
00266   };
00267   
00268 } // namespace Anasazi
00269 
00270 #endif // ANASAZI_MULTI_VEC_TRAITS_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends