ThyraVector is a bridge between AMP::LinearAlgebra::Vector and the Thyra::VectorDefaultBase data structure.
More...
#include <ThyraVector.h>
ThyraVector is a bridge between AMP::LinearAlgebra::Vector and the Thyra::VectorDefaultBase data structure.
A ThyraVector has a Thyra::VectorDefaultBase data structure. Given an AMP::LinearAlgebra::Vector, this class can create a Thyra view without copying the data. As such, this class serves three purposes:
- Provides a Thyra Vector for derived classes to use, fill, manage, etc.
- Provides an interface for accessing this Thyra Vector independent of derived classes
- Provides a static method for creating a Thyra view of an AMP Vector.
Definition at line 28 of file ThyraVector.h.
◆ ~ThyraVector()
| virtual AMP::LinearAlgebra::ThyraVector::~ThyraVector |
( |
| ) |
|
|
virtual |
◆ ThyraVector()
| AMP::LinearAlgebra::ThyraVector::ThyraVector |
( |
| ) |
|
|
protected |
Construct a ThyraVector.
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.
◆ constView() [1/2]
Return an AMP Vector from the Thyra::VectorBase.
◆ constView() [2/2]
If needed, create a Thyra 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.
- Parameters
-
| AmpVector | a shared pointer to a Vector |
◆ getManagedVec() [1/2]
| virtual std::shared_ptr< const Vector > AMP::LinearAlgebra::ThyraVector::getManagedVec |
( |
| ) |
const |
|
pure virtual |
◆ getManagedVec() [2/2]
| virtual std::shared_ptr< Vector > AMP::LinearAlgebra::ThyraVector::getManagedVec |
( |
| ) |
|
|
pure virtual |
◆ getNativeVec() [1/2]
| auto AMP::LinearAlgebra::ThyraVector::getNativeVec |
( |
| ) |
|
|
inline |
◆ getNativeVec() [2/2]
| auto AMP::LinearAlgebra::ThyraVector::getNativeVec |
( |
| ) |
const |
|
inline |
◆ getVec() [1/2]
| virtual Teuchos::RCP< Thyra::VectorBase< double > > AMP::LinearAlgebra::ThyraVector::getVec |
( |
| ) |
|
|
virtual |
Obtain Thyra Vector for use in Thyra routines.
This function is used to get a Thyra vector. The following idiom should be used since it fails gracefully. In this function, a view may be created before the Vec is extracted
Referenced by getNativeVec(), and getNativeVec().
◆ getVec() [2/2]
| virtual Teuchos::RCP< const Thyra::VectorBase< double > > AMP::LinearAlgebra::ThyraVector::getVec |
( |
| ) |
const |
|
virtual |
Obtain Thyra Vector for use in Thyra routines.
This function is used to get a Thyra vector. The following idiom should be used since it fails gracefully. In this function, a view may be created before the Vec is extracted
◆ swapThyraVec()
| void AMP::LinearAlgebra::ThyraVector::swapThyraVec |
( |
ThyraVector & |
rhs | ) |
|
|
inlineprotected |
◆ view() [1/2]
Return an AMP Vector from the Thyra::VectorBase.
◆ view() [2/2]
If needed, create a Thyra 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.
- Parameters
-
| AmpVector | a shared pointer to a Vector |
◆ d_thyraVec
| Teuchos::RCP<Thyra::VectorBase<double> > AMP::LinearAlgebra::ThyraVector::d_thyraVec |
|
protected |
The documentation for this class was generated from the following file: