All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions | Private Types | Private Attributes
Xpetra::EpetraIntVector Class Reference

#include <Xpetra_EpetraIntVector.hpp>

Inheritance diagram for Xpetra::EpetraIntVector:
Xpetra::Vector< int, int, int > Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > Xpetra::DistObject< int, int, int, Kokkos::DefaultNode::DefaultNodeType > Describable

List of all members.

Public Member Functions

RCP< Epetra_IntVector > getEpetra_IntVector () const
const RCP< const Comm< int > > getComm () const
const Teuchos::RCP< const Map
< int, int > > 
getMap () const
 The Map with which this DistObject was constructed.
void doImport (const DistObject< int, int, int > &source, const Import< int, int > &importer, CombineMode CM)
void doExport (const DistObject< int, int, int > &dest, const Import< int, int > &importer, CombineMode CM)
void doImport (const DistObject< int, int, int > &source, const Export< int, int > &exporter, CombineMode CM)
void doExport (const DistObject< int, int, int > &dest, const Export< int, int > &exporter, CombineMode CM)

Private Types

typedef int Scalar
typedef int LocalOrdinal
typedef int GlobalOrdinal
typedef
Kokkos::DefaultNode::DefaultNodeType 
Node

Private Attributes

RCP< Epetra_IntVector > vec_

Constructor/Destructor Methods

 EpetraIntVector (const Teuchos::RCP< const Map< int, int > > &map, bool zeroOut=true)
 Sets all vector entries to zero.
 ~EpetraIntVector ()
 Destructor.

Mathematical methods

int dot (const Vector< int, int, int > &a) const
 TODO missing comment.
Teuchos::ScalarTraits< int >
::magnitudeType 
norm1 () const
 Return 1-norm of this Vector.
Teuchos::ScalarTraits< int >
::magnitudeType 
norm2 () const
 Compute 2-norm of this Vector.
Teuchos::ScalarTraits< int >
::magnitudeType 
normInf () const
 Compute Inf-norm of this Vector.
Teuchos::ScalarTraits< int >
::magnitudeType 
normWeighted (const Vector< int, int, int > &weights) const
 Compute Weighted 2-norm (RMS Norm) of this Vector.
int meanValue () const
 Compute mean (average) value of this Vector.
int maxValue () const
 Compute max value of this Vector.
void dot (const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A, const Teuchos::ArrayView< int > &dots) const
 Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i])
void abs (const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A)
 Puts element-wise absolute values of input Multi-vector in target: A = abs(this)
void reciprocal (const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A)
 Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
void scale (const int &alpha)
 Scale the current values of a multi-vector, this = alpha*this.
void update (const int &alpha, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A, const int &beta)
 Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
void update (const int &alpha, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A, const int &beta, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &B, const int &gamma)
 Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
void norm1 (const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
 Compute 1-norm of each vector in multi-vector.
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 > &norms) const
 Compute Inf-norm of each vector in multi-vector.
void normWeighted (const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &weights, const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &norms) const
 Compute Weighted 2-norm (RMS Norm) of each vector in multi-vector.
void meanValue (const Teuchos::ArrayView< int > &means) const
 Compute mean (average) value of each vector in multi-vector.
void maxValue (const Teuchos::ArrayView< int > &maxs) const
 Compute max value of each vector in multi-vector.
void multiply (Teuchos::ETransp transA, Teuchos::ETransp transB, const int &alpha, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &B, const int &beta)
 Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).
void elementWiseMultiply (int scalarAB, const Vector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &A, const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &B, int scalarThis)
 Element-wise multiply of a Vector A with a EpetraMultiVector B.

Post-construction modification routines

void replaceGlobalValue (GlobalOrdinal globalRow, const Scalar &value)
 Replace current value at the specified location with specified value.
void sumIntoGlobalValue (GlobalOrdinal globalRow, const Scalar &value)
 Adds specified value to existing value at the specified location.
void replaceLocalValue (LocalOrdinal myRow, const Scalar &value)
 Replace current value at the specified location with specified values.
void sumIntoLocalValue (LocalOrdinal myRow, const Scalar &value)
 Adds specified value to existing value at the specified location.
void putScalar (const int &value)
 Initialize all values in a multi-vector with specified value.
void randomize (bool bUseXpetraImplementation=true)
 Set multi-vector values to random numbers.
void setSeed (unsigned int seed)
 Set seed for Random function.
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.
void replaceLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
 Replace value, using local (row) index.
void sumIntoLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
 Add value to existing value, using local (row) index.

Data Copy and View get methods

Teuchos::ArrayRCP< const int > getData (size_t j) const
Teuchos::ArrayRCP< int > getDataNonConst (size_t j)

Attribute access functions

size_t getNumVectors () const
 Returns the number of vectors in the multi-vector.
size_t getLocalLength () const
 Returns the local vector length on the calling processor of vectors in the multi-vector.
global_size_t getGlobalLength () const
 Returns the global vector length of vectors in the multi-vector.

Overridden from Teuchos::Describable

std::string description () const
 Return a simple one-line description of this object.
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.

Detailed Description

