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 {
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 &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const int &beta,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &gamma) {
558 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"); }
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 {
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 &alpha,
const MultiVector<int,int,GlobalOrdinal,Node> &A,
const int &beta,
const MultiVector<int,int,GlobalOrdinal,Node> &B,
const int &gamma) {
996 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"); }
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 {
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 RCP< Epetra_IntVector > getEpetra_IntVector() const
RCP< Epetra_IntVector > getEpetra_IntVector() const
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.
size_t getNumVectors() const
Returns the number of vectors in the 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.
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
void putScalar(const int &value)
Initialize all values in a multi-vector with specified value.
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)
void randomize(bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
void setSeed(unsigned int seed)
Set seed for Random function.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
TODO missing comment.
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.
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::ArrayRCP< const int > getData(size_t j) const
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).
void meanValue(const Teuchos::ArrayView< int > &means) const
Compute mean (average) value of each vector in multi-vector.
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the 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 setSeed(unsigned int seed)
Set seed for Random function.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
size_t getNumVectors() const
Returns the number of vectors in the multi-vector.
void maxValue(const Teuchos::ArrayView< int > &maxs) const
Compute max value of each vector in multi-vector.
RCP< Epetra_IntVector > getEpetra_IntVector() const
void replaceMap(const RCP< const Map< int, GlobalOrdinal, Node > > &map)
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< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t j) const
Return a Vector which is a const view of column j.
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
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< 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 some verbosity level to an FancyOStream object.
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 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.
int meanValue() const
Compute mean (average) value of this Vector.
virtual std::string description() const
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this 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.
void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 2-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 sumIntoLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using local (row) index.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void replaceLocalValue(LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
Replace value, using local (row) index.
int maxValue() const
Compute max value of this Vector.
~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.
void doExport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< int, GlobalOrdinal, Node > &importer, 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 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).
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-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 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.
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 putScalar(const int &value)
Initialize all values in a multi-vector with specified value.
void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 2-norm of each vector in multi-vector.
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::RCP< const Map< int, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
int Export(const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
Teuchos::RCP< const Map< int, GlobalOrdinal, Node > > getMap() const
The Map describing the parallel distribution of this object.
std::string description() const
Return a simple one-line description of this object.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
TODO missing comment.
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)
Teuchos::ArrayRCP< int > getDataNonConst(size_t j)
std::string description() const
Return a simple one-line description of this object.
void randomize(bool bUseXpetraImplementation=true)
Set multi-vector values to random numbers.
int meanValue() const
Compute mean (average) value of this Vector.
void doImport(const DistObject< int, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< int, GlobalOrdinal, Node > &exporter, CombineMode CM)
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.
const RCP< const Comm< int > > getComm() const
void norm2(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 2-norm of each vector in multi-vector.
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.
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 norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) 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.
void scale(Teuchos::ArrayView< const int > alpha)
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j].
const RCP< const Comm< int > > getComm() const
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 norm1(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute 1-norm of each vector in multi-vector.
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, 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 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.
Exception throws when you call an unimplemented method of Xpetra.
Teuchos::ScalarTraits< int >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
void doImport(const DistObject< int, int, GlobalOrdinal, Node > &source, const Import< int, GlobalOrdinal, Node > &importer, CombineMode CM)
#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.
size_t getLocalLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
int meanValue() const
Compute mean (average) 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.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
int maxValue() const
Compute max value of this Vector.
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the multi-vector.
~EpetraIntVectorT()
Destructor.
void replaceGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Replace value, using global (row) index.
void sumIntoGlobalValue(GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
Add value to existing value, using global (row) index.
Teuchos::ScalarTraits< int >::magnitudeType norm1() const
Return 1-norm of this Vector.
int dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
TODO missing comment.
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 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 maxValue(const Teuchos::ArrayView< int > &maxs) const
Compute max 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.
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.
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 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)
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 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.
Teuchos::ScalarTraits< int >::magnitudeType norm2() const
Compute 2-norm of this Vector.
CombineMode
Xpetra::Combine Mode enumerable type.
#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.
global_size_t getGlobalLength() const
Returns the global vector length of vectors in the 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.
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.
virtual size_t getNumVectors() const =0
Number of columns in the multivector.
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)
int maxValue() const
Compute max value of this Vector.
EpetraIntVectorT(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
std::string description() const
Return a simple one-line description of this object.
EpetraIntVectorT(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
int Import(const Epetra_SrcDistObject &A, const Epetra_Import &Importer, Epetra_CombineMode CombineMode, const Epetra_OffsetIndex *Indexor=0)
size_t getLocalLength() const
Returns the local vector length on the calling processor of vectors in the multi-vector.
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::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVector(size_t j) const
Return a Vector which is a const view of column j.
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.
const RCP< const Comm< int > > getComm() const
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
void normInf(const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
Compute Inf-norm of each vector in multi-vector.