Go to the documentation of this file.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 TSFMULTIVECTOR_HPP
00030 #define TSFMULTIVECTOR_HPP
00031
00032 #include "SundanceDefs.hpp"
00033 #include "SundanceHandle.hpp"
00034 #include "Thyra_MultiVectorBase.hpp"
00035 #include "Thyra_VectorSpaceBase.hpp"
00036 #include "TSFVectorSpaceDecl.hpp"
00037 #include "TSFLoadableVector.hpp"
00038 #include "TSFAccessibleVector.hpp"
00039 #include "Thyra_VectorStdOps.hpp"
00040 #include "Teuchos_TimeMonitor.hpp"
00041 #include "Range1D.hpp"
00042 #include "Teuchos_RefCountPtr.hpp"
00043 #include "TSFLinearOperatorDecl.hpp"
00044
00045
00046
00047 namespace TSFExtended
00048 {
00049 using Thyra::Index;
00050 using Thyra::Range1D;
00051 using Thyra::EOpTransp;
00052 using namespace Teuchos;
00053
00054
00055 template <class Scalar>
00056 class MultiVector : public Sundance::Handle<Thyra::MultiVectorBase<Scalar> >
00057 {
00058 public:
00059
00060 HANDLE_CTORS(MultiVector<Scalar>, Thyra::MultiVectorBase<Scalar>);
00061
00062
00063
00064
00065
00066
00067 virtual Vector<Scalar> col(Index j) const;
00068
00069
00070
00071
00072
00073 virtual const Vector<Scalar> col(Index j) const;
00074
00075
00076
00077
00078
00079 virtual MultiVector<Scalar> clone_mv() const;
00080
00081
00082
00083
00084
00085
00086 virtual const MultiVector<Scalar> subView(const Range1D& col_rng) const;
00087
00088
00089
00090
00091
00092
00093 virtual MultiVector<Scalar> subView(const Range1D& col_rng);
00094
00095
00096
00097
00098
00099 virtual const MultiVector<Scalar> subView( const int numCols,
00100
00101 const int cols[] ) const;
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 virtual void applyOp(
00122 const RTOpPack::RTOpT<Scalar> &primary_op
00123 ,const int num_multi_vecs
00124 ,const MultiVector<Scalar>* multi_vecs[]
00125 ,const int num_targ_multi_vecs
00126 ,MultiVector<Scalar>* targ_multi_vecs[]
00127 ,RTOpPack::ReductTarget* reduct_objs[]
00128 ,const Index primary_first_ele
00129 ,const Index primary_sub_dim
00130 ,const Index primary_global_offset
00131 ,const Index secondary_first_ele
00132 ,const Index secondary_sub_dim
00133 ) const;
00134
00135
00136
00137
00138
00139
00140
00141 virtual void applyOp(
00142 const RTOpPack::RTOpT<Scalar> &primary_op
00143 ,const RTOpPack::RTOpT<Scalar> &secondary_op
00144 ,const int num_multi_vecs
00145 ,const MultiVector<Scalar>* multi_vecs[]
00146 ,const int num_targ_multi_vecs
00147 ,MultiVector<Scalar>* targ_multi_vecs[]
00148 ,RTOpPack::ReductTarget *reduct_obj
00149 ,const Index primary_first_ele
00150 ,const Index primary_sub_dim
00151 ,const Index primary_global_offset
00152 ,const Index secondary_first_ele
00153 ,const Index secondary_sub_dim
00154 ) const;
00155
00156
00157
00158 virtual void getSubMultiVector(
00159 const Range1D &rowRng
00160 ,const Range1D &colRng
00161 ,RTOpPack::SubMultiVectorT<Scalar> *sub_mv
00162 ) const;
00163
00164
00165
00166
00167 virtual void freeSubMultiVector( RTOpPack::SubMultiVectorT<Scalar>*
00168 sub_mv ) const;
00169
00170
00171
00172
00173
00174 virtual void getSubMultiVector(
00175 const Range1D &rowRng
00176 ,const Range1D &colRng
00177 ,RTOpPack::MutableSubMultiVectorT<Scalar> *sub_mv
00178 );
00179
00180
00181
00182
00183
00184 virtual void commitSubMultiVector(
00185 RTOpPack::MutableSubMultiVectorT<Scalar>* sub_mv );
00186
00187
00188
00189
00190
00191
00192
00193
00194 void apply(
00195 const EOpTransp M_trans
00196 ,const Vector<Scalar> &x
00197 ,Vector<Scalar> *y
00198 ,const Scalar alpha
00199 ,const Scalar beta
00200 ) const;
00201
00202
00203
00204
00205 LinearOperator<Scalar> clone() const;
00206
00207
00208
00209 };
00210
00211 }
00212
00213
00214 #endif