46 #ifndef XPETRA_EPETRAINTVECTOR_HPP 47 #define XPETRA_EPETRAINTVECTOR_HPP 58 #include "Epetra_IntVector.h" 63 template<
class EpetraGlobalOrdinal,
class Node>
64 class EpetraIntVectorT
65 :
public Vector<int,int,EpetraGlobalOrdinal, Node>
191 void update(
const int &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const int &beta,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &gamma) {
215 void multiply(
Teuchos::ETransp transA,
Teuchos::ETransp transB,
const int &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &beta) {
XPETRA_MONITOR(
"EpetraIntVectorT::multiply");
TEUCHOS_TEST_FOR_EXCEPTION(1,
Xpetra::Exceptions::NotImplemented,
"Not available in Epetra"); }
262 return std::string(
"");
278 return Teuchos::null;
300 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 303 typename dual_view_type::t_host_um getHostLocalView ()
const {
304 throw std::runtime_error(
"EpetraIntVector does not support device views! Must be implemented extra...");
305 typename dual_view_type::t_host_um ret;
309 typename dual_view_type::t_dev_um getDeviceLocalView()
const {
310 throw std::runtime_error(
"Epetra does not support device views!");
311 typename dual_view_type::t_dev_um ret;
325 template<
class TargetDeviceType>
326 typename Kokkos::Impl::if_c<
327 Kokkos::Impl::is_same<
328 typename dual_view_type::t_dev_um::execution_space::memory_space,
329 typename TargetDeviceType::memory_space>::value,
330 typename dual_view_type::t_dev_um,
331 typename dual_view_type::t_host_um>::type
332 getLocalView ()
const {
354 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES 357 :
public virtual Vector<int,int,int,EpetraNode>
373 vec_ =
rcp(
new Epetra_IntVector(eMap->getEpetra_BlockMap(), zeroOut));
423 void putScalar(
const int &value) { vec_->PutValue(value); }
454 int * data = vec_->Values();
455 int localLength = vec_->MyLength();
465 int * data = vec_->Values();
466 int localLength = vec_->MyLength();
520 void update(
const int &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const int &beta,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &gamma) {
544 void multiply(
Teuchos::ETransp transA,
Teuchos::ETransp transB,
const int &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &beta) {
XPETRA_MONITOR(
"EpetraIntVectorT::multiply");
TEUCHOS_TEST_FOR_EXCEPTION(1,
Xpetra::Exceptions::NotImplemented,
"Not available in Epetra"); }
594 std::ostringstream oss;
640 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
641 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
652 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
653 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
664 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
665 int err = vec_->Import(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
676 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
677 int err = vec_->Export(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
688 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 691 typename dual_view_type::t_host_um getHostLocalView ()
const {
692 throw std::runtime_error(
"EpetraIntVector does not support device views! Must be implemented extra...");
693 typename dual_view_type::t_host_um ret;
697 typename dual_view_type::t_dev_um getDeviceLocalView()
const {
698 throw std::runtime_error(
"Epetra does not support device views!");
699 typename dual_view_type::t_dev_um ret;
713 template<
class TargetDeviceType>
714 typename Kokkos::Impl::if_c<
715 Kokkos::Impl::is_same<
716 typename dual_view_type::t_dev_um::execution_space::memory_space,
717 typename TargetDeviceType::memory_space>::value,
718 typename dual_view_type::t_dev_um,
719 typename dual_view_type::t_host_um>::type
720 getLocalView ()
const {
734 const this_type* rhsPtr =
dynamic_cast<const this_type*
> (&rhs);
736 rhsPtr == NULL, std::invalid_argument,
"Xpetra::MultiVector::operator=: " 737 "The left-hand side (LHS) of the assignment has a different type than " 738 "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntVectorT " 739 "(which means it wraps an Epetra_IntVector), but the RHS has some " 740 "other type. This probably means that the RHS wraps either an " 741 "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector " 742 "does not currently implement assignment from a Tpetra object to an " 743 "Epetra object, though this could be added with sufficient interest.");
749 rhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= " 750 "(in Xpetra::EpetraIntVectorT::assign): *this (the right-hand side of " 751 "the assignment) has a null RCP<Epetra_IntVector> inside. Please " 752 "report this bug to the Xpetra developers.");
754 lhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= " 755 "(in Xpetra::EpetraIntVectorT::assign): The left-hand side of the " 756 "assignment has a null RCP<Epetra_IntVector> inside. Please report " 757 "this bug to the Xpetra developers.");
771 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES 774 :
public virtual Vector<int,int,long long,EpetraNode>
790 vec_ =
rcp(
new Epetra_IntVector(eMap->getEpetra_BlockMap(), zeroOut));
840 void putScalar(
const int &value) { vec_->PutValue(value); }
871 int * data = vec_->Values();
872 int localLength = vec_->MyLength();
882 int * data = vec_->Values();
883 int localLength = vec_->MyLength();
937 void update(
const int &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const int &beta,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &gamma) {
961 void multiply(
Teuchos::ETransp transA,
Teuchos::ETransp transB,
const int &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &beta) {
XPETRA_MONITOR(
"EpetraIntVectorT::multiply");
TEUCHOS_TEST_FOR_EXCEPTION(1,
Xpetra::Exceptions::NotImplemented,
"Not available in Epetra"); }
1011 std::ostringstream oss;
1057 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
1058 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
1069 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
1070 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
1081 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
1082 int err = vec_->Import(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
1093 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
1094 int err = vec_->Export(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
1105 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR 1108 typename dual_view_type::t_host_um getHostLocalView ()
const {
1109 throw std::runtime_error(
"EpetraIntVector does not support device views! Must be implemented extra...");
1110 typename dual_view_type::t_host_um ret;
1114 typename dual_view_type::t_dev_um getDeviceLocalView()
const {
1115 throw std::runtime_error(
"Epetra does not support device views!");
1116 typename dual_view_type::t_dev_um ret;
1130 template<
class TargetDeviceType>
1131 typename Kokkos::Impl::if_c<
1132 Kokkos::Impl::is_same<
1133 typename dual_view_type::t_dev_um::execution_space::memory_space,
1134 typename TargetDeviceType::memory_space>::value,
1135 typename dual_view_type::t_dev_um,
1136 typename dual_view_type::t_host_um>::type
1137 getLocalView ()
const {
1151 const this_type* rhsPtr =
dynamic_cast<const this_type*
> (&rhs);
1153 rhsPtr == NULL, std::invalid_argument,
"Xpetra::MultiVector::operator=: " 1154 "The left-hand side (LHS) of the assignment has a different type than " 1155 "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntVectorT " 1156 "(which means it wraps an Epetra_IntVector), but the RHS has some " 1157 "other type. This probably means that the RHS wraps either an " 1158 "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector " 1159 "does not currently implement assignment from a Tpetra object to an " 1160 "Epetra object, though this could be added with sufficient interest.");
1166 rhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= " 1167 "(in Xpetra::EpetraIntVectorT::assign): *this (the right-hand side of " 1168 "the assignment) has a null RCP<Epetra_IntVector> inside. Please " 1169 "report this bug to the Xpetra developers.");
1171 lhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= " 1172 "(in Xpetra::EpetraIntVectorT::assign): The left-hand side of the " 1173 "assignment has a null RCP<Epetra_IntVector> inside. Please report " 1174 "this bug to the Xpetra developers.");
1177 *lhsImpl = *rhsImpl;
1190 #endif // XPETRA_EPETRAINTVECTOR_HPP void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 2-norm of each vector in multi-vector.
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
void update(const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const int &beta, const MultiVector< int, int, GlobalOrdinal, Node > &B, const int &gamma)
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
void maxValue(const Teuchos::ArrayView< int > &maxs) const
Compute max value of each vector in multi-vector.
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
void putScalar(const int &value)
Initialize all values in a multi-vector with specified value.
void meanValue(const Teuchos::ArrayView< int > &means) const
Compute mean (average) value of each vector in multi-vector.
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
void reciprocal(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void replaceMap(const RCP< const Map< int, GlobalOrdinal, Node > > &map)
int meanValue() const
Compute mean (average) value of this Vector.
void randomize(bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
void setSeed(unsigned int seed)
Set seed for Random function.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
void doImport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
void norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
const RCP< const Comm< int > > getComm() const
Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
void update(const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const int &beta)
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using local (row) index.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
size_t getLocalLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void scale(const int &alpha)
Scale the current values of a multi-vector, this = alpha*this.
void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const MultiVector< int, int, GlobalOrdinal, Node > &B, const int &beta)
Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
TODO missing comment.
void setSeed(unsigned int seed)
Set seed for Random function.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
void maxValue(const Teuchos::ArrayView< int > &maxs) const
Compute max value of each vector in multi-vector.
void replaceMap(const RCP< const Map< int, GlobalOrdinal, Node > > &map)
Teuchos::ArrayRCP< const int > getData(size_t j) const
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
RCP< Epetra_IntVector > vec_
The Epetra_IntVector which this class wraps.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
void update(const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const int &beta, const MultiVector< int, int, GlobalOrdinal, Node > &B, const int &gamma)
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void randomize(bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using global (row) index.
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the multi-vector.
void putScalar(const int &value)
Initialize all values in a multi-vector with specified value.
void update(const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const int &beta)
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
int meanValue() const
Compute mean (average) value of this Vector.
void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using local (row) index.
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Replace value, using local (row) index.
~EpetraIntVectorT()
Destructor.
void doImport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
int maxValue() const
Compute max value of this Vector.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
void scale(Teuchos::ArrayView< const int > alpha)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
void reciprocal(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
void elementWiseMultiply(int scalarAB, const Vector< int, int, GlobalOrdinal, Node > &A, const MultiVector< int, int, GlobalOrdinal, Node > &B, int scalarThis)
Element-wise multiply of a Vector A with a EpetraMultiVector B.
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Replace value, using local (row) index.
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
void setSeed(unsigned int seed)
Set seed for Random function.
void maxValue(const Teuchos::ArrayView< int > &maxs) const
Compute max value of each vector in multi-vector.
void putScalar(const int &value)
Initialize all values in a multi-vector with specified value.
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the multi-vector.
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
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 randomize(bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
Teuchos::ArrayRCP< const int > getData(size_t j) const
void doImport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
int maxValue() const
Compute max value of this Vector.
std::string description() const
Return a simple one-line description of this object.
RCP< Epetra_IntVector > getEpetra_IntVector() const
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 2-norm of each vector in multi-vector.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
TODO missing comment.
void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Adds specified value to existing value at the specified location.
void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using local (row) index.
void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const MultiVector< int, int, GlobalOrdinal, Node > &B, const int &beta)
Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
virtual std::string description() const
void scale(Teuchos::ArrayView< const int > alpha)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
void abs(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Adds specified value to existing value at the specified location.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
int meanValue() const
Compute mean (average) value of this Vector.
Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
Exception throws when you call an unimplemented method of Xpetra.
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
void meanValue(const Teuchos::ArrayView< int > &means) const
Compute mean (average) value of each vector in multi-vector.
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
void scale(Teuchos::ArrayView< const int > alpha)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
void scale(const int &alpha)
Scale the current values of a multi-vector, this = alpha*this.
size_t global_size_t
Global size_t object.
void abs(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
static const EVerbosityLevel verbLevel_default
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
int maxValue() const
Compute max value of this Vector.
void update(const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const int &beta)
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
RCP< Epetra_IntVector > getEpetra_IntVector() const
Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t j) const
Return a Vector which is a const view of column j.
#define XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
~EpetraIntVectorT()
Destructor.
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using global (row) index.
const RCP< const Comm< int > > getComm() const
std::string description() const
Return a simple one-line description of this object.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
void scale(const int &alpha)
Scale the current values of a multi-vector, this = alpha*this.
void elementWiseMultiply(int scalarAB, const Vector< int, int, GlobalOrdinal, Node > &A, const MultiVector< int, int, GlobalOrdinal, Node > &B, int scalarThis)
Element-wise multiply of a Vector A with a EpetraMultiVector B.
void multiply(Teuchos::ETransp transA, Teuchos::ETransp transB, const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const MultiVector< int, int, GlobalOrdinal, Node > &B, const int &beta)
Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Adds specified value to existing value at the specified location.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
void meanValue(const Teuchos::ArrayView< int > &means) const
Compute mean (average) value of each vector in multi-vector.
void replaceMap(const RCP< const Map< int, GlobalOrdinal, Node > > &map)
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
TODO missing comment.
Teuchos::ArrayRCP< const int > getData(size_t j) const
void reciprocal(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
EpetraGlobalOrdinal GlobalOrdinal
void abs(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
void norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Replace value, using local (row) index.
RCP< Epetra_IntVector > vec_
The Epetra_IntVector which this class wraps.
CombineMode
Xpetra::Combine Mode enumerable type.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
#define XPETRA_MONITOR(funcName)
~EpetraIntVectorT()
Destructor.
void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using global (row) index.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
void elementWiseMultiply(int scalarAB, const Vector< int, int, GlobalOrdinal, Node > &A, const MultiVector< int, int, GlobalOrdinal, Node > &B, int scalarThis)
Element-wise multiply of a Vector A with a EpetraMultiVector B.
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
const RCP< const Comm< int > > getComm() const
size_t getLocalLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 2-norm of each vector in multi-vector.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
EpetraIntVectorT(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
EpetraIntVectorT(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
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 update(const int &alpha, const MultiVector< int, int, GlobalOrdinal, Node > &A, const int &beta, const MultiVector< int, int, GlobalOrdinal, Node > &B, const int &gamma)
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
size_t getLocalLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
EpetraIntVectorT(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the multi-vector.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
void norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
std::string description() const
Return a simple one-line description of this object.
RCP< Epetra_IntVector > getEpetra_IntVector() const