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_LINEAR_OP_BASE_DEF_HPP
00030 #define THYRA_LINEAR_OP_BASE_DEF_HPP
00031
00032 #include "Thyra_LinearOpBase_decl.hpp"
00033 #include "Thyra_MultiVectorBase.hpp"
00034 #include "Thyra_VectorSpaceBase.hpp"
00035
00036
00037 namespace Thyra {
00038
00039
00040
00041
00042
00043 template<class Scalar>
00044 RCP<const LinearOpBase<Scalar> >
00045 LinearOpBase<Scalar>::clone() const
00046 {
00047 return Teuchos::null;
00048 }
00049
00050
00051
00052
00053
00054 template<class Scalar>
00055 bool LinearOpBase<Scalar>::applySupports(
00056 const EConj conj
00057 ) const
00058 {
00059 return Thyra::opSupported(*this, applyConjToTrans(conj));
00060 }
00061
00062 template<class Scalar>
00063 void LinearOpBase<Scalar>::apply(
00064 const EConj conj,
00065 const MultiVectorBase<Scalar> &X,
00066 MultiVectorBase<Scalar> *Y,
00067 const Scalar alpha,
00068 const Scalar beta
00069 ) const
00070 {
00071 Thyra::apply(*this, applyConjToTrans(conj), X, Y, alpha, beta);
00072 }
00073
00074
00075 template<class Scalar>
00076 bool LinearOpBase<Scalar>::applyTransposeSupports(
00077 const EConj conj
00078 ) const
00079 {
00080 return Thyra::opSupported(*this, applyTransposeConjToTrans(conj));
00081 }
00082
00083
00084 template<class Scalar>
00085 void LinearOpBase<Scalar>::applyTranspose(
00086 const EConj conj,
00087 const MultiVectorBase<Scalar> &X,
00088 MultiVectorBase<Scalar> *Y,
00089 const Scalar alpha,
00090 const Scalar beta
00091 ) const
00092 {
00093 Thyra::apply(*this, applyTransposeConjToTrans(conj), X, Y, alpha, beta);
00094 }
00095
00096
00097 }
00098
00099
00100
00101
00102
00103
00104
00105 template<class Scalar>
00106 void Thyra::apply(
00107 const LinearOpBase<Scalar> &M,
00108 const EOpTransp M_trans,
00109 const MultiVectorBase<Scalar> &X,
00110 const Ptr<MultiVectorBase<Scalar> > &Y,
00111 const Scalar alpha,
00112 const Scalar beta
00113 )
00114 {
00115 M.apply(M_trans, X, Y, alpha, beta);
00116 }
00117
00118
00119
00120
00121
00122
00123 #define THYRA_LINEAR_OP_BASE_INSTANT(SCALAR) \
00124 \
00125 template class LinearOpBase<SCALAR >; \
00126 \
00127 template void apply( \
00128 const LinearOpBase<SCALAR > &M, \
00129 const EOpTransp M_trans, \
00130 const MultiVectorBase<SCALAR > &X, \
00131 const Ptr<MultiVectorBase<SCALAR > > &Y, \
00132 const SCALAR alpha, \
00133 const SCALAR beta \
00134 );
00135
00136
00137 #endif // THYRA_LINEAR_OP_BASE_DEF_HPP