10 #ifndef XPETRA_VECTOR_HPP
11 #define XPETRA_VECTOR_HPP
16 #include "Xpetra_MultiVector.hpp"
20 template <
class Scalar,
23 class Node = Tpetra::KokkosClassic::DefaultNode::DefaultNodeType>
25 :
public virtual MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
44 template <
class TargetDeviceType,
class AccessType>
45 typename std::conditional<
47 typename dual_view_type::t_dev_um::execution_space::memory_space,
48 typename TargetDeviceType::memory_space>::value,
49 typename dual_view_type::t_dev_um,
50 typename dual_view_type::t_host_um>::type
87 virtual typename Teuchos::ScalarTraits<Scalar>::magnitudeType
norm1()
const = 0;
90 virtual typename Teuchos::ScalarTraits<Scalar>::magnitudeType
norm2()
const = 0;
93 virtual typename Teuchos::ScalarTraits<Scalar>::magnitudeType
normInf()
const = 0;
107 virtual void describe(Teuchos::FancyOStream &out,
const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default)
const = 0;
114 #define XPETRA_VECTOR_SHORT
115 #endif // XPETRA_VECTOR_HPP
virtual Teuchos::ScalarTraits< Scalar >::magnitudeType normInf() const =0
Compute Inf-norm of this Vector.
std::conditional< std::is_same< typename dual_view_type::t_dev_um::execution_space::memory_space, typename TargetDeviceType::memory_space >::value, typename dual_view_type::t_dev_um, typename dual_view_type::t_host_um >::type getLocalView(AccessType access_type) const
virtual void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)=0
Replace current value at the specified location with specified value.
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.
Kokkos::DualView< impl_scalar_type **, Kokkos::LayoutStride, typename node_type::device_type, Kokkos::MemoryUnmanaged > dual_view_type
virtual Scalar dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const =0
Computes dot product of this Vector against input Vector x.
virtual Scalar meanValue() const =0
Compute mean (average) value of this Vector.
EpetraGlobalOrdinal global_ordinal_type
virtual void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)=0
Adds specified value to existing value at the specified location.
virtual std::string description() const =0
Return a simple one-line description of this object.
Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >::dual_view_type dual_view_type
virtual Teuchos::ScalarTraits< Scalar >::magnitudeType norm1() const =0
Return 1-norm of this Vector.
virtual void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)=0
Adds specified value to existing value at the specified location.
virtual Teuchos::ScalarTraits< Scalar >::magnitudeType norm2() const =0
Compute 2-norm of this Vector.
virtual void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)=0
Replace current value at the specified location with specified values.
virtual ~Vector()
Destructor.