Advanced Multi-Physics (AMP)
On-Line Documentation
TpetraVector.h
Go to the documentation of this file.
1#ifndef included_AMP_TpetraVector
2#define included_AMP_TpetraVector
3
4#include "AMP/vectors/Vector.h"
5
7#include "Tpetra_Map_decl.hpp"
8#include "Tpetra_Vector_decl.hpp"
10
11
12namespace AMP::LinearAlgebra {
13
14
30class TpetraVector final
31{
32public:
36
57 inline Tpetra::Vector<> &getTpetra_Vector() { return *d_tpetra; }
58
79 inline const Tpetra::Vector<> &getTpetra_Vector() const { return *d_tpetra; }
80
92 static std::shared_ptr<TpetraVector> view( Vector::shared_ptr vec );
93
105 static std::shared_ptr<const TpetraVector> constView( Vector::const_shared_ptr vec );
106
107public:
108 inline Tpetra::Vector<> &getNativeVec() { return *d_tpetra; }
109 inline const Tpetra::Vector<> &getNativeVec() const { return *d_tpetra; }
110 inline std::shared_ptr<Vector> getManagedVec() { return d_AMP; }
111 inline std::shared_ptr<const Vector> getManagedVec() const { return d_AMP; }
112
113private:
114 TpetraVector() = delete;
115 explicit TpetraVector( std::shared_ptr<Vector> );
116
117private:
118 std::shared_ptr<Tpetra::Vector<>> d_tpetra;
119 std::shared_ptr<Vector> d_AMP;
120};
121
122
123} // namespace AMP::LinearAlgebra
124
125
126#endif
A class that manages an Tpetra::Vector.
const Tpetra::Vector & getTpetra_Vector() const
Obtain Tpetra::Vector for use in Trilinos routines.
std::shared_ptr< const Vector > getManagedVec() const
static std::shared_ptr< TpetraVector > view(Vector::shared_ptr vec)
Obtain a view of a vector with an Tpetra::Vector wrapper.
Tpetra::Vector & getTpetra_Vector()
Obtain Tpetra::Vector for use in Trilinos routines.
std::shared_ptr< Vector > d_AMP
const Tpetra::Vector & getNativeVec() const
std::shared_ptr< Tpetra::Vector<> > d_tpetra
TpetraVector(std::shared_ptr< Vector >)
static std::shared_ptr< const TpetraVector > constView(Vector::const_shared_ptr vec)
Obtain a view of a vector with an Tpetra::Vector wrapper.
std::shared_ptr< Vector > getManagedVec()
std::shared_ptr< Vector > shared_ptr
Shorthand for shared pointer to Vector.
Definition Vector.h:60
std::shared_ptr< const Vector > const_shared_ptr
Definition Vector.h:65
#define DISABLE_WARNINGS
Re-enable warnings.
#define ENABLE_WARNINGS
Suppress all warnings.



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page