#include <Xpetra_EpetraMultiVector.hpp>
Public Member Functions | |
| void | randomize (bool bUseXpetraImplementation=false) |
| Set multi-vector values to random numbers. More... | |
| const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > | getMap () const |
| Implements DistObject interface. More... | |
| void | doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
| Import. More... | |
| void | doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
| Export. More... | |
| void | doImport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
| Import (using an Exporter). More... | |
| void | doExport (const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
| Export (using an Importer). More... | |
| void | replaceMap (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map) |
| Replace the map. More... | |
Public Member Functions inherited from Xpetra::MultiVector< double, int, int > | |
| virtual | ~MultiVector () |
| Destructor. More... | |
| virtual void | norm1 (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< double >::magnitudeType > &norms) const =0 |
| Compute 1-norm of each vector in multi-vector. More... | |
| virtual void | norm2 (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< double >::magnitudeType > &norms) const =0 |
| virtual void | normInf (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< double >::magnitudeType > &norms) const =0 |
| Compute Inf-norm of each vector in multi-vector. More... | |
| virtual void | normWeighted (const MultiVector< double, int, int, Kokkos::DefaultNode::DefaultNodeType > &weights, const Teuchos::ArrayView< typename Teuchos::ScalarTraits< double >::magnitudeType > &norms) const =0 |
| virtual void | Xpetra_randomize () |
| Set multi-vector values to random numbers. XPetra implementation. More... | |
Public Member Functions inherited from Xpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > | |
| virtual | ~DistObject () |
| Destructor. More... | |
| virtual void | doImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)=0 |
| Import data into this object using an Import object ("forward mode"). More... | |
| virtual void | doExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)=0 |
| Export data into this object using an Export object ("forward mode"). More... | |
| virtual void | doImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)=0 |
| Import data into this object using an Export object ("reverse mode"). More... | |
| virtual void | doExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)=0 |
| Export data into this object using an Import object ("reverse mode"). More... | |
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. More... | |
| EpetraMultiVector (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source) | |
| MultiVector copy constructor. More... | |
| 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). More... | |
| virtual | ~EpetraMultiVector () |
| MultiVector destructor. More... | |
Post-construction modification routines | |
| 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 | putScalar (const Scalar &value) |
| Set all values in the multivector with the given value. More... | |
Data Copy and View get methods | |
| Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | getVector (size_t j) const |
| Return a Vector which is a const view of column j. More... | |
| Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | getVectorNonConst (size_t j) |
| Return a Vector which is a nonconst view of column j. More... | |
| Teuchos::ArrayRCP< const Scalar > | getData (size_t j) const |
| Const view of the local values in a particular vector of this multivector. More... | |
| Teuchos::ArrayRCP< Scalar > | getDataNonConst (size_t j) |
| View of the local values in a particular vector of this multivector. More... | |
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]). More... | |
| void | abs (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A) |
| Put element-wise absolute values of input Multi-vector in target: A = abs(this). More... | |
| 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). More... | |
| void | scale (const Scalar &alpha) |
| Scale the current values of a multi-vector, this = alpha*this. More... | |
| 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. More... | |
| 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. More... | |
| 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 | normWeighted (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights, const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const |
| 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 | 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). More... | |
| 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. More... | |
Attribute access functions | |
| size_t | getNumVectors () const |
| Number of columns in the multivector. More... | |
| size_t | getLocalLength () const |
| Local number of rows on the calling process. More... | |
| global_size_t | getGlobalLength () const |
| Global number of rows in the multivector. More... | |
Overridden from Teuchos::Describable | |
| std::string | description () const |
| 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 the given verbosity level to a FancyOStream. More... | |
Xpetra specific | |
| EpetraMultiVector (const RCP< Epetra_MultiVector > &vec) | |
| EpetraMultiVector constructor to wrap a Epetra_MultiVector object. More... | |
| RCP< Epetra_MultiVector > | getEpetra_MultiVector () const |
| Get the underlying Epetra multivector. More... | |
| void | setSeed (unsigned int seed) |
| Set seed for Random function. More... | |
Definition at line 82 of file Xpetra_EpetraMultiVector.hpp.
|
private |
Definition at line 86 of file Xpetra_EpetraMultiVector.hpp.
|
private |
Definition at line 87 of file Xpetra_EpetraMultiVector.hpp.
|
private |
Definition at line 88 of file Xpetra_EpetraMultiVector.hpp.
|
private |
Definition at line 89 of file Xpetra_EpetraMultiVector.hpp.
|
inline |
Basic MultiVector constuctor.
Definition at line 97 of file Xpetra_EpetraMultiVector.hpp.
|
inline |
MultiVector copy constructor.
Definition at line 101 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 58 of file Xpetra_EpetraMultiVector.cpp.
|
inlinevirtual |
MultiVector destructor.
Definition at line 108 of file Xpetra_EpetraMultiVector.hpp.
|
inline |
EpetraMultiVector constructor to wrap a Epetra_MultiVector object.
Definition at line 255 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Replace value, using global (row) index.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 116 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Add value to existing value, using global (row) index.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 119 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Replace value, using local (row) index.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 122 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Add value to existing value, using local (row) index.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 125 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Set all values in the multivector with the given value.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 128 of file Xpetra_EpetraMultiVector.hpp.
|
virtual |
Return a Vector which is a const view of column j.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 89 of file Xpetra_EpetraMultiVector.cpp.
|
virtual |
Return a Vector which is a nonconst view of column j.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 94 of file Xpetra_EpetraMultiVector.cpp.
|
virtual |
Const view of the local values in a particular vector of this multivector.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 99 of file Xpetra_EpetraMultiVector.cpp.
|
virtual |
View of the local values in a particular vector of this multivector.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 112 of file Xpetra_EpetraMultiVector.cpp.
|
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 125 of file Xpetra_EpetraMultiVector.cpp.
|
inlinevirtual |
Put element-wise absolute values of input Multi-vector in target: A = abs(this).
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 156 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
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 159 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Scale the current values of a multi-vector, this = alpha*this.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 162 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Update multi-vector values with scaled values of A, this = beta*this + alpha*A.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 165 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
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 168 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 132 of file Xpetra_EpetraMultiVector.cpp.
| void Xpetra::EpetraMultiVector::norm2 | ( | const Teuchos::ArrayView< Teuchos::ScalarTraits< Scalar >::magnitudeType > & | norms | ) | const |
Definition at line 134 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 136 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 |
Definition at line 138 of file Xpetra_EpetraMultiVector.cpp.
|
virtual |
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).
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 145 of file Xpetra_EpetraMultiVector.cpp.
|
inlinevirtual |
Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B).
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 186 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Element-wise multiply of a Vector A with a MultiVector B.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 189 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Number of columns in the multivector.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 197 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Local number of rows on the calling process.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 200 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Global number of rows in the multivector.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 203 of file Xpetra_EpetraMultiVector.hpp.
|
virtual |
A simple one-line description of this object.
Implements Xpetra::MultiVector< double, int, int >.
Reimplemented in Xpetra::EpetraVector.
Definition at line 147 of file Xpetra_EpetraMultiVector.cpp.
|
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 153 of file Xpetra_EpetraMultiVector.cpp.
|
inlinevirtual |
Set multi-vector values to random numbers.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 219 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Implements DistObject interface.
Access function for the Tpetra::Map this DistObject was constructed with.
Implements Xpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 232 of file Xpetra_EpetraMultiVector.hpp.
| void Xpetra::EpetraMultiVector::doImport | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source, |
| const Import< LocalOrdinal, GlobalOrdinal, Node > & | importer, | ||
| CombineMode | CM | ||
| ) |
| void Xpetra::EpetraMultiVector::doExport | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | dest, |
| const Import< LocalOrdinal, GlobalOrdinal, Node > & | importer, | ||
| CombineMode | CM | ||
| ) |
| void Xpetra::EpetraMultiVector::doImport | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | source, |
| const Export< LocalOrdinal, GlobalOrdinal, Node > & | exporter, | ||
| CombineMode | CM | ||
| ) |
Import (using an Exporter).
| void Xpetra::EpetraMultiVector::doExport | ( | const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | dest, |
| const Export< LocalOrdinal, GlobalOrdinal, Node > & | exporter, | ||
| CombineMode | CM | ||
| ) |
Export (using an Importer).
|
virtual |
Replace the map.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 202 of file Xpetra_EpetraMultiVector.cpp.
|
inline |
Get the underlying Epetra multivector.
Definition at line 258 of file Xpetra_EpetraMultiVector.hpp.
|
inlinevirtual |
Set seed for Random function.
Implements Xpetra::MultiVector< double, int, int >.
Definition at line 261 of file Xpetra_EpetraMultiVector.hpp.
|
private |
Definition at line 272 of file Xpetra_EpetraMultiVector.hpp.
1.8.11