Advanced Multi-Physics (AMP)
On-Line Documentation
EpetraVector.h
Go to the documentation of this file.
1#ifndef included_AMP_EpetraVector
2#define included_AMP_EpetraVector
3
4#include "AMP/vectors/Vector.h"
5
7#include <Epetra_Map.h>
8#include <Epetra_Vector.h>
10
11
12namespace AMP::LinearAlgebra {
13
14
29class EpetraVector final
30{
31public:
35
56 inline Epetra_Vector &getEpetra_Vector() { return *d_epetra; }
57
78 inline const Epetra_Vector &getEpetra_Vector() const { return *d_epetra; }
79
91 static std::shared_ptr<EpetraVector> view( Vector::shared_ptr vec );
92
104 static std::shared_ptr<const EpetraVector> constView( Vector::const_shared_ptr vec );
105
106public:
107 inline Epetra_Vector &getNativeVec() { return *d_epetra; }
108 inline const Epetra_Vector &getNativeVec() const { return *d_epetra; }
109 inline std::shared_ptr<Vector> getManagedVec() { return d_AMP; }
110 inline std::shared_ptr<const Vector> getManagedVec() const { return d_AMP; }
111
112private:
113 EpetraVector() = delete;
114 explicit EpetraVector( std::shared_ptr<Vector> );
115
116private:
117 std::shared_ptr<Epetra_Vector> d_epetra;
118 std::shared_ptr<Vector> d_AMP;
119};
120
121
122} // namespace AMP::LinearAlgebra
123
124
125#endif
A class that manages an Epetra_Vector.
const Epetra_Vector & getNativeVec() const
std::shared_ptr< Vector > d_AMP
Epetra_Vector & getEpetra_Vector()
Obtain Epetra_Vector for use in Trilinos routines.
static std::shared_ptr< const EpetraVector > constView(Vector::const_shared_ptr vec)
Obtain a view of a vector with an Epetra_Vector wrapper.
const Epetra_Vector & getEpetra_Vector() const
Obtain Epetra_Vector for use in Trilinos routines.
static std::shared_ptr< EpetraVector > view(Vector::shared_ptr vec)
Obtain a view of a vector with an Epetra_Vector wrapper.
std::shared_ptr< Epetra_Vector > d_epetra
EpetraVector(std::shared_ptr< Vector >)
std::shared_ptr< Vector > getManagedVec()
std::shared_ptr< const Vector > getManagedVec() const
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