Thyra_MultiVectorStdOpsDecl.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //    Thyra: Interfaces and Support for Abstract Numerical Algorithms
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 THYRA_MULTI_VECTOR_STD_OPS_DECL_HPP
00030 #define THYRA_MULTI_VECTOR_STD_OPS_DECL_HPP
00031 
00032 #include "Thyra_OperatorVectorTypes.hpp"
00033 #include "RTOpPack_ROpNorm1.hpp"
00034 #include "RTOpPack_ROpNorm2.hpp"
00035 #include "RTOpPack_ROpNormInf.hpp"
00036 
00037 namespace Thyra {
00038 
00039 
00055 
00063 template<class Scalar>
00064 void norms( const MultiVectorBase<Scalar>& V, typename Teuchos::ScalarTraits<Scalar>::magnitudeType norms[] );
00065 
00076 template<class Scalar, class NormOp>
00077 void reductions( const MultiVectorBase<Scalar>& V, const NormOp &op, typename Teuchos::ScalarTraits<Scalar>::magnitudeType norms[] );
00078 
00088 template<class Scalar>
00089 void norms_1( const MultiVectorBase<Scalar>& V, typename Teuchos::ScalarTraits<Scalar>::magnitudeType norms[] );
00090 
00100 template<class Scalar>
00101 void norms_2( const MultiVectorBase<Scalar>& V, typename Teuchos::ScalarTraits<Scalar>::magnitudeType norms[] );
00102 
00112 template<class Scalar>
00113 void norms_inf( const MultiVectorBase<Scalar>& V, typename Teuchos::ScalarTraits<Scalar>::magnitudeType norms[] );
00114 
00123 template<class Scalar>
00124 void dots( const MultiVectorBase<Scalar>& V1, const MultiVectorBase<Scalar>& V2, Scalar dots[] );
00125 
00133 template<class Scalar>
00134 void sums( const MultiVectorBase<Scalar>& V, Scalar sums[] );
00135 
00142 template<class Scalar>
00143 typename Teuchos::ScalarTraits<Scalar>::magnitudeType norm_1( const MultiVectorBase<Scalar>& V );
00144 
00150 template<class Scalar>
00151 void scale( Scalar alpha, MultiVectorBase<Scalar>* V );
00152 
00155 template<class Scalar>
00156 void scaleUpdate( const VectorBase<Scalar>& a, const MultiVectorBase<Scalar>& U, MultiVectorBase<Scalar>* V );
00157 
00160 template<class Scalar>
00161 void assign( MultiVectorBase<Scalar>* V, Scalar alpha );
00162 
00165 template<class Scalar>
00166 void assign( MultiVectorBase<Scalar>* V, const MultiVectorBase<Scalar>& U );
00167 
00170 template<class Scalar>
00171 void update( Scalar alpha, const MultiVectorBase<Scalar>& U, MultiVectorBase<Scalar>* V );
00172 
00175 template<class Scalar>
00176 void update( Scalar alpha[], Scalar beta, const MultiVectorBase<Scalar>& U, MultiVectorBase<Scalar>* V );
00177 
00180 template<class Scalar>
00181 void update( const MultiVectorBase<Scalar>& U, Scalar alpha[], Scalar beta, MultiVectorBase<Scalar>* V );
00182 
00203 template<class Scalar>
00204 void linear_combination(
00205   const int                         m
00206   ,const Scalar                     alpha[]
00207   ,const MultiVectorBase<Scalar>*   X[]
00208   ,const Scalar                     &beta
00209   ,MultiVectorBase<Scalar>          *Y
00210   );
00211 
00220 template<class Scalar>
00221 void randomize( Scalar l, Scalar u, MultiVectorBase<Scalar>* V );
00222 
00224 
00237 
00240 template<class Scalar>
00241 void V_VpV( MultiVectorBase<Scalar>* Z, const MultiVectorBase<Scalar>& X, const MultiVectorBase<Scalar>& Y );
00242 
00245 template<class Scalar>
00246 void V_VmV( MultiVectorBase<Scalar>* Z, const MultiVectorBase<Scalar>& X, const MultiVectorBase<Scalar>& Y );
00247 
00249 
00250 } // end namespace Thyra
00251 
00252 // /////////////////////////////////////
00253 // Inline functions
00254 
00255 template<class Scalar>
00256 inline
00257 void Thyra::norms_1( const MultiVectorBase<Scalar>& V, typename Teuchos::ScalarTraits<Scalar>::magnitudeType norms[] )
00258 {
00259   reductions(V,RTOpPack::ROpNorm1<Scalar>(),norms);
00260 }
00261 
00262 template<class Scalar>
00263 inline
00264 void Thyra::norms_2( const MultiVectorBase<Scalar>& V, typename Teuchos::ScalarTraits<Scalar>::magnitudeType norms[] )
00265 {
00266   reductions(V,RTOpPack::ROpNorm2<Scalar>(),norms);
00267 }
00268 
00269 template<class Scalar>
00270 inline
00271 void Thyra::norms_inf( const MultiVectorBase<Scalar>& V, typename Teuchos::ScalarTraits<Scalar>::magnitudeType norms[] )
00272 {
00273   reductions(V,RTOpPack::ROpNormInf<Scalar>(),norms);
00274 }
00275 
00276 #endif // THYRA_MULTI_VECTOR_STD_OPS_DECL_HPP

Generated on Thu Sep 18 12:33:03 2008 for Thyra Package Browser (Single Doxygen Collection) by doxygen 1.3.9.1