Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra_Reindex_MultiVector_def.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Tpetra: Templated Linear Algebra Services Package
4//
5// Copyright 2008 NTESS and the Tpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef TPETRA_REINDEX_MULTIVECTOR_DEF_HPP
11#define TPETRA_REINDEX_MULTIVECTOR_DEF_HPP
12
14
24
25namespace Tpetra {
26
27template <class Scalar,
28 class LocalOrdinal,
29 class GlobalOrdinal,
30 class Node>
37
38template <class Scalar,
39 class LocalOrdinal,
40 class GlobalOrdinal,
41 class Node>
45
46template <class Scalar,
47 class LocalOrdinal,
48 class GlobalOrdinal,
49 class Node>
50typename Reindex_MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>::NewType
52 this->origObj_ = origMultiVector;
53 assert(origMultiVector->getMap()->getLocalNumElements() == this->newRowMap_->getLocalNumElements());
54 assert(origMultiVector->isConstantStride() == true); // So that it is valid to call origMultiVector->getStride()
55
57 this->newObj_ = Teuchos::RCP<mv_t>(new mv_t(*origMultiVector, Teuchos::DataAccess::Copy));
58 this->newObj_->replaceMap(newRowMap_);
59
60 return this->newObj_;
61}
62
63//
64// Explicit instantiation macro
65//
66// Must be expanded from within the Tpetra namespace!
67//
68
69#define TPETRA_REINDEXMULTIVECTOR_INSTANT(SCALAR, LO, GO, NODE) \
70 template class Reindex_MultiVector<SCALAR, LO, GO, NODE>;
71
72} // namespace Tpetra
73
74#endif // TPETRA_REINDEX_MULTIVECTOR_DEF_HPP
Declaration of the Tpetra::Reindex_MultiVector class.
Struct that holds views of the contents of a CrsMatrix.
One or more distributed dense vectors.
NewType operator()(OriginalType const &origMultiVector)
Reindex_MultiVector(Teuchos::RCP< Map< LocalOrdinal, GlobalOrdinal, Node > const > newRowMap)
Namespace Tpetra contains the class and methods constituting the Tpetra library.