42 #ifndef TPETRA_VECTOR_DECL_HPP
43 #define TPETRA_VECTOR_DECL_HPP
53 #include "Tpetra_ConfigDefs.hpp"
77 template <
class Scalar,
151 explicit Vector (
const Teuchos::RCP<const map_type>& map,
152 const bool zeroOut =
true);
166 const Teuchos::DataAccess copyOrView);
174 const Teuchos::RCP<const map_type>& map,
178 Vector (
const Teuchos::RCP<const map_type>& map,
179 const Teuchos::ArrayView<const Scalar>& A);
193 Vector (
const Teuchos::RCP<const map_type>& map,
210 Vector (
const Teuchos::RCP<const map_type>& map,
267 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
268 template <
class Node2>
269 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node2> > TPETRA_DEPRECATED
270 clone (
const Teuchos::RCP<Node2>& node2);
340 void get1dCopy (
const Teuchos::ArrayView<Scalar>& A)
const;
350 Teuchos::ArrayRCP<const Scalar>
getData ()
const {
354 Teuchos::RCP<const Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
355 offsetView (
const Teuchos::RCP<const map_type>& subMap,
356 const size_t offset)
const;
358 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
359 offsetViewNonConst (
const Teuchos::RCP<const map_type>& subMap,
360 const size_t offset);
381 #ifdef TPETRA_ENABLE_DEPRECATED_CODE
388 #endif // TPETRA_ENABLE_DEPRECATED_CODE
423 describe (Teuchos::FancyOStream& out,
424 const Teuchos::EVerbosityLevel verbLevel =
425 Teuchos::Describable::verbLevel_default)
const;
431 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
432 Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node>
433 createCopy (
const Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node>& src);
440 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
441 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
449 #endif // TPETRA_VECTOR_DECL_HPP
void sumIntoGlobalValue(const GlobalOrdinal globalRow, const Scalar &value, const bool atomic=base_type::useAtomicUpdatesByDefault) const
Add value to existing value, using global (row) index.
Vector()
Default constructor: makes a Vector with no rows or columns.
mag_type norm2() const
Return the two-norm of this Vector.
Teuchos::ArrayRCP< Scalar > getDataNonConst()
View of the local values of this vector.
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.
Vector & operator=(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &)=default
Copy assignment (shallow copy).
base_type::mag_type mag_type
Type of a norm result.
Node::device_type device_type
The Kokkos device type.
void replaceGlobalValue(const GlobalOrdinal globalRow, const Scalar &value) const
Replace current value at the specified location with specified value.
Kokkos::DualView< impl_scalar_type **, Kokkos::LayoutLeft, execution_space > dual_view_type
Kokkos::DualView specialization used by this class.
base_type::impl_scalar_type impl_scalar_type
The type used internally in place of Scalar.
void get1dCopy(const Teuchos::ArrayView< Scalar > &A) const
Return multi-vector values in user-provided two-dimensional array (using Teuchos memory management cl...
One or more distributed dense vectors.
virtual std::string description() const
Return a one-line description of this object.
static const bool useAtomicUpdatesByDefault
Whether sumIntoLocalValue and sumIntoGlobalValue should use atomic updates by default.
MultiVector< ST, LO, GO, NT > createCopy(const MultiVector< ST, LO, GO, NT > &src)
Return a deep copy of the given MultiVector.
dot_type dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &y) const
Return the dot product of this Vector and the input Vector x.
GlobalOrdinal global_ordinal_type
This class' third template parameter; the type of global indices.
Scalar scalar_type
This class' first template parameter; the type of each entry in the Vector.
void sumIntoLocalValue(const LocalOrdinal myRow, const Scalar &value, const bool atomic=base_type::useAtomicUpdatesByDefault) const
Add value to existing value, using local (row) index.
Declaration of the Tpetra::MultiVector class.
Teuchos::ArrayRCP< const Scalar > getData() const
Const view of the local values of this vector.
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.
virtual ~Vector()=default
Destructor (virtual for memory safety of derived classes).
typename Kokkos::Details::InnerProductSpaceTraits< impl_scalar_type >::dot_type dot_type
Type of an inner ("dot") product result.
LocalOrdinal local_ordinal_type
This class' second template parameter; the type of local indices.
typename Kokkos::ArithTraits< impl_scalar_type >::mag_type mag_type
Type of a norm result.
Forward declaration of Tpetra::Vector.
typename Kokkos::Details::ArithTraits< Scalar >::val_type impl_scalar_type
The type used internally in place of Scalar.
A parallel distribution of indices over processes.
Node node_type
The Kokkos Node type.
A distributed dense vector.
base_type::dual_view_type dual_view_type
Kokkos::DualView specialization used by this class.
typename map_type::local_ordinal_type local_ordinal_type
The type of local indices that this class uses.
Scalar meanValue() const
Compute mean (average) value of this Vector.
base_type::map_type map_type
The type of the Map specialization used by this class.
mag_type normInf() const
Return the infinity-norm of this Vector.
base_type::dot_type dot_type
Type of an inner ("dot") product result.
Base class for distributed Tpetra objects that support data redistribution.
mag_type norm1() const
Return the one-norm of this Vector.
void replaceLocalValue(const LocalOrdinal myRow, const Scalar &value) const
Replace current value at the specified location with specified values.