42 #ifndef TPETRA_VECTOR_DECL_HPP 43 #define TPETRA_VECTOR_DECL_HPP 53 #include "Tpetra_ConfigDefs.hpp" 80 class GlobalOrdinal = ::Tpetra::Details::DefaultTypes::global_ordinal_type,
82 const bool classic = Node::classic>
91 friend class MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node, classic>;
156 explicit Vector (
const Teuchos::RCP<const map_type>& map,
157 const bool zeroOut =
true);
181 const Teuchos::DataAccess copyOrView);
184 Vector (
const Teuchos::RCP<const map_type>& map,
185 const Teuchos::ArrayView<const Scalar>& A);
199 Vector (
const Teuchos::RCP<const map_type>& map,
216 Vector (
const Teuchos::RCP<const map_type>& map,
232 template <
class Node2>
233 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node2, Node2::classic> >
234 clone (
const Teuchos::RCP<Node2>& node2);
303 void get1dCopy (
const Teuchos::ArrayView<Scalar>& A)
const;
313 Teuchos::ArrayRCP<const Scalar>
getData ()
const {
317 Teuchos::RCP<const Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node, classic> >
318 offsetView (
const Teuchos::RCP<const map_type>& subMap,
319 const size_t offset)
const;
321 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node, classic> >
322 offsetViewNonConst (
const Teuchos::RCP<const map_type>& subMap,
323 const size_t offset);
384 describe (Teuchos::FancyOStream& out,
385 const Teuchos::EVerbosityLevel verbLevel =
386 Teuchos::Describable::verbLevel_default)
const;
393 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node, const
bool classic = Node::
classic>
394 Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node, classic>
395 createCopy (
const Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node, classic>& src);
402 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node, const
bool classic = Node::
classic>
403 Teuchos::RCP<Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node, classic> >
411 #endif // TPETRA_VECTOR_DECL_HPP Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node2, Node2::classic > > clone(const Teuchos::RCP< Node2 > &node2)
Return a deep copy of *this with a different Node type (and therefore a different Device type)...
Vector(const Teuchos::RCP< const map_type > &map, const bool zeroOut=true)
Basic constructor.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
base_type::impl_scalar_type impl_scalar_type
The type used internally in place of Scalar.
MultiVector< ST, LO, GO, NT, classic > createCopy(const MultiVector< ST, LO, GO, NT, classic > &src)
Return a deep copy of the given MultiVector.
virtual std::string description() const
Return a one-line description of this object.
KokkosClassic::DefaultNode::DefaultNodeType node_type
Default value of Node template parameter.
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.
GlobalOrdinal global_ordinal_type
This class' third template parameter; the type of global indices.
base_type::dot_type dot_type
Type of an inner ("dot") product result.
One or more distributed dense vectors.
Kokkos::Details::InnerProductSpaceTraits< impl_scalar_type >::dot_type dot_type
Type of an inner ("dot") product result.
int local_ordinal_type
Default value of LocalOrdinal template parameter.
base_type::mag_type mag_type
Type of a norm result.
mag_type normInf() const
Compute Inf-norm of this Vector.
Declaration of the Tpetra::MultiVector class.
mag_type norm1() const
Return 1-norm of this Vector.
Node node_type
The Kokkos Node type.
virtual ~Vector()
Destructor.
mag_type norm2() const
Compute 2-norm of this Vector.
static const bool useAtomicUpdatesByDefault
Whether sumIntoLocalValue and sumIntoGlobalValue should use atomic updates by default.
base_type::map_type map_type
The type of the Map specialization used by this class.
Teuchos::ArrayRCP< const Scalar > getData() const
Const view of the local values of this vector.
Teuchos::ArrayRCP< Scalar > getDataNonConst()
View of the local values of this vector.
dot_type dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node, classic > &y) const
Computes dot product of this Vector against input Vector x.
LocalOrdinal local_ordinal_type
This class' second template parameter; the type of local indices.
double scalar_type
Default value of Scalar template parameter.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node, classic > > createVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
Nonmember Vector "constructor": Create a Vector from a given Map.
void sumIntoLocalValue(const LocalOrdinal myRow, const Scalar &value, const bool atomic=base_type::useAtomicUpdatesByDefault) const
Add value to existing value, using local (row) index.
void get1dCopy(const Teuchos::ArrayView< Scalar > &A) const
Return multi-vector values in user-provided two-dimensional array (using Teuchos memory management cl...
void replaceGlobalValue(const GlobalOrdinal globalRow, const Scalar &value) const
Replace current value at the specified location with specified value.
Kokkos::Details::ArithTraits< Scalar >::val_type impl_scalar_type
The type used internally in place of Scalar.
Scalar scalar_type
This class' first template parameter; the type of each entry in the Vector.
Kokkos::Details::ArithTraits< impl_scalar_type >::mag_type mag_type
Type of a norm result.
void replaceLocalValue(const LocalOrdinal myRow, const Scalar &value) const
Replace current value at the specified location with specified values.
Kokkos::DualView< impl_scalar_type **, Kokkos::LayoutLeft, typename execution_space::execution_space > dual_view_type
Kokkos::DualView specialization used by this class.
Describes a parallel distribution of objects over processes.
void sumIntoGlobalValue(const GlobalOrdinal globalRow, const Scalar &value, const bool atomic=base_type::useAtomicUpdatesByDefault) const
Add value to existing value, using global (row) index.
A distributed dense vector.
base_type::dual_view_type dual_view_type
Kokkos::DualView specialization used by this class.
mag_type TPETRA_DEPRECATED normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node, classic > &weights) const
Compute Weighted 2-norm (RMS Norm) of this Vector.
Node::device_type device_type
The Kokkos device type.
Scalar meanValue() const
Compute mean (average) value of this Vector.