SundialsVector is a bridge between AMP::LinearAlgebra::Vector and the Sundials N_Vector data structure. More...
#include <SundialsVector.h>

Public Member Functions | |
| virtual std::shared_ptr< const Vector > | getManagedVec () const =0 |
| virtual std::shared_ptr< Vector > | getManagedVec ()=0 |
| N_Vector & | getNativeVec () |
| const N_Vector & | getNativeVec () const |
| N_Vector & | getNVector () |
| Obtain a Sundials N_Vector for use in Sundials routines. | |
| const N_Vector & | getNVector () const |
| Obtain a Sundials N_Vector for use in Sundials routines. | |
Static Public Member Functions | |
| static std::shared_ptr< const SundialsVector > | constView (Vector::const_shared_ptr AmpVector) |
| If needed, create a Sundials wrapper for AmpVector. Otherwise, return AmpVector. | |
| static std::shared_ptr< SundialsVector > | view (Vector::shared_ptr AmpVector) |
| If needed, create a Sundials wrapper for AmpVector. Otherwise, return AmpVector. | |
Protected Member Functions | |
| SundialsVector () | |
| Construct a SundialsVector. | |
Protected Attributes | |
| N_Vector | d_n_vector |
| Sundials NVector wrapping the data in the Vector. | |
SundialsVector is a bridge between AMP::LinearAlgebra::Vector and the Sundials N_Vector data structure.
A SundialsVector has a N_Vector data structure. Given an AMP::LinearAlgebra::Vector, this class can create a Sundials view without copying the data. As such, this class serves three purposes:
Definition at line 36 of file SundialsVector.h.
|
protected |
Construct a SundialsVector.
This can only be called by a derived class or the static function below. There is no need to create this vector directly since it is virtual.
|
static |
If needed, create a Sundials 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 |
|
pure virtual |
Implemented in AMP::LinearAlgebra::ManagedSundialsVector.
|
pure virtual |
Implemented in AMP::LinearAlgebra::ManagedSundialsVector.
|
inline |
Definition at line 113 of file SundialsVector.h.
References getNVector().
|
inline |
Definition at line 114 of file SundialsVector.h.
References getNVector().
| N_Vector & AMP::LinearAlgebra::SundialsVector::getNVector | ( | ) |
Obtain a Sundials N_Vector for use in Sundials routines.
This function is used to get a Sundials vector. The following idiom should be used since it fails gracefully. In this function, a view may be created before the NVector is extracted.
Referenced by getNativeVec(), and getNativeVec().
| const N_Vector & AMP::LinearAlgebra::SundialsVector::getNVector | ( | ) | const |
Obtain a Sundials N_Vector for use in Sundials routines.
This function is used to get a Sundials vector. The following idiom should be used since it fails gracefully. In this function, a view may be created before the NVector is extracted.
|
static |
If needed, create a Sundials 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 |
|
protected |
Sundials NVector wrapping the data in the Vector.
However this is created, the N_Vector holds a pointer to the data used in the Vector in such a manner that is consistent with Sundials.
Definition at line 45 of file SundialsVector.h.
|
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 |