Definition at line 62 of file Xpetra_EpetraIntVector.hpp.


Member Typedef Documentation

typedef int Xpetra::EpetraIntVector::Scalar [private]

Definition at line 66 of file Xpetra_EpetraIntVector.hpp.

Definition at line 67 of file Xpetra_EpetraIntVector.hpp.

Definition at line 68 of file Xpetra_EpetraIntVector.hpp.

Definition at line 69 of file Xpetra_EpetraIntVector.hpp.


Constructor & Destructor Documentation

Xpetra::EpetraIntVector::EpetraIntVector ( const Teuchos::RCP< const Map< int, int > > &  map,
bool  zeroOut = true 
) [inline, explicit]

Sets all vector entries to zero.

Definition at line 77 of file Xpetra_EpetraIntVector.hpp.

Destructor.

Definition at line 84 of file Xpetra_EpetraIntVector.hpp.


Member Function Documentation

int Xpetra::EpetraIntVector::dot ( const Vector< int, int, int > &  a) const

TODO missing comment.

Definition at line 60 of file Xpetra_EpetraIntVector.cpp.

Teuchos::ScalarTraits< int >::magnitudeType Xpetra::EpetraIntVector::norm1 ( ) const [virtual]

Return 1-norm of this Vector.

Implements Xpetra::Vector< int, int, int >.

Definition at line 62 of file Xpetra_EpetraIntVector.cpp.

Teuchos::ScalarTraits< int >::magnitudeType Xpetra::EpetraIntVector::norm2 ( ) const [virtual]

Compute 2-norm of this Vector.

Implements Xpetra::Vector< int, int, int >.

Definition at line 64 of file Xpetra_EpetraIntVector.cpp.

Teuchos::ScalarTraits< int >::magnitudeType Xpetra::EpetraIntVector::normInf ( ) const [virtual]

Compute Inf-norm of this Vector.

Implements Xpetra::Vector< int, int, int >.

Definition at line 66 of file Xpetra_EpetraIntVector.cpp.

Teuchos::ScalarTraits< int >::magnitudeType Xpetra::EpetraIntVector::normWeighted ( const Vector< int, int, int > &  weights) const

Compute Weighted 2-norm (RMS Norm) of this Vector.

Definition at line 68 of file Xpetra_EpetraIntVector.cpp.

int Xpetra::EpetraIntVector::meanValue ( ) const [virtual]

Compute mean (average) value of this Vector.

Implements Xpetra::Vector< int, int, int >.

Definition at line 70 of file Xpetra_EpetraIntVector.cpp.

Compute max value of this Vector.

Definition at line 72 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::replaceGlobalValue ( GlobalOrdinal  globalRow,
const Scalar value 
) [virtual]

Replace current value at the specified location with specified value.

Implements Xpetra::Vector< int, int, int >.

Definition at line 52 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::sumIntoGlobalValue ( GlobalOrdinal  globalRow,
const Scalar value 
) [virtual]

Adds specified value to existing value at the specified location.

Implements Xpetra::Vector< int, int, int >.

Definition at line 54 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::replaceLocalValue ( LocalOrdinal  myRow,
const Scalar value 
) [virtual]

Replace current value at the specified location with specified values.

Implements Xpetra::Vector< int, int, int >.

Definition at line 56 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::sumIntoLocalValue ( LocalOrdinal  myRow,
const Scalar value 
) [virtual]

Adds specified value to existing value at the specified location.

Implements Xpetra::Vector< int, int, int >.

Definition at line 58 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::putScalar ( const int &  value) [inline, virtual]

Initialize all values in a multi-vector with specified value.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 130 of file Xpetra_EpetraIntVector.hpp.

void Xpetra::EpetraIntVector::randomize ( bool  bUseXpetraImplementation = true) [virtual]

Set multi-vector values to random numbers.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 74 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::setSeed ( unsigned int  seed) [virtual]

Set seed for Random function.

Note: this method does not exist in Tpetra interface. Added for MueLu.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 76 of file Xpetra_EpetraIntVector.cpp.

Teuchos::ArrayRCP< const int > Xpetra::EpetraIntVector::getData ( size_t  j) const [virtual]

Const Local vector access function. View of the local values in a particular vector of this multi-vector.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 78 of file Xpetra_EpetraIntVector.cpp.

Teuchos::ArrayRCP< int > Xpetra::EpetraIntVector::getDataNonConst ( size_t  j) [virtual]

Local vector access function. View of the local values in a particular vector of this multi-vector.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 87 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::dot ( const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  A,
const Teuchos::ArrayView< int > &  dots 
) const [virtual]

Computes dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i])

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

void Xpetra::EpetraIntVector::abs ( const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  A) [virtual]

Puts element-wise absolute values of input Multi-vector in target: A = abs(this)

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 103 of file Xpetra_EpetraIntVector.cpp.

Puts element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 110 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::scale ( const int &  alpha) [virtual]

Scale the current values of a multi-vector, this = alpha*this.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 117 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::update ( const int &  alpha,
const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  A,
const int &  beta 
) [virtual]

Update multi-vector values with scaled values of A, this = beta*this + alpha*A.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

