10 #ifndef TPETRA_BLOCKVECTOR_DEF_HPP
11 #define TPETRA_BLOCKVECTOR_DEF_HPP
15 template<
class Scalar,
class LO,
class GO,
class Node>
21 template<
class Scalar,
class LO,
class GO,
class Node>
24 const Teuchos::DataAccess copyOrView) :
28 template<
class Scalar,
class LO,
class GO,
class Node>
34 template<
class Scalar,
class LO,
class GO,
class Node>
39 base_type (meshMap, pointMap, blockSize, 1)
42 template<
class Scalar,
class LO,
class GO,
class Node>
49 TEUCHOS_TEST_FOR_EXCEPTION(
51 "Tpetra::BlockVector: Input MultiVector has "
55 template<
class Scalar,
class LO,
class GO,
class Node>
63 template<
class Scalar,
class LO,
class GO,
class Node>
68 const size_t offset) :
69 base_type (X, newMeshMap, newPointMap, offset)
72 template<
class Scalar,
class LO,
class GO,
class Node>
76 const size_t offset) :
80 template<
class Scalar,
class LO,
class GO,
class Node>
87 template<
class Scalar,
class LO,
class GO,
class Node>
91 return ((
base_type*)
this)->replaceLocalValues (localRowIndex, 0, vals);
94 template<
class Scalar,
class LO,
class GO,
class Node>
98 return ((
base_type*)
this)->replaceGlobalValues (globalRowIndex, 0, vals);
101 template<
class Scalar,
class LO,
class GO,
class Node>
105 return ((
base_type*)
this)->sumIntoLocalValues (localRowIndex, 0, vals);
108 template<
class Scalar,
class LO,
class GO,
class Node>
112 return ((
base_type*)
this)->sumIntoLocalValues (globalRowIndex, 0, vals);
115 template<
class Scalar,
class LO,
class GO,
class Node>
116 typename BlockVector<Scalar, LO, GO, Node>::const_little_host_vec_type
120 return ((
const base_type*)
this)->getLocalBlockHost(localRowIndex, 0,
124 template<
class Scalar,
class LO,
class GO,
class Node>
125 typename BlockVector<Scalar, LO, GO, Node>::little_host_vec_type
129 return ((base_type*)
this)->getLocalBlockHost(localRowIndex, 0,
133 template<
class Scalar,
class LO,
class GO,
class Node>
134 typename BlockVector<Scalar, LO, GO, Node>::little_host_vec_type
138 return ((base_type*)
this)->getLocalBlockHost(localRowIndex, 0,
139 Access::OverwriteAll);
149 #define TPETRA_BLOCKVECTOR_INSTANT(S,LO,GO,NODE) \
150 template class BlockVector< S, LO, GO, NODE >;
152 #endif // TPETRA_BLOCKVECTOR_DEF_HPP
bool sumIntoGlobalValues(const GO globalRowIndex, const Scalar vals[])
Sum into all values at the given mesh point, using a global index.
size_t getNumVectors() const
Number of columns in the multivector.
bool sumIntoLocalValues(const LO localRowIndex, const Scalar vals[])
Sum into all values at the given mesh point, using a local index.
MultiVector for multiple degrees of freedom per mesh point.
vec_type getVectorView()
Get a Tpetra::Vector that views this BlockVector's data.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getVectorNonConst(const size_t j)
Return a Vector which is a nonconst view of column j.
const_little_host_vec_type getLocalBlockHost(const LO localRowIndex, Access::ReadOnlyStruct) const
Get a view of the degrees of freedom at the given mesh point, using a local index.
bool replaceLocalValues(const LO localRowIndex, const Scalar vals[])
Replace all values at the given mesh point, using a local index.
A distributed dense vector.
bool replaceGlobalValues(const GO globalRowIndex, const Scalar vals[])
Replace all values at the given mesh point, using a global index.
BlockVector()
Default constructor.
Vector for multiple degrees of freedom per mesh point.