PetscVector is a bridge between AMP::LinearAlgebra::Vector and the PETSc Vec data structure. More...
#include <PetscVector.h>
Public Member Functions | |
| std::shared_ptr< Vector > | getManagedVec () |
| std::shared_ptr< const Vector > | getManagedVec () const |
| Vec & | getNativeVec () |
| const Vec & | getNativeVec () const |
| Vec & | getVec () |
| Obtain PETSc Vec for use in PETSc routines. | |
| const Vec & | getVec () const |
| Obtain PETSc Vec for use in PETSc routines. | |
| virtual | ~PetscVector () |
| Destructor. | |
Static Public Member Functions | |
| static std::shared_ptr< const PetscVector > | constView (Vector::const_shared_ptr AmpVector) |
| If needed, create a PETSc wrapper for AmpVector. Otherwise, return AmpVector. | |
| static std::shared_ptr< PetscVector > | view (Vector::shared_ptr AmpVector) |
| If needed, create a PETSc wrapper for AmpVector. Otherwise, return AmpVector. | |
Protected Member Functions | |
| PetscVector () | |
| Empty constructor. | |
| PetscVector (std::shared_ptr< Vector > vec) | |
| Default constructor. | |
Protected Attributes | |
| Vec | d_Vec |
| std::shared_ptr< Vector > | d_vector |
PetscVector is a bridge between AMP::LinearAlgebra::Vector and the PETSc Vec data structure.
A PetscVector has a Vec data structure. Given an AMP::LinearAlgebra::Vector, this class can create a PETSc view without copying the data. As such, this class serves three purposes:
Definition at line 26 of file PetscVector.h.
|
virtual |
Destructor.
|
protected |
Empty constructor.
|
explicitprotected |
Default constructor.
|
static |
If needed, create a PETSc wrapper for AmpVector. Otherwise, return AmpVector.
The function attempts to return a view with the least amount of work. It will never copy data. If the vector cannot be wrapped it wll return an error.
| AmpVector | a shared pointer to a Vector |
|
inline |
Definition at line 102 of file PetscVector.h.
References d_vector.
|
inline |
Definition at line 103 of file PetscVector.h.
References d_vector.
|
inline |
Definition at line 100 of file PetscVector.h.
References d_Vec.
|
inline |
Definition at line 101 of file PetscVector.h.
References d_Vec.
|
inline |
Obtain PETSc Vec for use in PETSc routines.
This function is used to get a PETSc vector. The following idiom should be used since it fails gracefully. In this function, a view may be created before the Vec is extracted
Definition at line 56 of file PetscVector.h.
References d_Vec.
|
inline |
Obtain PETSc Vec for use in PETSc routines.
This function is used to get a PETSc vector. The following idiom should be used since it fails gracefully. In this function, a view may be created before the Vec is extracted
Definition at line 80 of file PetscVector.h.
References d_Vec.
|
static |
If needed, create a PETSc wrapper for AmpVector. Otherwise, return AmpVector.
The function attempts to return a view with the least amount of work. It will never copy data. If the vector cannot be wrapped it wll return an error.
| AmpVector | a shared pointer to a Vector |
Referenced by AMP::LinearAlgebra::PetscViewFactory::getVec().
|
protected |
Definition at line 114 of file PetscVector.h.
Referenced by getNativeVec(), getNativeVec(), getVec(), and getVec().
|
protected |
Definition at line 115 of file PetscVector.h.
Referenced by getManagedVec(), and getManagedVec().
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:43. Comments on this page |