00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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 }
00251
00252
00253
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