|
Tpetra parallel linear algebra
Version of the Day
|
Go to the documentation of this file.
42 #ifndef TPETRA_VECTOR_DECL_HPP
43 #define TPETRA_VECTOR_DECL_HPP
53 #include "Tpetra_ConfigDefs.hpp"
78 template <
class Scalar = ::Tpetra::Details::DefaultTypes::scalar_type,
80 class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type,
152 explicit Vector (
const Teuchos::RCP<const map_type>& map,
153 const bool zeroOut =
true);
177 const Teuchos::DataAccess copyOrView);
180 Vector (
const Teuchos::RCP<const map_type>& map,
181 const Teuchos::ArrayView<const Scalar>& A);
195 Vector (
const Teuchos::RCP<const map_type>& map,
212 Vector (
const Teuchos::RCP<const map_type>& map,
236 template <
class Node2>
237 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node2> >
238 clone (
const Teuchos::RCP<Node2>& node2);
307 void get1dCopy (
const Teuchos::ArrayView<Scalar>& A)
const;
317 Teuchos::ArrayRCP<const Scalar>
getData ()
const {
321 Teuchos::RCP<const Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
322 offsetView (
const Teuchos::RCP<const map_type>& subMap,
323 const size_t offset)
const;
325 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
326 offsetViewNonConst (
const Teuchos::RCP<const map_type>& subMap,
327 const size_t offset);
388 describe (Teuchos::FancyOStream& out,
389 const Teuchos::EVerbosityLevel verbLevel =
390 Teuchos::Describable::verbLevel_default)
const;
397 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
398 Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node>
399 createCopy (
const Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node>& src);
406 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
407 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
415 #endif // TPETRA_VECTOR_DECL_HPP
static const bool useAtomicUpdatesByDefault
Whether sumIntoLocalValue and sumIntoGlobalValue should use atomic updates by default.
Declaration of the Tpetra::MultiVector class.
void sumIntoGlobalValue(const GlobalOrdinal globalRow, const Scalar &value, const bool atomic=base_type::useAtomicUpdatesByDefault) const
Add value to existing value, using global (row) index.
void sumIntoLocalValue(const LocalOrdinal myRow, const Scalar &value, const bool atomic=base_type::useAtomicUpdatesByDefault) const
Add value to existing value, using local (row) index.
Teuchos::ArrayRCP< const Scalar > getData() const
Const view of the local values of this vector.
mag_type norm2() const
Return the two-norm of this Vector.
void get1dCopy(const Teuchos::ArrayView< Scalar > &A) const
Return multi-vector values in user-provided two-dimensional array (using Teuchos memory management cl...
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Describe this object in a human-readable way to the given output stream.
base_type::impl_scalar_type impl_scalar_type
The type used internally in place of Scalar.
::Kokkos::Compat::KokkosDeviceWrapperNode< execution_space > node_type
Default value of Node template parameter.
Scalar meanValue() const
Compute mean (average) value of this Vector.
void replaceLocalValue(const LocalOrdinal myRow, const Scalar &value) const
Replace current value at the specified location with specified values.
Teuchos::ArrayRCP< Scalar > getDataNonConst()
View of the local values of this vector.
mag_type normInf() const
Return the infinity-norm of this Vector.
GlobalOrdinal global_ordinal_type
This class' third template parameter; the type of global indices.
dot_type dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &y) const
Return the dot product of this Vector and the input Vector x.
Kokkos::DualView< impl_scalar_type **, Kokkos::LayoutLeft, typename execution_space::execution_space > dual_view_type
Kokkos::DualView specialization used by this class.
virtual std::string description() const
Return a one-line description of this object.
mag_type TPETRA_DEPRECATED normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights) const
Compute Weighted 2-norm (RMS Norm) of this Vector.
Kokkos::Details::ArithTraits< impl_scalar_type >::mag_type mag_type
Type of a norm result.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > clone(const Teuchos::RCP< Node2 > &node2)
Return a deep copy of *this with a different Node type (and therefore a different Device type).
virtual ~Vector()
Destructor.
Node node_type
The Kokkos Node type.
One or more distributed dense vectors.
int local_ordinal_type
Default value of Scalar template parameter.
base_type::dual_view_type dual_view_type
Kokkos::DualView specialization used by this class.
Kokkos::Details::InnerProductSpaceTraits< impl_scalar_type >::dot_type dot_type
Type of an inner ("dot") product result.
MultiVector< ST, LO, GO, NT > createCopy(const MultiVector< ST, LO, GO, NT > &src)
Return a deep copy of the given MultiVector.
A parallel distribution of indices over processes.
Kokkos::Details::ArithTraits< Scalar >::val_type impl_scalar_type
The type used internally in place of Scalar.
Forward declaration of Tpetra::Vector.
void replaceGlobalValue(const GlobalOrdinal globalRow, const Scalar &value) const
Replace current value at the specified location with specified value.
base_type::dot_type dot_type
Type of an inner ("dot") product result.
base_type::map_type map_type
The type of the Map specialization used by this class.
Scalar scalar_type
This class' first template parameter; the type of each entry in the Vector.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
mag_type norm1() const
Return the one-norm of this Vector.
LocalOrdinal local_ordinal_type
This class' second template parameter; the type of local indices.
Node::device_type device_type
The Kokkos device type.
Vector()
Default constructor: makes a Vector with no rows or columns.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
Nonmember Vector "constructor": Create a Vector from a given Map.
base_type::mag_type mag_type
Type of a norm result.
A distributed dense vector.