65 typedef MultiVector<SC,LO,GO,NO> MultiVector_Type;
66 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
67 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorConstPtr_Type;
70 typedef Teuchos::RCP<BlockMultiVector_Type> BlockMultiVectorPtr_Type;
71 typedef Teuchos::RCP<const BlockMultiVector_Type> BlockMultiVectorConstPtr_Type;
74 typedef Teuchos::Comm<int> Comm_Type;
75 typedef Teuchos::RCP<Comm_Type> CommPtr_Type;
76 typedef Teuchos::RCP<const Comm_Type> CommConstPtr_Type;
80 typedef Teuchos::RCP<Map_Type> MapPtr_Type;
81 typedef Teuchos::RCP<const Map_Type> MapConstPtr_Type;
83 typedef Tpetra::Map<LO,GO,NO> TpetraMap_Type;
84 typedef Teuchos::RCP<TpetraMap_Type> TpetraMapPtr_Type;
85 typedef Teuchos::RCP<const TpetraMap_Type> TpetraMapConstPtr_Type;
86 typedef const TpetraMapConstPtr_Type TpetraMapConstPtrConst_Type;
88 typedef Tpetra::MultiVector<SC,LO,GO,NO> TpetraMultiVector_Type;
89 typedef Teuchos::RCP<TpetraMultiVector_Type> TpetraMultiVectorPtr_Type;
90 typedef Teuchos::RCP<const TpetraMultiVector_Type> TpetraMultiVectorConstPtr_Type;
91 typedef const TpetraMultiVectorConstPtr_Type TpetraMultiVectorConstPtrConst_Type;
93 typedef Tpetra::Import<LO,GO,NO> TpetraImport_Type;
94 typedef Teuchos::RCP<TpetraImport_Type> TpetraImportPtr_Type;
96 typedef Tpetra::Export<LO,GO,NO> TpetraExport_Type;
97 typedef Teuchos::RCP<TpetraExport_Type> TpetraExportPtr_Type;
126 MultiVector_Type&
operator= (
const MultiVector_Type& rhs) {
127 Tpetra::deep_copy<SC,LO,GO,NO>(*multiVector_,*rhs.getTpetraMultiVector());
173 LO getLocalLength()
const;
178 Teuchos::ArrayRCP< const SC >
getData(UN i)
const;
189 void print(Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_EXTREME)
const;
191 TpetraMultiVectorConstPtr_Type getTpetraMultiVector()
const;
193 TpetraMultiVectorPtr_Type getTpetraMultiVectorNonConst();
195#if __cplusplus >= 202002L
196 Teuchos::RCP< Thyra::MultiVectorBase<SC> > getThyraMultiVector( )
requires std::same_as<SC,
double>;
198 Teuchos::RCP<const Thyra::MultiVectorBase<SC> > getThyraMultiVectorConst( ) const requires std::same_as<SC,
double>;
200 template <
typename SCALAR = SC,
typename = std::enable_if_t<std::is_same_v<SCALAR,
double>>>
201 Teuchos::RCP< Thyra::MultiVectorBase<SCALAR> > getThyraMultiVector( );
203 template <
typename SCALAR = SC,
typename = std::enable_if_t<std::is_same_v<SCALAR,
double>>>
204 Teuchos::RCP<const Thyra::MultiVectorBase<SCALAR> > getThyraMultiVectorConst( )
const;
207 void fromThyraMultiVector( Teuchos::RCP< Thyra::MultiVectorBase<SC> > thyraMV);
209 void norm2(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits<SC>::magnitudeType> &norms)
const;
211 void normInf(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits<SC>::magnitudeType> &norms)
const;
213 void dot(MultiVectorConstPtr_Type a,
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits<SC>::magnitudeType> &dots)
const;
216 void abs(MultiVectorConstPtr_Type a);
218 void update(
const SC& alpha,
const MultiVector_Type& A,
const SC& beta );
221 void update(
const SC& alpha,
const MultiVector_Type& A,
const SC& beta ,
const MultiVector_Type& B,
const SC& gamma);
224 void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB,
const SC &alpha, MultiVectorConstPtr_Type &A, MultiVectorConstPtr_Type &B,
const SC &beta);
226#if __cplusplus >= 202002L
227 void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB,
const SC &alpha, BlockMultiVectorConstPtr_Type &A, BlockMultiVectorConstPtr_Type &B,
const SC &beta)
requires std::same_as<SC,double>;
229 template <
typename SCALAR = SC,
typename = std::enable_if_t<std::is_same_v<SCALAR,
double>>>
230 void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB,
const SCALAR &alpha, BlockMultiVectorConstPtr_Type &A, BlockMultiVectorConstPtr_Type &B,
const SCALAR &beta);
233 void putScalar(
const SC& alpha );
235 void scale(
const SC& alpha );
237 void importFromVector( MultiVectorConstPtr_Type mvIn,
bool reuseImport =
false, std::string combineMode =
"Insert", std::string type=
"Forward" );
239 void exportFromVector( MultiVectorConstPtr_Type mvIn,
bool reuseExport =
false, std::string combineMode =
"Insert", std::string type=
"Forward" );
241 void writeMM(std::string fileName=
"mv.mm")
const;
243 void readMM(std::string fileName)
const;
245 MultiVectorConstPtr_Type getVector(
int i )
const;
247 MultiVectorPtr_Type sumColumns()
const;
253 TpetraMultiVectorPtr_Type multiVector_;
254 MapConstPtr_Type map_;
255 TpetraImportPtr_Type importer_;
256 TpetraExportPtr_Type exporter_;