Public Member Functions | Private Types | List of all members
Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node > Class Template Reference

#include <Xpetra_EpetraVector.hpp>

Public Member Functions

void norm1 (const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
 Compute 1-norm of each vector in multi-vector. More...
 
void norm2 (const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
 
void normInf (const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const
 Compute Inf-norm of each vector in multi-vector. More...
 
void meanValue (const Teuchos::ArrayView< Scalar > &means) const
 Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int). More...
 
void replaceGlobalValue (GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
 Replace value, using global (row) index. More...
 
void sumIntoGlobalValue (GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)
 Add value to existing value, using global (row) index. More...
 
void replaceLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
 Replace value, using local (row) index. More...
 
void sumIntoLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)
 Add value to existing value, using local (row) index. More...
 
void dot (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< Scalar > &dots) const
 Compute the dot product of each corresponding pair of vectors (columns) in A and B. More...
 

Private Types

typedef double Scalar
 
typedef int LocalOrdinal
 
typedef EpetraGlobalOrdinal GlobalOrdinal
 

Constructor/Destructor Methods

 EpetraVectorT (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
 Sets all vector entries to zero. More...
 
virtual ~EpetraVectorT ()
 Vector copy constructor. More...
 

Post-construction modification routines

void replaceGlobalValue (GlobalOrdinal globalRow, const Scalar &value)
 Replace current value at the specified location with specified value. More...
 
void sumIntoGlobalValue (GlobalOrdinal globalRow, const Scalar &value)
 Adds specified value to existing value at the specified location. More...
 
void replaceLocalValue (LocalOrdinal myRow, const Scalar &value)
 Replace current value at the specified location with specified values. More...
 
void sumIntoLocalValue (LocalOrdinal myRow, const Scalar &value)
 Adds specified value to existing value at the specified location. More...
 

Mathematical methods

Scalar dot (const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
 Computes dot product of this Vector against input Vector x. More...
 
Teuchos::ScalarTraits< Scalar >::magnitudeType norm1 () const
 Return 1-norm of this Vector. More...
 
Teuchos::ScalarTraits< Scalar >::magnitudeType norm2 () const
 Compute 2-norm of this Vector. More...
 
Teuchos::ScalarTraits< Scalar >::magnitudeType normInf () const
 Compute Inf-norm of this Vector. More...
 
Scalar meanValue () const
 Compute Weighted 2-norm (RMS Norm) of this Vector. More...
 

Overridden from Teuchos::Describable

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

Xpetra specific

const RCP< const Epetra_MultiVectorinternalRefToBaseMV_
 
 EpetraVectorT (const Teuchos::RCP< Epetra_Vector > &vec)
 EpetraMultiVectorT constructor to wrap a Epetra_Vector object. More...
 
Epetra_VectorgetEpetra_Vector () const
 Get the underlying Epetra vector. More...
 
 EpetraVectorT (const RCP< Epetra_MultiVector > &mv, size_t j)
 

Detailed Description

template<class EpetraGlobalOrdinal, class Node>
class Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >

Definition at line 74 of file Xpetra_EpetraVector.hpp.

Member Typedef Documentation

◆ Scalar

template<class EpetraGlobalOrdinal , class Node >
typedef double Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::Scalar
private

Definition at line 78 of file Xpetra_EpetraVector.hpp.

◆ LocalOrdinal

template<class EpetraGlobalOrdinal , class Node >
typedef int Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::LocalOrdinal
private

Definition at line 79 of file Xpetra_EpetraVector.hpp.

◆ GlobalOrdinal

template<class EpetraGlobalOrdinal , class Node >
typedef EpetraGlobalOrdinal Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::GlobalOrdinal
private

Definition at line 80 of file Xpetra_EpetraVector.hpp.

Constructor & Destructor Documentation

◆ EpetraVectorT() [1/3]

template<class EpetraGlobalOrdinal , class Node >
Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::EpetraVectorT ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map,
bool  zeroOut = true 
)
inlineexplicit

Sets all vector entries to zero.

Definition at line 115 of file Xpetra_EpetraVector.hpp.

◆ ~EpetraVectorT()

template<class EpetraGlobalOrdinal , class Node >
virtual Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::~EpetraVectorT ( )
inlinevirtual

Vector copy constructor.

Destructor.

Definition at line 122 of file Xpetra_EpetraVector.hpp.

◆ EpetraVectorT() [2/3]

template<class EpetraGlobalOrdinal , class Node >
Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::EpetraVectorT ( const Teuchos::RCP< Epetra_Vector > &  vec)
inline

EpetraMultiVectorT constructor to wrap a Epetra_Vector object.

Definition at line 181 of file Xpetra_EpetraVector.hpp.

◆ EpetraVectorT() [3/3]

template<class EpetraGlobalOrdinal , class Node >
Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::EpetraVectorT ( const RCP< Epetra_MultiVector > &  mv,
size_t  j 
)
inline

This constructor creates a Vector which is a view of column j of the MultiVector 'mv'. It implements the logic of MultiVector::getVector/getVectorNonConst() for Epetra MultiVector. The newly created Xpetra::EpetraVectorT will remain valid after the disappearance of the references to 'mv' in user code.

Definition at line 193 of file Xpetra_EpetraVector.hpp.

Member Function Documentation

◆ norm1() [1/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::norm1 ( const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &  norms) const
inline

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

Definition at line 85 of file Xpetra_EpetraVector.hpp.

◆ norm2() [1/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::norm2 ( const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &  norms) const
inline

Definition at line 88 of file Xpetra_EpetraVector.hpp.

◆ normInf() [1/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::normInf ( const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &  norms) const
inline

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

Definition at line 91 of file Xpetra_EpetraVector.hpp.

◆ meanValue() [1/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::meanValue ( const Teuchos::ArrayView< Scalar > &  means) const
inline

Compute mean (average) value of each vector in multi-vector. The outcome of this routine is undefined for non-floating point scalar types (e.g., int).

Definition at line 94 of file Xpetra_EpetraVector.hpp.

◆ replaceGlobalValue() [1/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::replaceGlobalValue ( GlobalOrdinal  globalRow,
size_t  vectorIndex,
const Scalar value 
)
inline

Replace value, using global (row) index.

Definition at line 97 of file Xpetra_EpetraVector.hpp.

◆ sumIntoGlobalValue() [1/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::sumIntoGlobalValue ( GlobalOrdinal  globalRow,
size_t  vectorIndex,
const Scalar value 
)
inline

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

Definition at line 100 of file Xpetra_EpetraVector.hpp.

◆ replaceLocalValue() [1/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::replaceLocalValue ( LocalOrdinal  myRow,
size_t  vectorIndex,
const Scalar value 
)
inline

Replace value, using local (row) index.

Definition at line 103 of file Xpetra_EpetraVector.hpp.

◆ sumIntoLocalValue() [1/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::sumIntoLocalValue ( LocalOrdinal  myRow,
size_t  vectorIndex,
const Scalar value 
)
inline

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

Definition at line 106 of file Xpetra_EpetraVector.hpp.

◆ dot() [1/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::dot ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  A,
const Teuchos::ArrayView< Scalar > &  dots 
) const
inline

Compute the dot product of each corresponding pair of vectors (columns) in A and B.

Definition at line 109 of file Xpetra_EpetraVector.hpp.

◆ replaceGlobalValue() [2/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::replaceGlobalValue ( GlobalOrdinal  globalRow,
const Scalar value 
)
inline

Replace current value at the specified location with specified value.

Definition at line 130 of file Xpetra_EpetraVector.hpp.

◆ sumIntoGlobalValue() [2/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::sumIntoGlobalValue ( GlobalOrdinal  globalRow,
const Scalar value 
)
inline

Adds specified value to existing value at the specified location.

Definition at line 133 of file Xpetra_EpetraVector.hpp.

◆ replaceLocalValue() [2/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::replaceLocalValue ( LocalOrdinal  myRow,
const Scalar value 
)
inline

Replace current value at the specified location with specified values.

Definition at line 136 of file Xpetra_EpetraVector.hpp.

◆ sumIntoLocalValue() [2/2]

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::sumIntoLocalValue ( LocalOrdinal  myRow,
const Scalar value 
)
inline

Adds specified value to existing value at the specified location.

Definition at line 139 of file Xpetra_EpetraVector.hpp.

◆ dot() [2/2]

template<class EpetraGlobalOrdinal , class Node >
Scalar Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::dot ( const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  a) const
inline

Computes dot product of this Vector against input Vector x.

Definition at line 147 of file Xpetra_EpetraVector.hpp.

◆ norm1() [2/2]

template<class EpetraGlobalOrdinal , class Node >
Teuchos::ScalarTraits< Scalar >::magnitudeType Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::norm1 ( ) const
inline

Return 1-norm of this Vector.

Definition at line 150 of file Xpetra_EpetraVector.hpp.

◆ norm2() [2/2]

template<class EpetraGlobalOrdinal , class Node >
Teuchos::ScalarTraits< Scalar >::magnitudeType Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::norm2 ( ) const
inline

Compute 2-norm of this Vector.

Definition at line 153 of file Xpetra_EpetraVector.hpp.

◆ normInf() [2/2]

template<class EpetraGlobalOrdinal , class Node >
Teuchos::ScalarTraits< Scalar >::magnitudeType Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::normInf ( ) const
inline

Compute Inf-norm of this Vector.

Definition at line 156 of file Xpetra_EpetraVector.hpp.

◆ meanValue() [2/2]

template<class EpetraGlobalOrdinal , class Node >
Scalar Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::meanValue ( ) const
inline

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

Compute mean (average) value of this Vector.

Definition at line 162 of file Xpetra_EpetraVector.hpp.

◆ description()

template<class EpetraGlobalOrdinal , class Node >
std::string Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::description ( ) const
inline

Return a simple one-line description of this object.

Definition at line 170 of file Xpetra_EpetraVector.hpp.

◆ describe()

template<class EpetraGlobalOrdinal , class Node >
void Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const
inline

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

Definition at line 173 of file Xpetra_EpetraVector.hpp.

◆ getEpetra_Vector()

template<class EpetraGlobalOrdinal , class Node >
Epetra_Vector* Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::getEpetra_Vector ( ) const
inline

Get the underlying Epetra vector.

Definition at line 187 of file Xpetra_EpetraVector.hpp.

Member Data Documentation

◆ internalRefToBaseMV_

template<class EpetraGlobalOrdinal , class Node >
const RCP<const Epetra_MultiVector> Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >::internalRefToBaseMV_
private

Definition at line 238 of file Xpetra_EpetraVector.hpp.


The documentation for this class was generated from the following files: