44 typedef MultiVector<SC,LO,GO,NO> MultiVector_Type;
45 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
46 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorConstPtr_Type;
49 typedef Teuchos::RCP<BlockMultiVector_Type> BlockMultiVectorPtr_Type;
50 typedef Teuchos::RCP<const BlockMultiVector_Type> BlockMultiVectorConstPtr_Type;
64 typedef Teuchos::Comm<int> Comm_Type;
65 typedef Teuchos::RCP<Comm_Type> CommPtr_Type;
66 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
70 typedef Teuchos::RCP<Map_Type> MapPtr_Type;
71 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
73 typedef Tpetra::Map<LO,GO,NO> TpetraMap_Type;
74 typedef Teuchos::RCP<TpetraMap_Type> TpetraMapPtr_Type;
75 typedef Teuchos::RCP<const TpetraMap_Type> TpetraMapConstPtr_Type;
76 typedef const TpetraMapConstPtr_Type TpetraMapConstPtrConst_Type;
78 typedef Tpetra::MultiVector<SC,LO,GO,NO> TpetraMultiVector_Type;
79 typedef Teuchos::RCP<TpetraMultiVector_Type> TpetraMultiVectorPtr_Type;
80 typedef Teuchos::RCP<const TpetraMultiVector_Type> TpetraMultiVectorConstPtr_Type;
81 typedef const TpetraMultiVectorConstPtr_Type TpetraMultiVectorConstPtrConst_Type;
83 typedef Tpetra::Import<LO,GO,NO> TpetraImport_Type;
84 typedef Teuchos::RCP<TpetraImport_Type> TpetraImportPtr_Type;
86 typedef Tpetra::Export<LO,GO,NO> TpetraExport_Type;
87 typedef Teuchos::RCP<TpetraExport_Type> TpetraExportPtr_Type;
114 MultiVector_Type&
operator= (
const MultiVector_Type& rhs) {
116 FEDDLIB_NOTIFICATION(
"MultiVector_decl",rhs.getMap()->getComm()->getRank() == 0,
" '=' creating a deep copy of input vector into this.");
117 Tpetra::deep_copy<SC,LO,GO,NO>(*multiVector_,*rhs.getTpetraMultiVector());
163 LO getLocalLength()
const;
168 Teuchos::ArrayRCP< const SC >
getData(UN i)
const;
179 void print(Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_EXTREME)
const;
181 TpetraMultiVectorConstPtr_Type getTpetraMultiVector()
const;
183 TpetraMultiVectorPtr_Type getTpetraMultiVectorNonConst();
185 Teuchos::RCP< Thyra::MultiVectorBase<SC> > getThyraMultiVector( );
187 Teuchos::RCP<const Thyra::MultiVectorBase<SC> > getThyraMultiVectorConst( )
const;
189 void fromThyraMultiVector( Teuchos::RCP< Thyra::MultiVectorBase<SC> > thyraMV);
191 void norm2(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits<SC>::magnitudeType> &norms)
const;
193 void normInf(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits<SC>::magnitudeType> &norms)
const;
195 void dot(MultiVectorConstPtr_Type a,
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits<SC>::magnitudeType> &dots)
const;
198 void abs(MultiVectorConstPtr_Type a);
200 void update(
const SC& alpha,
const MultiVector_Type& A,
const SC& beta );
203 void update(
const SC& alpha,
const MultiVector_Type& A,
const SC& beta ,
const MultiVector_Type& B,
const SC& gamma);
206 void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB,
const SC &alpha, MultiVectorConstPtr_Type &A, MultiVectorConstPtr_Type &B,
const SC &beta);
208 void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB,
const SC &alpha, BlockMultiVectorConstPtr_Type &A, BlockMultiVectorConstPtr_Type &B,
const SC &beta);
210 void putScalar(
const SC& alpha );
212 void scale(
const SC& alpha );
214 void importFromVector( MultiVectorConstPtr_Type mvIn,
bool reuseImport =
false, std::string combineMode =
"Insert", std::string type=
"Forward" );
216 void exportFromVector( MultiVectorConstPtr_Type mvIn,
bool reuseExport =
false, std::string combineMode =
"Insert", std::string type=
"Forward" );
218 void writeMM(std::string fileName=
"mv.mm")
const;
220 void readMM(std::string fileName)
const;
222 MultiVectorConstPtr_Type getVector(
int i )
const;
224 MultiVectorPtr_Type sumColumns()
const;
230 TpetraMultiVectorPtr_Type multiVector_;
231 MapConstPtr_Type map_;
232 TpetraImportPtr_Type importer_;
233 TpetraExportPtr_Type exporter_;