42 #ifndef TPETRA_VECTOR_DECL_HPP
43 #define TPETRA_VECTOR_DECL_HPP
45 #include "Tpetra_ConfigDefs.hpp"
46 #include "Tpetra_MultiVector_decl.hpp"
57 template<
class Scalar,
58 class LocalOrdinal=int,
59 class GlobalOrdinal=LocalOrdinal,
60 class Node=Kokkos::DefaultNode::DefaultNodeType>
63 friend class MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node>;
111 void get1dCopy(ArrayView<Scalar> A)
const;
132 typename Teuchos::ScalarTraits<Scalar>::magnitudeType
norm1()
const;
136 typename Teuchos::ScalarTraits<Scalar>::magnitudeType
norm2()
const;
140 typename Teuchos::ScalarTraits<Scalar>::magnitudeType
normInf()
const;
159 describe (Teuchos::FancyOStream& out,
160 const Teuchos::EVerbosityLevel verbLevel =
161 Teuchos::Describable::verbLevel_default)
const;
166 template <
class S,
class LO,
class GO,
class N>
167 friend RCP< Vector<S,LO,GO,N> >
168 createVectorFromView(
const RCP<
const Map<LO,GO,N> > &,
const ArrayRCP<S> &);
173 const ArrayRCP<Scalar> &view,
174 EPrivateHostViewConstructor );
178 const ArrayRCP<Scalar> & data);
182 const ArrayRCP<Scalar> & data,
183 EPrivateComputeViewConstructor );
185 typedef Kokkos::MultiVector<Scalar,Node> KMV;
186 typedef Kokkos::DefaultArithmetic<KMV> MVT;
192 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
193 RCP<Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
196 const bool DO_INIT_TO_ZERO =
true;
204 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
205 RCP<Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
207 const ArrayRCP<Scalar> &view)
215 HOST_VIEW_CONSTRUCTOR)
221 #endif // TPETRA_VECTOR_DECL_HPP
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
Print the object with some verbosity level to a FancyOStream.
ViewAccepter provides support for compile-time detection based on Node type, of support for accepting...
Teuchos::ScalarTraits< Scalar >::magnitudeType normWeighted(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &weights) const
Compute Weighted 2-norm (RMS Norm) of this Vector.
One or more distributed dense vectors.
RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createVectorFromView(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const ArrayRCP< Scalar > &view)
Non-member function to create a Vector with view semantics using user-allocated data.
virtual std::string description() const
A simple one-line description of this object.
void replaceGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Replace current value at the specified location with specified value.
Teuchos::ScalarTraits< Scalar >::magnitudeType normInf() const
Compute Inf-norm of this Vector.
RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createVector(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
Non-member function to create a Vector from a specified Map.
virtual ~Vector()
Destructor.
void replaceLocalValue(LocalOrdinal myRow, const Scalar &value)
Replace current value at the specified location with specified values.
Scalar dot(const Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &a) const
Computes dot product of this Vector against input Vector x.
Teuchos::ArrayRCP< const Scalar > getData() const
Const view of the local values of this vector.
void sumIntoGlobalValue(GlobalOrdinal globalRow, const Scalar &value)
Adds specified value to existing value at the specified location.
Teuchos::ScalarTraits< Scalar >::magnitudeType norm2() const
Compute 2-norm of this Vector.
void get1dCopy(ArrayView< Scalar > A) const
Return multi-vector values in user-provided two-dimensional array (using Teuchos memory management cl...
Describes a parallel distribution of objects over processes.
Vector(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, bool zeroOut=true)
Sets all vector entries to zero.
void sumIntoLocalValue(LocalOrdinal myRow, const Scalar &value)
Adds specified value to existing value at the specified location.
A distributed dense vector.
Scalar meanValue() const
Compute mean (average) value of this Vector.
Teuchos::ScalarTraits< Scalar >::magnitudeType norm1() const
Return 1-norm of this Vector.