void Xpetra::EpetraIntVector::update ( const int &  alpha,
const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  A,
const int &  beta,
const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  B,
const int &  gamma 
) [virtual]

Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

void Xpetra::EpetraIntVector::norm1 ( const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &  norms) const

Compute 1-norm of each vector in multi-vector.

Definition at line 134 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::norm2 ( const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &  norms) const

Compute 2-norm of each vector in multi-vector.

Definition at line 136 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::normInf ( const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &  norms) const

Compute Inf-norm of each vector in multi-vector.

Definition at line 138 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::normWeighted ( const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  weights,
const Teuchos::ArrayView< Teuchos::ScalarTraits< int >::magnitudeType > &  norms 
) const

Compute Weighted 2-norm (RMS Norm) of each vector in multi-vector.

void Xpetra::EpetraIntVector::meanValue ( const Teuchos::ArrayView< int > &  means) const [virtual]

Compute mean (average) value of each vector in multi-vector.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 142 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::maxValue ( const Teuchos::ArrayView< int > &  maxs) const

Compute max value of each vector in multi-vector.

Definition at line 144 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::multiply ( Teuchos::ETransp  transA,
Teuchos::ETransp  transB,
const int &  alpha,
const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  A,
const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  B,
const int &  beta 
) [virtual]

Matrix-Matrix multiplication, this = beta*this + alpha*op(A)*op(B).

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 146 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::elementWiseMultiply ( int  scalarAB,
const Vector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  A,
const MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType > &  B,
int  scalarThis 
) [virtual]

Element-wise multiply of a Vector A with a EpetraMultiVector B.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 148 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::replaceGlobalValue ( GlobalOrdinal  globalRow,
size_t  vectorIndex,
const Scalar value 
) [virtual]

Replace value, using global (row) index.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 154 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::sumIntoGlobalValue ( GlobalOrdinal  globalRow,
size_t  vectorIndex,
const Scalar value 
) [virtual]

Add value to existing value, using global (row) index.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 156 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::replaceLocalValue ( LocalOrdinal  myRow,
size_t  vectorIndex,
const Scalar value 
) [virtual]

Replace value, using local (row) index.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 158 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::sumIntoLocalValue ( LocalOrdinal  myRow,
size_t  vectorIndex,
const Scalar value 
) [virtual]

Add value to existing value, using local (row) index.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 160 of file Xpetra_EpetraIntVector.cpp.

size_t Xpetra::EpetraIntVector::getNumVectors ( ) const [virtual]

Returns the number of vectors in the multi-vector.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 162 of file Xpetra_EpetraIntVector.cpp.

size_t Xpetra::EpetraIntVector::getLocalLength ( ) const [inline, virtual]

Returns the local vector length on the calling processor of vectors in the multi-vector.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 223 of file Xpetra_EpetraIntVector.hpp.

Returns the global vector length of vectors in the multi-vector.

Implements Xpetra::MultiVector< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 226 of file Xpetra_EpetraIntVector.hpp.

std::string Xpetra::EpetraIntVector::description ( ) const [virtual]

Return a simple one-line description of this object.

Implements Xpetra::Vector< int, int, int >.

Definition at line 164 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const [virtual]

Print the object with some verbosity level to an FancyOStream object.

Implements Xpetra::Vector< int, int, int >.

Definition at line 175 of file Xpetra_EpetraIntVector.cpp.

RCP< Epetra_IntVector > Xpetra::EpetraIntVector::getEpetra_IntVector ( ) const [inline]

Definition at line 241 of file Xpetra_EpetraIntVector.hpp.

const RCP<const Comm<int> > Xpetra::EpetraIntVector::getComm ( ) const [inline]

Definition at line 243 of file Xpetra_EpetraIntVector.hpp.

const Teuchos::RCP<const Map<int,int> > Xpetra::EpetraIntVector::getMap ( ) const [inline, virtual]

The Map with which this DistObject was constructed.

Implements Xpetra::DistObject< int, int, int, Kokkos::DefaultNode::DefaultNodeType >.

Definition at line 248 of file Xpetra_EpetraIntVector.hpp.

void Xpetra::EpetraIntVector::doImport ( const DistObject< int, int, int > &  source,
const Import< int, int > &  importer,
CombineMode  CM 
)

Definition at line 195 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::doExport ( const DistObject< int, int, int > &  dest,
const Import< int, int > &  importer,
CombineMode  CM 
)

Definition at line 207 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::doImport ( const DistObject< int, int, int > &  source,
const Export< int, int > &  exporter,
CombineMode  CM 
)

Definition at line 219 of file Xpetra_EpetraIntVector.cpp.

void Xpetra::EpetraIntVector::doExport ( const DistObject< int, int, int > &  dest,
const Export< int, int > &  exporter,
CombineMode  CM 
)

Definition at line 231 of file Xpetra_EpetraIntVector.cpp.


Member Data Documentation

RCP< Epetra_IntVector > Xpetra::EpetraIntVector::vec_ [private]

Definition at line 262 of file Xpetra_EpetraIntVector.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines