46 #ifndef XPETRA_EPETRAINTVECTOR_HPP
47 #define XPETRA_EPETRAINTVECTOR_HPP
58 #include "Epetra_IntVector.h"
63 template<
class GlobalOrdinal,
class Node>
66 template<
class GlobalOrdinal,
class Node>
71 template<
class EpetraGlobalOrdinal,
class Node>
72 class EpetraIntVectorT
73 :
public Vector<int,int,EpetraGlobalOrdinal, Node>
199 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) {
223 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"); }
273 return std::string(
"");
289 return Teuchos::null;
311 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
314 typename dual_view_type::t_host_um getHostLocalView ()
const {
315 throw std::runtime_error(
"EpetraIntVector does not support device views! Must be implemented extra...");
316 #ifndef __NVCC__ //prevent nvcc warning
317 typename dual_view_type::t_host_um ret;
322 typename dual_view_type::t_dev_um getDeviceLocalView()
const {
323 throw std::runtime_error(
"Epetra does not support device views!");
324 #ifndef __NVCC__ //prevent nvcc warning
325 typename dual_view_type::t_dev_um ret;
340 template<
class TargetDeviceType>
341 typename Kokkos::Impl::if_c<
342 Kokkos::Impl::is_same<
343 typename dual_view_type::t_dev_um::execution_space::memory_space,
344 typename TargetDeviceType::memory_space>::value,
345 typename dual_view_type::t_dev_um,
346 typename dual_view_type::t_host_um>::type
347 getLocalView ()
const {
348 return this->MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::template getLocalView<TargetDeviceType>();
369 #ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES
372 :
public virtual Vector<int,int,int,EpetraNode>
437 void putScalar(
const int &value) { vec_->PutValue(value); }
468 int * data = vec_->Values();
469 int localLength = vec_->MyLength();
479 int * data = vec_->Values();
480 int localLength = vec_->MyLength();
534 void update(
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &) {
558 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"); }
602 if(!asvec)
return false;
617 std::ostringstream oss;
664 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
676 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
688 int err = vec_->Import(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
700 int err = vec_->Export(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
711 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
714 typename dual_view_type::t_host_um getHostLocalView ()
const {
715 typedef Kokkos::View<
typename dual_view_type::t_host::data_type ,
717 typename dual_view_type::t_host::device_type ,
718 Kokkos::MemoryUnmanaged> epetra_view_type;
722 vec_->ExtractView(&data);
723 int localLength = vec_->MyLength();
726 epetra_view_type test = epetra_view_type(data, localLength,1);
727 typename dual_view_type::t_host_um ret = subview(test, Kokkos::ALL(), Kokkos::ALL());
732 typename dual_view_type::t_dev_um getDeviceLocalView()
const {
733 throw std::runtime_error(
"Epetra does not support device views!");
734 #ifndef __NVCC__ //prevent nvcc warning
735 typename dual_view_type::t_dev_um ret;
750 template<
class TargetDeviceType>
751 typename Kokkos::Impl::if_c<
752 Kokkos::Impl::is_same<
753 typename dual_view_type::t_dev_um::execution_space::memory_space,
754 typename TargetDeviceType::memory_space>::value,
755 typename dual_view_type::t_dev_um,
756 typename dual_view_type::t_host_um>::type
757 getLocalView ()
const {
758 return this->MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::template getLocalView<TargetDeviceType>();
771 const this_type* rhsPtr =
dynamic_cast<const this_type*
> (&rhs);
773 rhsPtr == NULL, std::invalid_argument,
"Xpetra::MultiVector::operator=: "
774 "The left-hand side (LHS) of the assignment has a different type than "
775 "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntVectorT "
776 "(which means it wraps an Epetra_IntVector), but the RHS has some "
777 "other type. This probably means that the RHS wraps either an "
778 "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector "
779 "does not currently implement assignment from a Tpetra object to an "
780 "Epetra object, though this could be added with sufficient interest.");
786 rhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= "
787 "(in Xpetra::EpetraIntVectorT::assign): *this (the right-hand side of "
788 "the assignment) has a null RCP<Epetra_IntVector> inside. Please "
789 "report this bug to the Xpetra developers.");
791 lhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= "
792 "(in Xpetra::EpetraIntVectorT::assign): The left-hand side of the "
793 "assignment has a null RCP<Epetra_IntVector> inside. Please report "
794 "this bug to the Xpetra developers.");
808 #ifndef XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES
811 :
public virtual Vector<int,int,long long,EpetraNode>
875 void putScalar(
const int &value) { vec_->PutValue(value); }
906 int * data = vec_->Values();
907 int localLength = vec_->MyLength();
917 int * data = vec_->Values();
918 int localLength = vec_->MyLength();
972 void update(
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &,
const MultiVector<int,int,GlobalOrdinal,Node> &,
const int &) {
996 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"); }
1041 if(!asvec)
return false;
1055 std::ostringstream oss;
1102 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
1114 int err = vec_->Import(v, *tImporter.getEpetra_Import(),
toEpetra(CM));
1126 int err = vec_->Import(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
1138 int err = vec_->Export(v, *tExporter.getEpetra_Export(),
toEpetra(CM));
1149 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
1152 typename dual_view_type::t_host_um getHostLocalView ()
const {
1153 typedef Kokkos::View<
typename dual_view_type::t_host::data_type ,
1155 typename dual_view_type::t_host::device_type ,
1156 Kokkos::MemoryUnmanaged> epetra_view_type;
1160 vec_->ExtractView(&data);
1161 int localLength = vec_->MyLength();
1164 epetra_view_type test = epetra_view_type(data, localLength, 1);
1165 typename dual_view_type::t_host_um ret = subview(test, Kokkos::ALL(), Kokkos::ALL());
1170 typename dual_view_type::t_dev_um getDeviceLocalView()
const {
1171 throw std::runtime_error(
"Epetra does not support device views!");
1172 #ifndef __NVCC__ //prevent nvcc warning
1173 typename dual_view_type::t_dev_um ret;
1188 template<
class TargetDeviceType>
1189 typename Kokkos::Impl::if_c<
1190 Kokkos::Impl::is_same<
1191 typename dual_view_type::t_dev_um::execution_space::memory_space,
1192 typename TargetDeviceType::memory_space>::value,
1193 typename dual_view_type::t_dev_um,
1194 typename dual_view_type::t_host_um>::type
1195 getLocalView ()
const {
1196 return this->MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::template getLocalView<TargetDeviceType>();
1209 const this_type* rhsPtr =
dynamic_cast<const this_type*
> (&rhs);
1211 rhsPtr == NULL, std::invalid_argument,
"Xpetra::MultiVector::operator=: "
1212 "The left-hand side (LHS) of the assignment has a different type than "
1213 "the right-hand side (RHS). The LHS has type Xpetra::EpetraIntVectorT "
1214 "(which means it wraps an Epetra_IntVector), but the RHS has some "
1215 "other type. This probably means that the RHS wraps either an "
1216 "Tpetra::MultiVector, or an Epetra_MultiVector. Xpetra::MultiVector "
1217 "does not currently implement assignment from a Tpetra object to an "
1218 "Epetra object, though this could be added with sufficient interest.");
1224 rhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= "
1225 "(in Xpetra::EpetraIntVectorT::assign): *this (the right-hand side of "
1226 "the assignment) has a null RCP<Epetra_IntVector> inside. Please "
1227 "report this bug to the Xpetra developers.");
1229 lhsImpl.
is_null (), std::logic_error,
"Xpetra::MultiVector::operator= "
1230 "(in Xpetra::EpetraIntVectorT::assign): The left-hand side of the "
1231 "assignment has a null RCP<Epetra_IntVector> inside. Please report "
1232 "this bug to the Xpetra developers.");
1235 *lhsImpl = *rhsImpl;
1248 #endif // XPETRA_EPETRAINTVECTOR_HPP
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t)
Return a Vector which is a nonconst view of column j.
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
void replaceGlobalValue(GlobalOrdinal, size_t, const Scalar &)
Replace value, using global (row) index.
std::string description() const
Return a simple one-line description of this object.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &) const
TODO missing comment.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t)
Return a Vector which is a nonconst view of column j.
Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t) const
Return a Vector which is a const view of column j.
Teuchos::ArrayRCP< const int > getData(size_t j) const
void scale(Teuchos::ArrayView< const int > alpha)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void meanValue(const Teuchos::ArrayView< int > &means) const
Compute mean (average) value of each vector in multi-vector.
void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &) const
Compute 2-norm of each vector in multi-vector.
void replaceLocalValue(LocalOrdinal, size_t, const Scalar &)
Replace value, using local (row) index.
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
int meanValue() const
Compute mean (average) value of this Vector.
Teuchos::ArrayRCP< const int > getData(size_t) const
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void scale(const int &)
Scale the current values of a multi-vector, this = alpha*this.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
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::ArrayRCP< int > getDataNonConst(size_t)
void randomize(bool=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)
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 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.
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.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this 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.
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 norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 2-norm of each vector in multi-vector.
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &) const
Compute Inf-norm of each vector in multi-vector.
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
void setSeed(unsigned int)
Set seed for Random function.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void randomize(bool=true)
Set multi-vector values to random numbers.
void replaceLocalValue(LocalOrdinal, size_t, const Scalar &)
Replace value, using local (row) index.
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.
Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
const Epetra_CrsGraph & toEpetra(const RCP< const CrsGraph< int, GlobalOrdinal, Node > > &graph)
RCP< Epetra_IntVector > vec_
The Epetra_IntVector which this class wraps.
Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
void meanValue(const Teuchos::ArrayView< int > &) const
Compute mean (average) value of each vector in multi-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.
int meanValue() const
Compute mean (average) value of this Vector.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void replaceMap(const RCP< const Map< int, GlobalOrdinal, Node > > &)
void sumIntoGlobalValue(GlobalOrdinal, const Scalar &)
Adds specified value to existing value at the specified location.
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.
void putScalar(const int &value)
Initialize all values in a multi-vector with specified value.
int meanValue() const
Compute mean (average) value of this Vector.
void meanValue(const Teuchos::ArrayView< int > &) const
Compute mean (average) value of each vector in multi-vector.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
~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 norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
void putScalar(const int &value)
Initialize all values in a multi-vector with specified value.
Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t) const
Return a Vector which is a const view of column j.
EpetraIntVectorT(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
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,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.
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.
void replaceGlobalValue(GlobalOrdinal, size_t, const Scalar &)
Replace value, using global (row) index.
const RCP< const Comm< int > > getComm() const
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 reciprocal(const MultiVector< int, int, GlobalOrdinal, Node > &)
Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
std::string description() const
Return a simple one-line description of this object.
void maxValue(const Teuchos::ArrayView< int > &) const
Compute max value of each vector in multi-vector.
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 scale(Teuchos::ArrayView< const int >)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
RCP< Epetra_IntVector > getEpetra_IntVector() const
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
void norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &) 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.
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
void scale(Teuchos::ArrayView< const int >)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
size_t getLocalLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
void maxValue(const Teuchos::ArrayView< int > &maxs) const
Compute max value of each vector in multi-vector.
virtual std::string description() const
Teuchos::ArrayRCP< int > getDataNonConst(size_t)
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
Teuchos::ArrayRCP< const int > getData(size_t) const
virtual void assign(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)
Implementation of the assignment operator (operator=); does a deep copy.
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
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.
void randomize(bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
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 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 norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &) 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.
Exception throws when you call an unimplemented method of Xpetra.
EpetraGlobalOrdinal GlobalOrdinal
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &) const
TODO missing comment.
void replaceGlobalValue(GlobalOrdinal, const Scalar &)
Replace current value at the specified location with specified value.
void sumIntoGlobalValue(GlobalOrdinal, size_t, const Scalar &)
Add value to existing value, using global (row) index.
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
RCP< Epetra_IntVector > getEpetra_IntVector() const
#define XPETRA_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
void replaceMap(const RCP< const Map< int, GlobalOrdinal, Node > > &)
size_t global_size_t
Global size_t object.
static const EVerbosityLevel verbLevel_default
int maxValue() const
Compute max value of this Vector.
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 sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
RCP< Epetra_IntVector > getEpetra_IntVector() const
void replaceMap(const RCP< const Map< int, GlobalOrdinal, Node > > &map)
void setSeed(unsigned int)
Set seed for Random function.
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 describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Print the object with some verbosity level to an FancyOStream object.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(size_t j)
Return a Vector which is a nonconst view of column j.
const RCP< const Comm< int > > getComm() const
int maxValue() const
Compute max value of this Vector.
~EpetraIntVectorT()
Destructor.
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.
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
void setSeed(unsigned int seed)
Set seed for Random function.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
void replaceGlobalValue(GlobalOrdinal, const Scalar &)
Replace current value at the specified location with specified value.
void abs(const MultiVector< int, int, GlobalOrdinal, Node > &A)
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using local (row) index.
void sumIntoGlobalValue(GlobalOrdinal, const Scalar &)
Adds specified value to existing value at the specified location.
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.
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
void abs(const MultiVector< int, int, GlobalOrdinal, Node > &)
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
RCP< Epetra_IntVector > vec_
The Epetra_IntVector which this class wraps.
CombineMode
Xpetra::Combine Mode enumerable type.
void sumIntoGlobalValue(GlobalOrdinal, size_t, const Scalar &)
Add value to existing value, using global (row) index.
void abs(const MultiVector< int, int, GlobalOrdinal, Node > &)
Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
void sumIntoLocalValue(LocalOrdinal, size_t, const Scalar &)
Add value to existing value, using local (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.
#define XPETRA_MONITOR(funcName)
~EpetraIntVectorT()
Destructor.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
TODO missing comment.
void sumIntoLocalValue(LocalOrdinal, size_t, const Scalar &)
Add value to existing value, using local (row) index.
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.
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
virtual size_t getNumVectors() const =0
Number of columns in the multivector.
void scale(const int &alpha)
Scale the current values of a multi-vector, this = alpha*this.
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.
void maxValue(const Teuchos::ArrayView< int > &) const
Compute max value of each vector in 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 norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &) const
Compute 2-norm of each vector in multi-vector.
EpetraIntVectorT(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
size_t getLocalLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
void scale(const int &)
Scale the current values of a multi-vector, this = alpha*this.
void doImport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &) const
Compute Inf-norm of each vector in multi-vector.
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the multi-vector.
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
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.
std::string description() const
Return a simple one-line description of this object.