46#ifndef XPETRA_EPETRAINTVECTOR_HPP
47#define XPETRA_EPETRAINTVECTOR_HPP
52#include "Xpetra_MultiVector.hpp"
58#include "Epetra_IntVector.h"
63template<
class GlobalOrdinal,
class Node>
66template<
class GlobalOrdinal,
class Node>
71 template<
class EpetraGlobalOrdinal,
class Node>
73 :
public Vector<int,int,EpetraGlobalOrdinal, Node>
202 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) {
226 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"); }
276 return std::string(
"");
292 return Teuchos::null;
326#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
329 :
public virtual Vector<int,int,int,EpetraNode>
394 void putScalar(
const int &value) { vec_->PutValue(value); }
413 Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >
getVector(
size_t )
const {
418 Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >
getVectorNonConst(
size_t ) {
424 Teuchos::ArrayRCP<const int>
getData(
size_t )
const {
427 int * data = vec_->Values();
428 int localLength = vec_->MyLength();
430 return ArrayRCP<int>(data, 0, localLength,
false);
438 int * data = vec_->Values();
439 int localLength = vec_->MyLength();
441 return ArrayRCP<int>(data, 0, localLength,
false);
449 void dot(
const MultiVector<int,int,GlobalOrdinal,Node> &,
const Teuchos::ArrayView<int> &)
const {
457 void abs(
const MultiVector<int,int,GlobalOrdinal,Node> &) {
465 void reciprocal(
const MultiVector<int,int,GlobalOrdinal,Node> &) {
473 void scale(
const int &) {
479 void scale (Teuchos::ArrayView< const int > ) {
485 void update(
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &) {
493 void update(
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &) {
517 void multiply(
Teuchos::ETransp ,
Teuchos::ETransp ,
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &) {
XPETRA_MONITOR(
"EpetraIntVectorT::multiply");
TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented,
"Not available in Epetra"); }
520 void elementWiseMultiply(
int ,
const Vector<int,int,GlobalOrdinal,Node> &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
int ) {
522 TEUCHOS_TEST_FOR_EXCEPTION(1, Xpetra::Exceptions::NotImplemented,
"Xpetra_EpetraIntVector: elementWiseMultiply not implemented because Epetra_IntVector does not support this operation");
558 bool isSameSize(
const MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> & vec)
const {
560 const Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> *asvec =
dynamic_cast<const Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> *
>(&vec);
561 if(!asvec)
return false;
563 return ( (vec_->MyLength() == vv.MyLength()) && (
getNumVectors() == vec.getNumVectors()));
576 std::ostringstream oss;
605 const RCP<const Comm<int> >
getComm()
const {
610 Teuchos::RCP<const Map<int, GlobalOrdinal, Node> >
getMap ()
const {
611 RCP<const Epetra_BlockMap> map =
rcp(
new Epetra_BlockMap(vec_->Map()));
612 return rcp (
new Xpetra::EpetraMapT<GlobalOrdinal, Node>(map));
615 void doImport(
const DistObject<int, int, GlobalOrdinal, Node> &source,
616 const Import<int, GlobalOrdinal, Node> &importer,
CombineMode CM) {
620 XPETRA_DYNAMIC_CAST(
const EpetraImportT<GlobalOrdinal XPETRA_COMMA Node>, importer, tImporter,
"Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments.");
622 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
623 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
627 void doExport(
const DistObject<int, LocalOrdinal, GlobalOrdinal, Node> &dest,
628 const Import<int, GlobalOrdinal, Node>& importer,
CombineMode CM) {
632 XPETRA_DYNAMIC_CAST(
const EpetraImportT<GlobalOrdinal XPETRA_COMMA Node>, importer, tImporter,
"Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments.");
634 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
635 int err = vec_->
Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
639 void doImport(
const DistObject<int, LocalOrdinal, GlobalOrdinal, Node> &source,
640 const Export<int, GlobalOrdinal, Node>& exporter,
CombineMode CM) {
644 XPETRA_DYNAMIC_CAST(
const EpetraExportT<GlobalOrdinal XPETRA_COMMA Node>, exporter, tExporter,
"Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments.");
646 const Epetra_IntVector & v = *tSource.getEpetra_IntVector();
647 int err = vec_->
Import(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
651 void doExport(
const DistObject<int, LocalOrdinal, GlobalOrdinal, Node> &dest,
652 const Export<int, GlobalOrdinal, Node>& exporter,
CombineMode CM) {
656 XPETRA_DYNAMIC_CAST(
const EpetraExportT<GlobalOrdinal XPETRA_COMMA Node>, exporter, tExporter,
"Xpetra::EpetraIntVectorT::doImport only accept Xpetra::EpetraImportT as input arguments.");
658 const Epetra_IntVector & v = *tDest.getEpetra_IntVector();
659 int err = vec_->
Export(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
663 void replaceMap(
const RCP<
const Map<int, GlobalOrdinal, Node> >& ) {
671 assign (
const MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>& rhs)
674 const this_type* rhsPtr =
dynamic_cast<const this_type*
> (&rhs);
676 rhsPtr == NULL, std::invalid_argument,
"Xpetra::MultiVector::operator=: "
677 "The left-hand side (LHS) of the assignment has a different type than "
678 "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntVectorT "
679 "(which means it wraps an Epetra_IntVector), but the RHS has some "
680 "other type. This probably means that the RHS wraps either an "
681 "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector "
682 "does not currently implement assignment from a Tpetra object to an "
683 "Epetra object, though this could be added with sufficient interest.");
685 RCP<const Epetra_IntVector> rhsImpl = rhsPtr->getEpetra_IntVector ();
689 rhsImpl.is_null (), std::logic_error,
"Xpetra::MultiVector::operator= "
690 "(in Xpetra::EpetraIntVectorT::assign): *this (the right-hand side of "
691 "the assignment) has a null RCP<Epetra_IntVector> inside. Please "
692 "report this bug to the Xpetra developers.");
694 lhsImpl.is_null (), std::logic_error,
"Xpetra::MultiVector::operator= "
695 "(in Xpetra::EpetraIntVectorT::assign): The left-hand side of the "
696 "assignment has a null RCP<Epetra_IntVector> inside. Please report "
697 "this bug to the Xpetra developers.");
706 RCP< Epetra_IntVector > vec_;
711#ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
714 :
public virtual Vector<int,int,long long,EpetraNode>
811 int * data =
vec_->Values();
812 int localLength =
vec_->MyLength();
822 int * data =
vec_->Values();
823 int localLength =
vec_->MyLength();
877 void update(
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &) {
901 void multiply(
Teuchos::ETransp ,
Teuchos::ETransp ,
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &) {
XPETRA_MONITOR(
"EpetraIntVectorT::multiply");
TEUCHOS_TEST_FOR_EXCEPTION(1,
Xpetra::Exceptions::NotImplemented,
"Not available in Epetra"); }
946 if(!asvec)
return false;
960 std::ostringstream oss;
1007 int err =
vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
1019 int err =
vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
1031 int err =
vec_->Import(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
1043 int err =
vec_->Export(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
1058 const this_type* rhsPtr =
dynamic_cast<const this_type*
> (&rhs);
1060 rhsPtr == NULL, std::invalid_argument,
"Xpetra::MultiVector::operator=: "
1061 "The left-hand side (LHS) of the assignment has a different type than "
1062 "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntVectorT "
1063 "(which means it wraps an Epetra_IntVector), but the RHS has some "
1064 "other type. This probably means that the RHS wraps either an "
1065 "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector "
1066 "does not currently implement assignment from a Tpetra object to an "
1067 "Epetra object, though this could be added with sufficient interest.");
1073 rhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= "
1074 "(in Xpetra::EpetraIntVectorT::assign): *this (the right-hand side of "
1075 "the assignment) has a null RCP<Epetra_IntVector> inside. Please "
1076 "report this bug to the Xpetra developers.");
1078 lhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= "
1079 "(in Xpetra::EpetraIntVectorT::assign): The left-hand side of the "
1080 "assignment has a null RCP<Epetra_IntVector> inside. Please report "
1081 "this bug to the Xpetra developers.");
1084 *lhsImpl = *rhsImpl;
#define XPETRA_MONITOR(funcName)
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
int Import(const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
int Export(const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
static const EVerbosityLevel verbLevel_default
virtual std::string description() const
Teuchos::ArrayRCP< int > getDataNonConst(size_t)
void doImport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import data into this object using an Export object ("reverse mode").
RCP< Epetra_IntVector > getEpetra_IntVector() const
void scale(const int &)
Scale the current values of a multi-vector, this = alpha*this.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &) const
TODO missing comment.
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &) const
Compute Inf-norm of each vector in multi-vector.
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
Teuchos::ArrayRCP< const int > getData(size_t) const
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
void reciprocal(const MultiVector< int, int, GlobalOrdinal, Node > &)
Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,...
void abs(const MultiVector< int, int, GlobalOrdinal, Node > &)
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
void replaceGlobalValue(GlobalOrdinal, size_t, const Scalar &)
Replace value, using global (row) index.
RCP< Epetra_IntVector > vec_
The Epetra_IntVector which this class wraps.
void norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &) const
Compute 1-norm of each vector in multi-vector.
void maxValue(const Teuchos::ArrayView< int > &) const
Compute max value of each vector in multi-vector.
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 sumIntoLocalValue(LocalOrdinal, size_t, const Scalar &)
Add value to existing value, using local (row) index.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export data into this object using an Export object ("forward mode").
const RCP< const Comm< int > > getComm() const
Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t) const
Return a Vector which is a const view of column j.
void randomize(const Scalar &, const Scalar &, bool=true)
Set multi-vector values to random numbers.
void elementWiseMultiply(int, const Vector< int, int, GlobalOrdinal, Node > &, const MultiVector< int, int, GlobalOrdinal, Node > &, int)
Element-wise multiply of a Vector A with a EpetraMultiVector B.
void meanValue(const Teuchos::ArrayView< int > &) const
Compute mean (average) value of each vector in multi-vector.
int meanValue() const
Compute mean (average) value of this Vector.
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void putScalar(const int &value)
Initialize all values in a multi-vector with specified value.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
size_t getLocalLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
void sumIntoGlobalValue(GlobalOrdinal, size_t, const Scalar &)
Add value to existing value, using global (row) index.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
void update(const int &, const MultiVector< int, int, GlobalOrdinal, Node > &, const int &, const MultiVector< int, int, GlobalOrdinal, Node > &, const int &)
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &) const
Compute 2-norm of each vector in multi-vector.
void sumIntoGlobalValue(GlobalOrdinal, const Scalar &)
Adds specified value to existing value at the specified location.
void replaceLocalValue(LocalOrdinal, size_t, const Scalar &)
Replace value, using local (row) index.
~EpetraIntVectorT()
Destructor.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t)
Return a Vector which is a nonconst view of column j.
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
Import data into this object using an Import object ("forward mode").
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the multi-vector.
void randomize(bool=true)
Set multi-vector values to random numbers.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
Export data into this object using an Import object ("reverse mode").
void setSeed(unsigned int)
Set seed for Random function.
void replaceGlobalValue(GlobalOrdinal, const Scalar &)
Replace current value at the specified location with specified value.
std::string description() const
Return a simple one-line description of this object.
void replaceMap(const RCP< const Map< int, GlobalOrdinal, Node > > &)
int maxValue() const
Compute max value of this Vector.
void update(const int &, const MultiVector< int, int, GlobalOrdinal, Node > &, const int &)
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
bool isSameSize(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &vec) const
Checks to see if the local length, number of vectors and size of Scalar type match.
void dot(const MultiVector< int, int, GlobalOrdinal, Node > &, const Teuchos::ArrayView< int > &) const
Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i])
EpetraIntVectorT(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
void multiply(Teuchos::ETransp, Teuchos::ETransp, const int &, const MultiVector< int, int, GlobalOrdinal, Node > &, const MultiVector< int, int, GlobalOrdinal, Node > &, const int &)
Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).
void scale(Teuchos::ArrayView< const int >)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
void replaceMap(const RCP< const Map< int, GlobalOrdinal, Node > > &map)
void abs(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise absolute values of input Multi-vector in target: A = abs(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).
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
void norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
Export data into this object using an Import object ("reverse mode").
EpetraIntVectorT(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
RCP< Epetra_IntVector > getEpetra_IntVector() const
void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Replace value, using local (row) index.
std::string description() const
Return a simple one-line description of this object.
void putScalar(const int &value)
Initialize all values in a multi-vector with specified value.
int maxValue() const
Compute max value of this Vector.
void randomize(const Scalar &, const Scalar &, bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
void doImport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
Import data into this object using an Export object ("reverse mode").
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
Import data into this object using an Import object ("forward mode").
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the multi-vector.
void dot(const MultiVector< int, int, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< int > &dots) const
Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i])
Teuchos::ArrayRCP< const int > getData(size_t j) const
void meanValue(const Teuchos::ArrayView< int > &means) const
Compute mean (average) value of each vector in multi-vector.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
void randomize(bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
const RCP< const Comm< int > > getComm() const
void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Adds specified value to existing value at the specified location.
EpetraGlobalOrdinal GlobalOrdinal
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,...
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using global (row) index.
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
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 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.
bool isSameSize(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &vec) const
Checks to see if the local length, number of vectors and size of Scalar type match.
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
Export data into this object using an Export object ("forward mode").
void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 2-norm of each vector in multi-vector.
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)
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.
size_t getLocalLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
void scale(Teuchos::ArrayView< const int > alpha)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
void setSeed(unsigned int seed)
Set seed for Random function.
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
void maxValue(const Teuchos::ArrayView< int > &maxs) const
Compute max value of each vector in multi-vector.
void scale(const int &alpha)
Scale the current values of a multi-vector, this = alpha*this.
~EpetraIntVectorT()
Destructor.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
TODO missing comment.
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
int meanValue() const
Compute mean (average) value of this Vector.
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.
Exception throws when you call an unimplemented method of Xpetra.
virtual size_t getNumVectors() const =0
Number of columns in the multivector.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
TypeTo as(const TypeFrom &t)
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
basic_FancyOStream< char > FancyOStream
size_t global_size_t
Global size_t object.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Kokkos::Compat::KokkosSerialWrapperNode EpetraNode
CombineMode
Xpetra::Combine Mode enumerable type.