#include <Xpetra_EpetraMultiVector.hpp>
Public Member Functions | |
| void | randomize (bool bUseXpetraImplementation=false) |
| Set multi-vector values to random numbers. | |
| const Teuchos::RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | getMap () const |
| Implements DistObject interface. | |
| void | doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
| Import. | |
| void | doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
| Export. | |
| void | doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
| Import (using an Exporter). | |
| void | doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
| Export (using an Importer). | |
Private Types | |
| typedef double | Scalar |
| typedef int | LocalOrdinal |
| typedef int | GlobalOrdinal |
| typedef Kokkos::DefaultNode::DefaultNodeType | Node |
Private Attributes | |
| RCP< Epetra_MultiVector > | vec_ |
Constructor/Destructor Methods | |
| EpetraMultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t NumVectors, bool zeroOut=true) | |
| Basic MultiVector constuctor. | |
| EpetraMultiVector (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source) | |
| MultiVector copy constructor. | |
| EpetraMultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayView< const Teuchos::ArrayView< const Scalar > > &ArrayOfPtrs, size_t NumVectors) | |
| Set multi-vector values from array of pointers using Teuchos memory management classes. (copy). | |
| virtual | ~EpetraMultiVector () |
| MultiVector destructor. | |
Post-construction modification routines | |
| 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. | |
| void | putScalar (const Scalar &value) |
| Set all values in the multivector with the given value. | |
Data Copy and View get methods | |
| Teuchos::ArrayRCP< const Scalar > | getData (size_t j) const |
| Const view of the local values in a particular vector of this multivector. | |
| Teuchos::ArrayRCP< Scalar > | getDataNonConst (size_t j) |
| View of the local values in a particular vector of this multivector. | |
Mathematical methods | |
| void | dot (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< Scalar > &dots) const |
| Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]). | |
| void | abs (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A) |
| Put element-wise absolute values of input Multi-vector in target: A = abs(this). | |
| void | reciprocal (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A) |
| Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). | |
| void | scale (const Scalar &alpha) |
| Scale the current values of a multi-vector, this = alpha*this. | |
| void | update (const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta) |
| Update multi-vector values with scaled values of A, this = beta*this + alpha*A. | |
| void | update (const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &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< Scalar >::magnitudeType > &norms) const |
| Compute 1-norm of each vector in multi-vector. | |
| void | norm2 (const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Compute 2-norm of each vector in multi-vector. | |
| void | normInf (const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Compute Inf-norm of each vector in multi-vector. | |
| void | normWeighted (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights, const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Compute Weighted 2-norm (RMS Norm) of each vector in multi-vector. | |
| void | meanValue (const Teuchos::ArrayView< Scalar > &means) const |
| Compute mean (average) value of each vector in multi-vector. | |
| void | multiply (Teuchos::ETransp transA, Teuchos::ETransp transB, const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Scalar &beta) |
| Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). | |
| void | elementWiseMultiply (Scalar scalarAB, const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Scalar scalarThis) |
| Element-wise multiply of a Vector A with a MultiVector B. | |
Attribute access functions | |
| size_t | getNumVectors () const |
| Number of columns in the multivector. | |
| size_t | getLocalLength () const |
| Local number of rows on the calling process. | |
| global_size_t | getGlobalLength () const |
| Global number of rows in the multivector. | |
Overridden from Teuchos::Describable | |
| std::string | description () const |
| 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 the given verbosity level to a FancyOStream. | |
Xpetra specific | |
| EpetraMultiVector (const RCP< Epetra_MultiVector > &vec) | |
| EpetraMultiVector constructor to wrap a Epetra_MultiVector object. | |
| RCP< Epetra_MultiVector > | getEpetra_MultiVector () const |
| Get the underlying Epetra multivector. | |
| void | setSeed (unsigned int seed) |
| Set seed for Random function. | |
Definition at line 76 of file Xpetra_EpetraMultiVector.hpp.
typedef double Xpetra::EpetraMultiVector::Scalar [private] |
Reimplemented in Xpetra::EpetraVector.
Definition at line 80 of file Xpetra_EpetraMultiVector.hpp.
typedef int Xpetra::EpetraMultiVector::LocalOrdinal [private] |
Reimplemented in Xpetra::EpetraVector.
Definition at line 81 of file Xpetra_EpetraMultiVector.hpp.
typedef int Xpetra::EpetraMultiVector::GlobalOrdinal [private] |
Reimplemented in Xpetra::EpetraVector.
Definition at line 82 of file Xpetra_EpetraMultiVector.hpp.
typedef Kokkos::DefaultNode::DefaultNodeType Xpetra::EpetraMultiVector::Node [private] |
Reimplemented in Xpetra::EpetraVector.
Definition at line 83 of file Xpetra_EpetraMultiVector.hpp.
| Xpetra::EpetraMultiVector::EpetraMultiVector | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map, |
| size_t | NumVectors, | ||
| bool | zeroOut = true |
||
| ) | [inline] |
Basic MultiVector constuctor.
Definition at line 91 of file Xpetra_EpetraMultiVector.hpp.
| Xpetra::EpetraMultiVector::EpetraMultiVector | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source | ) | [inline] |
MultiVector copy constructor.
Definition at line 95 of file Xpetra_EpetraMultiVector.hpp.
| Xpetra::EpetraMultiVector::EpetraMultiVector | ( | const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & | map, |
| const Teuchos::ArrayView< const Teuchos::ArrayView< const Scalar > > & | ArrayOfPtrs, | ||
| size_t | NumVectors | ||
| ) |
Set multi-vector values from array of pointers using Teuchos memory management classes. (copy).
Definition at line 54 of file Xpetra_EpetraMultiVector.cpp.
| virtual Xpetra::EpetraMultiVector::~EpetraMultiVector | ( | ) | [inline, virtual] |
MultiVector destructor.
Definition at line 102 of file Xpetra_EpetraMultiVector.hpp.
| Xpetra::EpetraMultiVector::EpetraMultiVector | ( | const RCP< Epetra_MultiVector > & | vec | ) | [inline] |
EpetraMultiVector constructor to wrap a Epetra_MultiVector object.
Definition at line 240 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::replaceGlobalValue | ( | GlobalOrdinal | globalRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) | [inline, virtual] |
Replace value, using global (row) index.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 110 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::sumIntoGlobalValue | ( | GlobalOrdinal | globalRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) | [inline, virtual] |
Add value to existing value, using global (row) index.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 113 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::replaceLocalValue | ( | LocalOrdinal | myRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) | [inline, virtual] |
Replace value, using local (row) index.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 116 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::sumIntoLocalValue | ( | LocalOrdinal | myRow, |
| size_t | vectorIndex, | ||
| const Scalar & | value | ||
| ) | [inline, virtual] |
Add value to existing value, using local (row) index.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 119 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::putScalar | ( | const Scalar & | value | ) | [inline, virtual] |
Set all values in the multivector with the given value.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 122 of file Xpetra_EpetraMultiVector.hpp.
| Teuchos::ArrayRCP< const double > Xpetra::EpetraMultiVector::getData | ( | size_t | j | ) | const [virtual] |
Const view of the local values in a particular vector of this multivector.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 84 of file Xpetra_EpetraMultiVector.cpp.
| Teuchos::ArrayRCP< double > Xpetra::EpetraMultiVector::getDataNonConst | ( | size_t | j | ) | [virtual] |
View of the local values in a particular vector of this multivector.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 97 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::dot | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, |
| const Teuchos::ArrayView< Scalar > & | dots | ||
| ) | const [virtual] |
Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]).
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 110 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::abs | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A | ) | [inline, virtual] |
Put element-wise absolute values of input Multi-vector in target: A = abs(this).
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 144 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::reciprocal | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A | ) | [inline, virtual] |
Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j).
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 147 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::scale | ( | const Scalar & | alpha | ) | [inline, virtual] |
Scale the current values of a multi-vector, this = alpha*this.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 150 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::update | ( | const Scalar & | alpha, |
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, | ||
| const Scalar & | beta | ||
| ) | [inline, virtual] |
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 153 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::update | ( | const Scalar & | alpha, |
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, | ||
| const Scalar & | beta, | ||
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | B, | ||
| const Scalar & | gamma | ||
| ) | [inline, virtual] |
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 156 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::norm1 | ( | const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const |
Compute 1-norm of each vector in multi-vector.
Definition at line 117 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::norm2 | ( | const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const |
Compute 2-norm of each vector in multi-vector.
Definition at line 119 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::normInf | ( | const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const |
Compute Inf-norm of each vector in multi-vector.
Definition at line 121 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::normWeighted | ( | const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | weights, |
| const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ||
| ) | const |
Compute Weighted 2-norm (RMS Norm) of each vector in multi-vector.
Definition at line 123 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::meanValue | ( | const Teuchos::ArrayView< Scalar > & | means | ) | const [virtual] |
Compute mean (average) value of each vector in multi-vector.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 130 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::multiply | ( | Teuchos::ETransp | transA, |
| Teuchos::ETransp | transB, | ||
| const Scalar & | alpha, | ||
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, | ||
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | B, | ||
| const Scalar & | beta | ||
| ) | [inline, virtual] |
Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B).
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 174 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::elementWiseMultiply | ( | Scalar | scalarAB, |
| const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | A, | ||
| const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | B, | ||
| Scalar | scalarThis | ||
| ) | [inline, virtual] |
Element-wise multiply of a Vector A with a MultiVector B.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 177 of file Xpetra_EpetraMultiVector.hpp.
| size_t Xpetra::EpetraMultiVector::getNumVectors | ( | ) | const [inline, virtual] |
Number of columns in the multivector.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 185 of file Xpetra_EpetraMultiVector.hpp.
| size_t Xpetra::EpetraMultiVector::getLocalLength | ( | ) | const [inline, virtual] |
Local number of rows on the calling process.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 188 of file Xpetra_EpetraMultiVector.hpp.
| global_size_t Xpetra::EpetraMultiVector::getGlobalLength | ( | ) | const [inline, virtual] |
Global number of rows in the multivector.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 191 of file Xpetra_EpetraMultiVector.hpp.
| std::string Xpetra::EpetraMultiVector::description | ( | ) | const [virtual] |
A simple one-line description of this object.
Implements Xpetra::MultiVector< double, int, int >.
Reimplemented in Xpetra::EpetraVector.
Definition at line 132 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::describe | ( | Teuchos::FancyOStream & | out, |
| const Teuchos::EVerbosityLevel | verbLevel = Teuchos::Describable::verbLevel_default |
||
| ) | const [virtual] |
Print the object with the given verbosity level to a FancyOStream.
Implements Xpetra::MultiVector< double, int, int >.
Reimplemented in Xpetra::EpetraVector.
Definition at line 138 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::randomize | ( | bool | bUseXpetraImplementation = false | ) | [inline, virtual] |
Set multi-vector values to random numbers.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 207 of file Xpetra_EpetraMultiVector.hpp.
| const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::EpetraMultiVector::getMap | ( | ) | const [inline, virtual] |
Implements DistObject interface.
Access function for the Tpetra::Map this DistObject was constructed with.
Implements Xpetra::DistObject< double, int, int, Kokkos::DefaultNode::DefaultNodeType >.
Definition at line 220 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::doImport | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source, |
| const Import< LocalOrdinal, GlobalOrdinal, Node > & | importer, | ||
| CombineMode | CM | ||
| ) | [virtual] |
| void Xpetra::EpetraMultiVector::doExport | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | dest, |
| const Import< LocalOrdinal, GlobalOrdinal, Node > & | importer, | ||
| CombineMode | CM | ||
| ) | [virtual] |
| void Xpetra::EpetraMultiVector::doImport | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source, |
| const Export< LocalOrdinal, GlobalOrdinal, Node > & | exporter, | ||
| CombineMode | CM | ||
| ) | [virtual] |
Import (using an Exporter).
Implements Xpetra::DistObject< double, int, int, Kokkos::DefaultNode::DefaultNodeType >.
| void Xpetra::EpetraMultiVector::doExport | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | dest, |
| const Export< LocalOrdinal, GlobalOrdinal, Node > & | exporter, | ||
| CombineMode | CM | ||
| ) | [virtual] |
Export (using an Importer).
Implements Xpetra::DistObject< double, int, int, Kokkos::DefaultNode::DefaultNodeType >.
| RCP<Epetra_MultiVector> Xpetra::EpetraMultiVector::getEpetra_MultiVector | ( | ) | const [inline] |
Get the underlying Epetra multivector.
Definition at line 243 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::setSeed | ( | unsigned int | seed | ) | [inline, virtual] |
Set seed for Random function.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 246 of file Xpetra_EpetraMultiVector.hpp.
RCP< Epetra_MultiVector > Xpetra::EpetraMultiVector::vec_ [private] |
Definition at line 257 of file Xpetra_EpetraMultiVector.hpp.
1.7.6.1