10#ifndef TPETRA_VECTOR_DECL_HPP
11#define TPETRA_VECTOR_DECL_HPP
16#include "Tpetra_ConfigDefs.hpp"
40template <
class Scalar,
117 explicit Vector (
const Teuchos::RCP<const map_type>& map,
118 const bool zeroOut =
true);
132 const Teuchos::DataAccess copyOrView);
140 const Teuchos::RCP<const map_type>& map,
144 Vector (
const Teuchos::RCP<const map_type>& map,
145 const Teuchos::ArrayView<const Scalar>& A);
159 Vector (
const Teuchos::RCP<const map_type>& map,
176 Vector (
const Teuchos::RCP<const map_type>& map,
188 Vector (
const Teuchos::RCP<const map_type>& map,
302 void get1dCopy (
const Teuchos::ArrayView<Scalar>& A)
const;
312 Teuchos::ArrayRCP<const Scalar>
getData ()
const {
316 Teuchos::RCP<const Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
317 offsetView (
const Teuchos::RCP<const map_type>& subMap,
318 const size_t offset)
const;
320 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
321 offsetViewNonConst (
const Teuchos::RCP<const map_type>& subMap,
322 const size_t offset);
378 const Teuchos::EVerbosityLevel verbLevel =
379 Teuchos::Describable::verbLevel_default)
const;
385template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
394template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
395Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
Declaration of the Tpetra::MultiVector class.
Forward declaration of Tpetra::Vector.
A parallel distribution of indices over processes.
One or more distributed dense vectors.
Map< LO, GO, Node > map_type
Kokkos::DualView< impl_scalar_type **, Kokkos::LayoutLeft, device_type > dual_view_type
MultiVector()
Default constructor: makes a MultiVector with no rows or columns.
typename Kokkos::Details::InnerProductSpaceTraits< impl_scalar_type >::dot_type dot_type
typename Kokkos::ArithTraits< Scalar >::val_type impl_scalar_type
typename Kokkos::ArithTraits< impl_scalar_type >::mag_type mag_type
static const bool useAtomicUpdatesByDefault
A distributed dense vector.
virtual ~Vector()=default
Destructor (virtual for memory safety of derived classes).
Vector(const Teuchos::RCP< const map_type > &map, const dual_view_type &view, const dual_view_type &origView)
Expert mode constructor, that takes a Kokkos::DualView of the Vector's data and the "original" Kokkos...
void replaceGlobalValue(const GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
base_type::impl_scalar_type impl_scalar_type
void sumIntoLocalValue(const LocalOrdinal myRow, const Scalar &value, const bool atomic=base_type::useAtomicUpdatesByDefault)
Add value to existing value, using local (row) index.
base_type::mag_type mag_type
void replaceLocalValue(const LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
Vector(const Teuchos::RCP< const map_type > &map, const Teuchos::ArrayView< const Scalar > &A)
Set vector values from an existing array (copy).
base_type::dot_type dot_type
Vector & operator=(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &)=default
Copy assignment (shallow copy).
void sumIntoGlobalValue(const GlobalOrdinal globalRow, const Scalar &value, const bool atomic=base_type::useAtomicUpdatesByDefault)
Add value to existing value, using global (row) index.
Vector(const Teuchos::RCP< const map_type > &map, const wrapped_dual_view_type &d_view)
Expert mode constructor, that takes a WrappedDualView of the MultiVector's data.
base_type::wrapped_dual_view_type wrapped_dual_view_type
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 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(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Teuchos::DataAccess copyOrView)
Copy constructor (shallow or deep copy).
Vector()
Default constructor: makes a Vector with no rows or columns.
Vector(Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &&)=default
Move constructor (shallow move).
Teuchos::ArrayRCP< const Scalar > getData() const
Const view of the local values of this vector.
Vector(const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, const size_t j)
Create a Vector that views a single column of the input MultiVector.
Vector(const Teuchos::RCP< const map_type > &map, const dual_view_type &view)
Expert mode constructor, that takes a Kokkos::DualView of the Vector's data, and returns a Vector tha...
virtual std::string description() const
Return a one-line description of this object.
Node::device_type device_type
Vector(const Teuchos::RCP< const map_type > &map, const bool zeroOut=true)
Basic constructor.
Vector(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &)=default
Copy constructor (shallow copy).
Vector(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Teuchos::RCP< const map_type > &map, const local_ordinal_type rowOffset=0)
"Offset view" constructor that views the input Vector's local data, but with the given Map,...
void get1dCopy(const Teuchos::ArrayView< Scalar > &A) const
base_type::dual_view_type dual_view_type
Teuchos::ArrayRCP< Scalar > getDataNonConst()
dot_type dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &y) const
Return the dot product of this Vector and the input Vector x.
base_type::map_type map_type
Namespace Tpetra contains the class and methods constituting the Tpetra library.
MultiVector< ST, LO, GO, NT > createCopy(const MultiVector< ST, LO, GO, NT > &src)
Return a deep copy of the given MultiVector.