46 #ifndef XPETRA_TPETRAMULTIVECTOR_HPP 47 #define XPETRA_TPETRAMULTIVECTOR_HPP 60 #include "Tpetra_MultiVector.hpp" 61 #include "Tpetra_Vector.hpp" 66 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
67 const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node> &
toTpetra(
const MultiVector< Scalar,LocalOrdinal, GlobalOrdinal, Node> &);
69 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
70 Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node> &
toTpetra(MultiVector< Scalar,LocalOrdinal, GlobalOrdinal, Node> &);
72 #ifndef DOXYGEN_SHOULD_SKIP_THIS 74 template<
class S,
class LO,
class GO,
class N>
class TpetraVector;
79 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
80 RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node > >
toXpetra(RCP<Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > vec);
82 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
83 RCP<const Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node > >
toXpetra(RCP<
const Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > vec);
86 template <class Scalar = MultiVector<>::scalar_type,
91 :
public virtual MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >
104 :
vec_(Teuchos::rcp(new Tpetra::
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >(
toTpetra(map), NumVectors, zeroOut))) {
106 TEUCHOS_TEST_FOR_EXCEPTION(NumVectors < 1, std::invalid_argument,
"Xpetra::TpetraMultiVector(map,numVecs,zeroOut): numVecs = " << NumVectors <<
" < 1.");
111 :
vec_(Teuchos::rcp(new Tpetra::
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >(Tpetra::createCopy(
toTpetra(source))))) { }
115 :
vec_(Teuchos::rcp(new Tpetra::
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >(
toTpetra(map), A, LDA, NumVectors))) {
117 TEUCHOS_TEST_FOR_EXCEPTION(NumVectors < 1, std::invalid_argument,
"Xpetra::TpetraMultiVector(map,A,LDA,numVecs): numVecs = " << NumVectors <<
" < 1.");
122 :
vec_(Teuchos::rcp(new Tpetra::
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >(
toTpetra(map), ArrayOfPtrs, NumVectors))) {
124 TEUCHOS_TEST_FOR_EXCEPTION(NumVectors < 1, std::invalid_argument,
"Xpetra::TpetraMultiVector(map,ArrayOfPtrs,numVecs): numVecs = " << NumVectors <<
" < 1.");
137 void replaceGlobalValue(GlobalOrdinal globalRow,
size_t vectorIndex,
const Scalar &value) {
XPETRA_MONITOR(
"TpetraMultiVector::replaceGlobalValue");
vec_->replaceGlobalValue(globalRow, vectorIndex, value); }
140 void sumIntoGlobalValue(GlobalOrdinal globalRow,
size_t vectorIndex,
const Scalar &value) {
XPETRA_MONITOR(
"TpetraMultiVector::sumIntoGlobalValue");
vec_->sumIntoGlobalValue(globalRow, vectorIndex, value); }
143 void replaceLocalValue(LocalOrdinal myRow,
size_t vectorIndex,
const Scalar &value) {
XPETRA_MONITOR(
"TpetraMultiVector::replaceLocalValue");
vec_->replaceLocalValue(myRow, vectorIndex, value); }
146 void sumIntoLocalValue(LocalOrdinal myRow,
size_t vectorIndex,
const Scalar &value) {
XPETRA_MONITOR(
"TpetraMultiVector::sumIntoLocalValue");
vec_->sumIntoLocalValue(myRow, vectorIndex, value); }
160 Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >
getVector(
size_t j)
const {
XPETRA_MONITOR(
"TpetraMultiVector::getVector");
return toXpetra(
vec_->getVector(j)); }
175 void get2dCopy(Teuchos::ArrayView<
const Teuchos::ArrayView< Scalar > > ArrayOfPtrs)
const {
XPETRA_MONITOR(
"TpetraMultiVector::get2dCopy");
vec_->get2dCopy(ArrayOfPtrs); }
181 Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > >
get2dView()
const {
XPETRA_MONITOR(
"TpetraMultiVector::get2dView");
return vec_->get2dView(); }
216 void update(
const Scalar &alpha,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A,
const Scalar &beta,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B,
const Scalar &gamma) {
XPETRA_MONITOR(
"TpetraMultiVector::update");
vec_->update(alpha,
toTpetra(A), beta,
toTpetra(B), gamma); }
219 void norm1(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms)
const {
XPETRA_MONITOR(
"TpetraMultiVector::norm1");
vec_->norm1(norms); }
222 void norm2(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms)
const {
XPETRA_MONITOR(
"TpetraMultiVector::norm2");
vec_->norm2(norms); }
225 void normInf(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms)
const {
XPETRA_MONITOR(
"TpetraMultiVector::normInf");
vec_->normInf(norms); }
231 void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB,
const Scalar &alpha,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B,
const Scalar &beta) {
XPETRA_MONITOR(
"TpetraMultiVector::multiply");
vec_->multiply(transA, transB, alpha,
toTpetra(A),
toTpetra(B), beta); }
256 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const {
XPETRA_MONITOR(
"TpetraMultiVector::describe");
vec_->describe(out, verbLevel); }
268 if(bUseXpetraImplementation)
283 RCP< const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal,Node> > v = tSource.getTpetra_MultiVector();
291 RCP< const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal,Node> > v = tDest.getTpetra_MultiVector();
300 RCP< const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal,Node> > v = tSource.getTpetra_MultiVector();
309 RCP< const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal,Node> > v = tDest.getTpetra_MultiVector();
319 template<
class Node2>
320 RCP<MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node2> >
clone(
const RCP<Node2> &node2)
const {
332 TpetraMultiVector(
const Teuchos::RCP<Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node> > &vec) :
vec_(vec) { }
338 void setSeed(
unsigned int seed) {
XPETRA_MONITOR(
"TpetraMultiVector::seedrandom"); Teuchos::ScalarTraits< Scalar >::seedrandom(seed); }
341 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 356 template<
class TargetDeviceType>
357 typename Kokkos::Impl::if_c<
358 Kokkos::Impl::is_same<
359 typename dual_view_type::t_dev_um::execution_space::memory_space,
360 typename TargetDeviceType::memory_space>::value,
361 typename dual_view_type::t_dev_um,
362 typename dual_view_type::t_host_um>::type
363 getLocalView ()
const {
367 typename dual_view_type::t_host_um getHostLocalView ()
const {
368 return subview(
vec_->template getLocalView<typename dual_view_type::host_mirror_space> (),
369 Kokkos::ALL(), Kokkos::ALL());
372 typename dual_view_type::t_dev_um getDeviceLocalView()
const {
373 return subview(
vec_->template getLocalView<typename dual_view_type::t_dev_um::execution_space> (),
374 Kokkos::ALL(), Kokkos::ALL());
388 const this_type* rhsPtr =
dynamic_cast<const this_type*
> (&rhs);
389 TEUCHOS_TEST_FOR_EXCEPTION(
390 rhsPtr == NULL, std::invalid_argument,
"Xpetra::MultiVector::operator=:" 391 " The left-hand side (LHS) of the assignment has a different type than " 392 "the right-hand side (RHS). The LHS has type Xpetra::TpetraMultiVector" 393 " (which means it wraps a Tpetra::MultiVector), but the RHS has some " 394 "other type. This probably means that the RHS wraps an " 395 "Epetra_MultiVector. Xpetra::MultiVector does not currently implement " 396 "assignment from an Epetra object to a Tpetra object, though this could" 397 " be added with sufficient interest.");
399 typedef Tpetra::MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node> TMV;
400 RCP<const TMV> rhsImpl = rhsPtr->getTpetra_MultiVector ();
403 TEUCHOS_TEST_FOR_EXCEPTION(
404 rhsImpl.is_null (), std::logic_error,
"Xpetra::MultiVector::operator= " 405 "(in Xpetra::TpetraMultiVector::assign): *this (the right-hand side of " 406 "the assignment) has a null RCP<Tpetra::MultiVector> inside. Please " 407 "report this bug to the Xpetra developers.");
408 TEUCHOS_TEST_FOR_EXCEPTION(
409 lhsImpl.is_null (), std::logic_error,
"Xpetra::MultiVector::operator= " 410 "(in Xpetra::TpetraMultiVector::assign): The left-hand side of the " 411 "assignment has a null RCP<Tpetra::MultiVector> inside. Please report " 412 "this bug to the Xpetra developers.");
414 Tpetra::deep_copy (*lhsImpl, *rhsImpl);
419 RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node> >
vec_;
424 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
428 return *tX.getTpetra_MultiVector();
431 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
435 return *tX.getTpetra_MultiVector();
441 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
442 RCP<MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node > >
toXpetra(RCP<Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > vec) {
446 return Teuchos::null;
449 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
450 RCP<const MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node > >
toXpetra(RCP<
const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > vec) {
454 return Teuchos::null;
457 #ifdef HAVE_XPETRA_EPETRA 459 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ 460 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) 463 template <
class Scalar>
465 :
public virtual MultiVector< Scalar, int, int, EpetraNode >
537 Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >
getVector(
size_t j)
const {
return Teuchos::null; }
540 Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >
getVectorNonConst(
size_t j) {
return Teuchos::null; }
543 Teuchos::ArrayRCP< const Scalar >
getData(
size_t j)
const {
return Teuchos::ArrayRCP< const Scalar >(); }
546 Teuchos::ArrayRCP< Scalar >
getDataNonConst(
size_t j) {
return Teuchos::ArrayRCP< Scalar >(); }
549 void get1dCopy(Teuchos::ArrayView< Scalar > A,
size_t LDA)
const { }
552 void get2dCopy(Teuchos::ArrayView<
const Teuchos::ArrayView< Scalar > > ArrayOfPtrs)
const { }
555 Teuchos::ArrayRCP< const Scalar >
get1dView()
const {
return Teuchos::ArrayRCP< const Scalar >(); }
558 Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > >
get2dView()
const {
return Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > >(); }
564 Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > >
get2dViewNonConst() {
return Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > >(); }
584 void scale(Teuchos::ArrayView< const Scalar > alpha) { }
593 void update(
const Scalar &alpha,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A,
const Scalar &beta,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B,
const Scalar &gamma) { }
596 void norm1(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms)
const { }
599 void norm2(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms)
const { }
602 void normInf(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms)
const { }
605 void meanValue(
const Teuchos::ArrayView< Scalar > &means)
const { }
608 void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB,
const Scalar &alpha,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B,
const Scalar &beta) { }
633 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const { }
641 void randomize(
bool bUseXpetraImplementation =
false) { }
646 Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal,Node> >
getMap()
const {
return Teuchos::null; }
658 template<
class Node2>
659 RCP<MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node2> >
clone(
const RCP<Node2> &node2)
const {
return Teuchos::null; }
667 TpetraMultiVector(
const Teuchos::RCP<Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node> > &vec) {
672 RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node> >
getTpetra_MultiVector()
const {
return Teuchos::null; }
678 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 693 template<
class TargetDeviceType>
694 typename Kokkos::Impl::if_c<
695 Kokkos::Impl::is_same<
696 typename dual_view_type::t_dev_um::execution_space::memory_space,
697 typename TargetDeviceType::memory_space>::value,
698 typename dual_view_type::t_dev_um,
699 typename dual_view_type::t_host_um>::type
700 getLocalView ()
const {
701 typename Kokkos::Impl::if_c<
702 Kokkos::Impl::is_same<
703 typename dual_view_type::t_dev_um::execution_space::memory_space,
704 typename TargetDeviceType::memory_space>::value,
705 typename dual_view_type::t_dev_um,
706 typename dual_view_type::t_host_um>::type dummy;
710 typename dual_view_type::t_host_um getHostLocalView ()
const {
713 return typename dual_view_type::t_host_um();
716 typename dual_view_type::t_dev_um getDeviceLocalView()
const {
719 return typename dual_view_type::t_dev_um();
735 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) || \ 736 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))) 739 template <
class Scalar>
741 :
public virtual MultiVector< Scalar, int, long long, EpetraNode >
808 Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >
getVector(
size_t j)
const {
return Teuchos::null; }
811 Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >
getVectorNonConst(
size_t j) {
return Teuchos::null; }
814 Teuchos::ArrayRCP< const Scalar >
getData(
size_t j)
const {
return Teuchos::ArrayRCP< const Scalar >(); }
817 Teuchos::ArrayRCP< Scalar >
getDataNonConst(
size_t j) {
return Teuchos::ArrayRCP< Scalar >(); }
820 void get1dCopy(Teuchos::ArrayView< Scalar > A,
size_t LDA)
const { }
823 void get2dCopy(Teuchos::ArrayView<
const Teuchos::ArrayView< Scalar > > ArrayOfPtrs)
const { }
826 Teuchos::ArrayRCP< const Scalar >
get1dView()
const {
return Teuchos::ArrayRCP< const Scalar >(); }
829 Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > >
get2dView()
const {
return Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > >(); }
835 Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > >
get2dViewNonConst() {
return Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > >(); }
855 void scale(Teuchos::ArrayView< const Scalar > alpha) { }
864 void update(
const Scalar &alpha,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A,
const Scalar &beta,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B,
const Scalar &gamma) { }
867 void norm1(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms)
const { }
870 void norm2(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms)
const { }
873 void normInf(
const Teuchos::ArrayView<
typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms)
const { }
876 void meanValue(
const Teuchos::ArrayView< Scalar > &means)
const { }
879 void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB,
const Scalar &alpha,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A,
const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B,
const Scalar &beta) { }
904 void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default)
const { }
912 void randomize(
bool bUseXpetraImplementation =
false) { }
917 Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal,Node> >
getMap()
const {
return Teuchos::null; }
929 template<
class Node2>
930 RCP<MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node2> >
clone(
const RCP<Node2> &node2)
const {
return Teuchos::null; }
938 TpetraMultiVector(
const Teuchos::RCP<Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node> > &vec) {
943 RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node> >
getTpetra_MultiVector()
const {
return Teuchos::null; }
949 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 964 template<
class TargetDeviceType>
965 typename Kokkos::Impl::if_c<
966 Kokkos::Impl::is_same<
967 typename dual_view_type::t_dev_um::execution_space::memory_space,
968 typename TargetDeviceType::memory_space>::value,
969 typename dual_view_type::t_dev_um,
970 typename dual_view_type::t_host_um>::type
971 getLocalView ()
const {
972 typename Kokkos::Impl::if_c<
973 Kokkos::Impl::is_same<
974 typename dual_view_type::t_dev_um::execution_space::memory_space,
975 typename TargetDeviceType::memory_space>::value,
976 typename dual_view_type::t_dev_um,
977 typename dual_view_type::t_host_um>::type dummy;
981 typename dual_view_type::t_host_um getHostLocalView ()
const {
984 return typename dual_view_type::t_host_um();
987 typename dual_view_type::t_dev_um getDeviceLocalView()
const {
990 return typename dual_view_type::t_dev_um();
1005 #endif // TpetraMultiVector class (specialization GO=long long, NO=EpetraNode) 1007 #endif // HAVE_XPETRA_EPETRA 1017 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
1018 void TpetraMultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node>::elementWiseMultiply(Scalar scalarAB,
const Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &A,
const MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> &B, Scalar scalarThis) {
1024 XPETRA_DYNAMIC_CAST(
const tpv, A, tA,
"Xpetra::TpetraMultiVectorMatrix->multiply() only accept Xpetra::TpetraMultiVector as input arguments.");
1026 vec_->elementWiseMultiply(scalarAB, *tA.getTpetra_Vector(), *tB.getTpetra_MultiVector(), scalarThis);
1031 #define XPETRA_TPETRAMULTIVECTOR_SHORT 1032 #endif // XPETRA_TPETRAMULTIVECTOR_HPP Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > > get2dView() const
Return const persisting pointers to values.
void replaceMap(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
void update(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta)
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
size_t getNumVectors() const
Number of columns in the multivector.
void norm2(const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
void get2dCopy(Teuchos::ArrayView< const Teuchos::ArrayView< Scalar > > ArrayOfPtrs) const
Fill the given array with a copy of this multivector's local values.
void doExport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > > get2dView() const
Return const persisting pointers to values.
void scale(const Scalar &alpha)
Scale the current values of a multi-vector, this = alpha*this.
TpetraMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t NumVectors, bool zeroOut=true)
Basic constuctor.
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
void setSeed(unsigned int seed)
Set seed for Random function.
size_t getLocalLength() const
Local number of rows on the calling process.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with the given verbosity level to a FancyOStream.
TpetraMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayView< const Teuchos::ArrayView< const Scalar > > &ArrayOfPtrs, size_t NumVectors)
Create multivector by copying array of views of local data.
Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t j) const
Return a Vector which is a const view of column j.
Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > > get2dViewNonConst()
Return non-const persisting pointers to values.
void reduce()
Sum values of a locally replicated multivector across all processes.
void scale(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
Replace multi-vector values with scaled values of A, this = alpha*A.
std::string description() const
A simple one-line description of this object.
virtual ~TpetraMultiVector()
Destructor (virtual for memory safety of derived classes).
TpetraMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayView< const Teuchos::ArrayView< const Scalar > > &ArrayOfPtrs, size_t NumVectors)
Create multivector by copying array of views of local data.
void reciprocal(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
Teuchos::ArrayRCP< Scalar > getDataNonConst(size_t j)
View of the local values in a particular vector of this multivector.
void doExport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
virtual ~TpetraMultiVector()
Destructor (virtual for memory safety of derived classes).
void setSeed(unsigned int seed)
Set seed for Random function.
Teuchos::ArrayRCP< const Scalar > getData(size_t j) const
Const view of the local values in a particular vector of this multivector.
void elementWiseMultiply(Scalar scalarAB, const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Scalar scalarThis)
Element-wise multiply of a Vector A with a TpetraMultiVector B.
TpetraMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t NumVectors, bool zeroOut=true)
Basic constuctor.
void doExport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
TpetraMultiVector(const Teuchos::RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &vec)
TpetraMultiVector constructor to wrap a Tpetra::MultiVector object.
void elementWiseMultiply(Scalar scalarAB, const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Scalar scalarThis)
Element-wise multiply of a Vector A with a TpetraMultiVector B.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
virtual void Xpetra_randomize()
Set multi-vector values to random numbers. XPetra implementation.
void doImport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import data into this object using an Export object ("reverse mode").
void setSeed(unsigned int seed)
Set seed for Random function.
Teuchos::ArrayRCP< Scalar > getDataNonConst(size_t j)
View of the local values in a particular vector of this multivector.
void scale(const Scalar &alpha)
Scale the current values of a multi-vector, this = alpha*this.
TpetraMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraMultiVectorClass
void doImport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
void randomize(bool bUseXpetraImplementation=false)
Set multi-vector values to random numbers.
void scale(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
Replace multi-vector values with scaled values of A, this = alpha*A.
void replaceMap(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2) const
void reduce()
Sum values of a locally replicated multivector across all processes.
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
void update(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &gamma)
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_MultiVector() const
Get the underlying Tpetra multivector.
void get2dCopy(Teuchos::ArrayView< const Teuchos::ArrayView< Scalar > > ArrayOfPtrs) const
Fill the given array with a copy of this multivector's local values.
TpetraMultiVector()
Default constructor.
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
TpetraMultiVector(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source)
Copy constructor (performs a deep copy).
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Replace value, using local (row) index.
void norm1(const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
void dot(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< Scalar > &dots) const
Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]).
void doImport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import data into this object using an Import object ("forward mode").
size_t getNumVectors() const
Number of columns in the multivector.
TpetraMultiVector(const Teuchos::RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &vec)
TpetraMultiVector constructor to wrap a Tpetra::MultiVector object.
Teuchos::ArrayRCP< const Scalar > get1dView() const
Const persisting (1-D) view of this multivector's local values.
void elementWiseMultiply(Scalar scalarAB, const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Scalar scalarThis)
Element-wise multiply of a Vector A with a TpetraMultiVector B.
void get1dCopy(Teuchos::ArrayView< Scalar > A, size_t LDA) const
Fill the given array with a copy of this multivector's local values.
void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &beta)
Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B).
void meanValue(const Teuchos::ArrayView< Scalar > &means) const
Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined...
Teuchos::ArrayRCP< Scalar > get1dViewNonConst()
Nonconst persisting (1-D) view of this multivector's local values.
TpetraMultiVector(const Teuchos::RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &vec)
TpetraMultiVector constructor to wrap a Tpetra::MultiVector object.
Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > > get2dViewNonConst()
Return non-const persisting pointers to values.
void update(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &gamma)
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
void abs(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
Put element-wise absolute values of input Multi-vector in target: A = abs(this).
void putScalar(const Scalar &value)
Set all values in the multivector with the given value.
void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &beta)
Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B).
void putScalar(const Scalar &value)
Set all values in the multivector with the given value.
TpetraMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayView< const Scalar > &A, size_t LDA, size_t NumVectors)
Create multivector by copying two-dimensional array of local data.
void norm2(const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using global (row) index.
Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t j) const
Return a Vector which is a const view of column j.
void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &beta)
Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B).
global_size_t getGlobalLength() const
Global number of rows in the multivector.
void scale(Teuchos::ArrayView< const Scalar > alpha)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
Teuchos::ArrayRCP< Scalar > get1dViewNonConst()
Nonconst persisting (1-D) view of this multivector's local values.
RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2) const
void scale(Teuchos::ArrayView< const Scalar > alpha)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Replace value, using local (row) index.
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void update(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta)
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
void reduce()
Sum values of a locally replicated multivector across all processes.
void normInf(const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
Teuchos::ArrayRCP< Scalar > getDataNonConst(size_t j)
View of the local values in a particular vector of this multivector.
void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using local (row) index.
void doImport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Teuchos::ArrayRCP< const Scalar > get1dView() const
Const persisting (1-D) view of this multivector's local values.
void norm1(const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using global (row) index.
void norm2(const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
void scale(const Scalar &alpha)
Scale the current values of a multi-vector, this = alpha*this.
global_size_t getGlobalLength() const
Global number of rows in the multivector.
void get1dCopy(Teuchos::ArrayView< Scalar > A, size_t LDA) const
Fill the given array with a copy of this multivector's local values.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
void reciprocal(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
void meanValue(const Teuchos::ArrayView< Scalar > &means) const
Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined...
virtual ~TpetraMultiVector()
Destructor (virtual for memory safety of derived classes).
LocalOrdinal local_ordinal_type
void meanValue(const Teuchos::ArrayView< Scalar > &means) const
Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined...
void get2dCopy(Teuchos::ArrayView< const Teuchos::ArrayView< Scalar > > ArrayOfPtrs) const
Fill the given array with a copy of this multivector's local values.
void normInf(const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
size_t global_size_t
Global size_t object.
TpetraMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t NumVectors, bool zeroOut=true)
Basic constuctor.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
void update(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &gamma)
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
void doExport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
void abs(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
Put element-wise absolute values of input Multi-vector in target: A = abs(this).
std::string description() const
A simple one-line description of this object.
void doImport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t j) const
Return a Vector which is a const view of column j.
void reciprocal(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
GlobalOrdinal global_ordinal_type
void norm1(const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
TpetraMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayView< const Teuchos::ArrayView< const Scalar > > &ArrayOfPtrs, size_t NumVectors)
Create multivector by copying array of views of local data.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
void dot(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< Scalar > &dots) const
Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]).
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with the given verbosity level to a FancyOStream.
void putScalar(const Scalar &value)
Set all values in the multivector with the given value.
Teuchos::ArrayRCP< const Scalar > getData(size_t j) const
Const view of the local values in a particular vector of this multivector.
void scale(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
Replace multi-vector values with scaled values of A, this = alpha*A.
TpetraMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayView< const Scalar > &A, size_t LDA, size_t NumVectors)
Create multivector by copying two-dimensional array of local data.
TpetraMultiVector(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source)
Copy constructor (performs a deep copy).
void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using global (row) index.
TpetraMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayView< const Scalar > &A, size_t LDA, size_t NumVectors)
Create multivector by copying two-dimensional array of local data.
void normInf(const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
void dot(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< Scalar > &dots) const
Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]).
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void scale(Teuchos::ArrayView< const Scalar > alpha)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > vec_
The Tpetra::MultiVector which this class wraps.
void get1dCopy(Teuchos::ArrayView< Scalar > A, size_t LDA) const
Fill the given array with a copy of this multivector's local values.
void doExport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export data into this object using an Import object ("reverse mode").
CombineMode
Xpetra::Combine Mode enumerable type.
void doImport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
TpetraMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraMultiVectorClass
#define XPETRA_MONITOR(funcName)
Teuchos::ArrayRCP< const Scalar > get1dView() const
Const persisting (1-D) view of this multivector's local values.
size_t getNumVectors() const
Number of columns in the multivector.
RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2) const
Teuchos::ArrayRCP< Scalar > get1dViewNonConst()
Nonconst persisting (1-D) view of this multivector's local values.
TpetraMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > TpetraMultiVectorClass
global_size_t getGlobalLength() const
Global number of rows in the multivector.
RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_MultiVector() const
Get the underlying Tpetra multivector.
size_t getLocalLength() const
Local number of rows on the calling process.
size_t getLocalLength() const
Local number of rows on the calling process.
void abs(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)
Put element-wise absolute values of input Multi-vector in target: A = abs(this).
void randomize(bool bUseXpetraImplementation=false)
Set multi-vector values to random numbers.
Teuchos::ArrayRCP< Teuchos::ArrayRCP< Scalar > > get2dViewNonConst()
Return non-const persisting pointers to values.
void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using local (row) index.
RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetra_MultiVector() const
Get the underlying Tpetra multivector.
Teuchos::ArrayRCP< Teuchos::ArrayRCP< const Scalar > > get2dView() const
Return const persisting pointers to values.
void doExport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export data into this object using an Export object ("forward mode").
TpetraMultiVector(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source)
Copy constructor (performs a deep copy).
Teuchos::ArrayRCP< const Scalar > getData(size_t j) const
Const view of the local values in a particular vector of this multivector.
void randomize(bool bUseXpetraImplementation=false)
Set multi-vector values to random numbers.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with the given verbosity level to a FancyOStream.
void update(const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta)
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Replace value, using local (row) index.
void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using local (row) index.
void replaceMap(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
std::string description() const
A simple one-line description of this object.