Xpetra Version of the Day
|
#include <Xpetra_Vector.hpp>
Public Types | |
using | scalar_type = Scalar |
using | local_ordinal_type = LocalOrdinal |
using | global_ordinal_type = GlobalOrdinal |
using | node_type = Node |
typedef Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::dual_view_type | dual_view_type |
![]() | |
typedef Scalar | scalar_type |
typedef LocalOrdinal | local_ordinal_type |
typedef GlobalOrdinal | global_ordinal_type |
typedef Node | node_type |
using | impl_scalar_type = typename Kokkos::Details::ArithTraits<Scalar>::val_type |
using | dual_view_type = Kokkos::DualView<impl_scalar_type**, Kokkos::LayoutStride, typename node_type::device_type, Kokkos::MemoryUnmanaged> |
using | dual_view_type_const = Kokkos::DualView<const impl_scalar_type**, Kokkos::LayoutStride, typename node_type::device_type, Kokkos::MemoryUnmanaged> |
using | host_execution_space = typename dual_view_type::host_mirror_space |
using | dev_execution_space = typename dual_view_type::t_dev::execution_space |
Public Member Functions | |
template<class TargetDeviceType , class AccessType > | |
std::conditional< std::is_same< typenamedual_view_type::t_dev_um::execution_space::memory_space, typenameTargetDeviceType::memory_space >::value, typenamedual_view_type::t_dev_um, typenamedual_view_type::t_host_um >::type | getLocalView (AccessType access_type) const |
![]() | |
virtual void | setSeed (unsigned int seed)=0 |
Set seed for Random function. | |
virtual void | randomize (bool bUseXpetraImplementation=false)=0 |
Set multi-vector values to random numbers. | |
virtual void | randomize (const Scalar &minVal, const Scalar &maxVal, bool bUseXpetraImplementation=false)=0 |
Set multi-vector values to random numbers. | |
virtual void | Xpetra_randomize () |
Set multi-vector values to random numbers. XPetra implementation. | |
virtual void | Xpetra_randomize (const Scalar &minVal, const Scalar &maxVal) |
Set multi-vector values to random numbers. XPetra implementation. | |
virtual dual_view_type::t_host_const_um | getHostLocalView (Access::ReadOnlyStruct) const |
virtual dual_view_type::t_dev_const_um | getDeviceLocalView (Access::ReadOnlyStruct) const |
virtual dual_view_type::t_host_um | getHostLocalView (Access::OverwriteAllStruct) const |
virtual dual_view_type::t_dev_um | getDeviceLocalView (Access::OverwriteAllStruct) const |
virtual dual_view_type::t_host_um | getHostLocalView (Access::ReadWriteStruct) const |
virtual dual_view_type::t_dev_um | getDeviceLocalView (Access::ReadWriteStruct) const |
virtual | ~MultiVector () |
Destructor. | |
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > & | operator= (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs) |
Assignment operator: Does a deep copy. | |
virtual void | replaceGlobalValue (GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)=0 |
Replace value, using global (row) index. | |
virtual void | sumIntoGlobalValue (GlobalOrdinal globalRow, size_t vectorIndex, const Scalar &value)=0 |
Add value to existing value, using global (row) index. | |
virtual void | replaceLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)=0 |
Replace value, using local (row) index. | |
virtual void | sumIntoLocalValue (LocalOrdinal myRow, size_t vectorIndex, const Scalar &value)=0 |
Add value to existing value, using local (row) index. | |
virtual void | putScalar (const Scalar &value)=0 |
Set all values in the multivector with the given value. | |
virtual Teuchos::RCP< const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | getVector (size_t j) const =0 |
Return a Vector which is a const view of column j. | |
virtual Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > | getVectorNonConst (size_t j)=0 |
Return a Vector which is a nonconst view of column j. | |
virtual Teuchos::ArrayRCP< const Scalar > | getData (size_t j) const =0 |
Const view of the local values in a particular vector of this multivector. | |
virtual Teuchos::ArrayRCP< Scalar > | getDataNonConst (size_t j)=0 |
View of the local values in a particular vector of this multivector. | |
virtual void | dot (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Teuchos::ArrayView< Scalar > &dots) const =0 |
Compute dot product of each corresponding pair of vectors, dots[i] = this[i].dot(A[i]). | |
virtual void | abs (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)=0 |
Put element-wise absolute values of input Multi-vector in target: A = abs(this). | |
virtual void | reciprocal (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A)=0 |
Put element-wise reciprocal values of input Multi-vector in target, this(i,j) = 1/A(i,j). | |
virtual void | scale (const Scalar &alpha)=0 |
Scale the current values of a multi-vector, this = alpha*this. | |
virtual void | scale (Teuchos::ArrayView< const Scalar > alpha)=0 |
Scale the current values of a multi-vector, this[j] = alpha[j]*this[j]. | |
virtual void | update (const Scalar &alpha, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta)=0 |
Update multi-vector values with scaled values of A, this = beta*this + alpha*A. | |
virtual 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)=0 |
Update multi-vector with scaled values of A and B, this = gamma*this + alpha*A + beta*B. | |
virtual void | norm1 (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const =0 |
Compute 1-norm of each vector in multi-vector. | |
virtual void | norm2 (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const =0 |
virtual void | normInf (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &norms) const =0 |
Compute Inf-norm of each vector in multi-vector. | |
virtual void | meanValue (const Teuchos::ArrayView< Scalar > &means) const =0 |
virtual 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)=0 |
Matrix-matrix multiplication: this = beta*this + alpha*op(A)*op(B). | |
virtual void | elementWiseMultiply (Scalar scalarAB, const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, Scalar scalarThis)=0 |
Multiply a Vector A elementwise by a MultiVector B. | |
virtual size_t | getNumVectors () const =0 |
Number of columns in the multivector. | |
virtual size_t | getLocalLength () const =0 |
Local number of rows on the calling process. | |
virtual global_size_t | getGlobalLength () const =0 |
Global number of rows in the multivector. | |
virtual bool | isSameSize (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &vec) const =0 |
virtual void | replaceMap (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)=0 |
![]() | |
virtual | ~DistObject () |
Destructor. | |
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"). | |
virtual void | beginImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Import data into this object using an Import object ("forward mode"). | |
virtual void | endImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Import data into this object using an Import object ("forward mode"). | |
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"). | |
virtual void | beginExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Export data into this object using an Export object ("forward mode"). | |
virtual void | endExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Export data into this object using an Export object ("forward mode"). | |
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"). | |
virtual void | beginImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Import data into this object using an Export object ("reverse mode"). | |
virtual void | endImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM) |
Import data into this object using an Export object ("reverse mode"). | |
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"). | |
virtual void | beginExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Export data into this object using an Import object ("reverse mode"). | |
virtual void | endExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM) |
Export data into this object using an Import object ("reverse mode"). | |
virtual Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > | getMap () const =0 |
The Map describing the parallel distribution of this object. | |
![]() | |
void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
virtual | ~Describable () |
DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
virtual | ~Describable () |
![]() | |
LabeledObject () | |
virtual | ~LabeledObject () |
virtual void | setObjectLabel (const std::string &objectLabel) |
virtual std::string | getObjectLabel () const |
Constructor/Destructor Methods | |
virtual | ~Vector () |
Destructor. | |
Post-construction modification routines | |
virtual void | replaceGlobalValue (GlobalOrdinal globalRow, const Scalar &value)=0 |
Replace current value at the specified location with specified value. | |
virtual void | sumIntoGlobalValue (GlobalOrdinal globalRow, const Scalar &value)=0 |
Adds specified value to existing value at the specified location. | |
virtual void | replaceLocalValue (LocalOrdinal myRow, const Scalar &value)=0 |
Replace current value at the specified location with specified values. | |
virtual void | sumIntoLocalValue (LocalOrdinal myRow, const Scalar &value)=0 |
Adds specified value to existing value at the specified location. | |
Mathematical methods | |
virtual Scalar | dot (const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const =0 |
Computes dot product of this Vector against input Vector x. | |
virtual Teuchos::ScalarTraits< Scalar >::magnitudeType | norm1 () const =0 |
Return 1-norm of this Vector. | |
virtual Teuchos::ScalarTraits< Scalar >::magnitudeType | norm2 () const =0 |
Compute 2-norm of this Vector. | |
virtual Teuchos::ScalarTraits< Scalar >::magnitudeType | normInf () const =0 |
Compute Inf-norm of this Vector. | |
virtual Scalar | meanValue () const =0 |
Compute mean (average) value of this Vector. | |
Overridden from Teuchos::Describable | |
virtual std::string | description () const =0 |
Return a simple one-line description of this object. | |
virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const =0 |
Print the object with some verbosity level to an FancyOStream object. | |
Additional Inherited Members | |
![]() | |
static const EVerbosityLevel | verbLevel_default |
![]() | |
virtual void | assign (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &rhs)=0 |
Implementation of the assignment operator (operator=); does a deep copy. | |
Definition at line 60 of file Xpetra_Vector.hpp.
using Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scalar_type = Scalar |
Definition at line 66 of file Xpetra_Vector.hpp.
using Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_ordinal_type = LocalOrdinal |
Definition at line 67 of file Xpetra_Vector.hpp.
using Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::global_ordinal_type = GlobalOrdinal |
Definition at line 68 of file Xpetra_Vector.hpp.
using Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::node_type = Node |
Definition at line 69 of file Xpetra_Vector.hpp.
typedef Xpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node>::dual_view_type Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::dual_view_type |
Definition at line 83 of file Xpetra_Vector.hpp.
|
inlinevirtual |
Destructor.
Definition at line 100 of file Xpetra_Vector.hpp.
|
inline |
Definition at line 92 of file Xpetra_Vector.hpp.
|
pure virtual |
Replace current value at the specified location with specified value.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >, Xpetra::EpetraIntVectorT< int, EpetraNode >, and Xpetra::EpetraIntVectorT< long long, EpetraNode >.
|
pure virtual |
Adds specified value to existing value at the specified location.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >, Xpetra::EpetraIntVectorT< int, EpetraNode >, and Xpetra::EpetraIntVectorT< long long, EpetraNode >.
|
pure virtual |
Replace current value at the specified location with specified values.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< int, EpetraNode >, Xpetra::EpetraIntVectorT< long long, EpetraNode >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, and Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >.
|
pure virtual |
Adds specified value to existing value at the specified location.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< int, EpetraNode >, Xpetra::EpetraIntVectorT< long long, EpetraNode >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, and Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >.
|
pure virtual |
Computes dot product of this Vector against input Vector x.
Implemented in Xpetra::EpetraIntVectorT< int, EpetraNode >, Xpetra::EpetraIntVectorT< long long, EpetraNode >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, and Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
|
pure virtual |
Return 1-norm of this Vector.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< int, EpetraNode >, Xpetra::EpetraIntVectorT< long long, EpetraNode >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, and Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >.
|
pure virtual |
Compute 2-norm of this Vector.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< int, EpetraNode >, Xpetra::EpetraIntVectorT< long long, EpetraNode >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, and Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >.
|
pure virtual |
Compute Inf-norm of this Vector.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< int, EpetraNode >, Xpetra::EpetraIntVectorT< long long, EpetraNode >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, and Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >.
|
pure virtual |
Compute mean (average) value of this Vector.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< int, EpetraNode >, Xpetra::EpetraIntVectorT< long long, EpetraNode >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, and Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >.
|
pure virtual |
Return a simple one-line description of this object.
Implements Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< int, EpetraNode >, Xpetra::EpetraIntVectorT< long long, EpetraNode >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, and Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >.
|
pure virtual |
Print the object with some verbosity level to an FancyOStream object.
Implements Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
Implemented in Xpetra::BlockedVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraIntVectorT< int, EpetraNode >, Xpetra::EpetraIntVectorT< long long, EpetraNode >, Xpetra::EpetraVectorT< EpetraGlobalOrdinal, Node >, Xpetra::EpetraVectorT< int, EpetraNode >, Xpetra::EpetraVectorT< long long, EpetraNode >, Xpetra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >, Xpetra::TpetraVector< Scalar, int, int, EpetraNode >, and Xpetra::TpetraVector< Scalar, int, long long, EpetraNode >.