Wrapper for Hypre's sequential vector.
More...
#include <TNL/Containers/HypreVector.h>
|
| HypreVector (const HypreVector &other)=delete |
|
| HypreVector (hypre_Vector *handle, bool take_ownership=true) |
| Convert Hypre's format to HypreVector.
|
|
| HypreVector (HypreVector &&other) noexcept |
|
| HypreVector (RealType *data, IndexType size) |
|
| HypreVector (ViewType view) |
|
void | bind (hypre_Vector *handle, bool take_ownership=true) |
| Convert Hypre's format to HypreSeqVector.
|
|
void | bind (HypreVector &vector) |
|
void | bind (RealType *data, IndexType size) |
| Drop previously set data (deallocate if the vector was the owner) and bind to the given data (i.e., the vector does not become the owner).
|
|
void | bind (VectorType &vector) |
|
void | bind (ViewType view) |
|
ConstViewType | getConstView () const |
|
const RealType * | getData () const noexcept |
|
RealType * | getData () noexcept |
|
IndexType | getSize () const |
|
ViewType | getView () |
|
| operator const hypre_Vector * () const noexcept |
|
| operator HYPRE_Vector () const noexcept |
|
| operator hypre_Vector * () noexcept |
|
HypreVector & | operator= (const HypreVector &other)=delete |
|
HypreVector & | operator= (HypreVector &&other) noexcept |
|
void | reset () |
| Reset the vector to empty state.
|
|
void | resize (IndexType size) |
| Equivalent to setSize.
|
|
void | resize (IndexType size, RealType value) |
| Equivalent to setSize followed by setValue.
|
|
void | setSize (IndexType size) |
| Set the new vector size.
|
|
void | setValue (RealType value) |
| Set all elements of the vector to value.
|
|
|
bool | owns_handle = true |
|
hypre_Vector * | v = nullptr |
|
Wrapper for Hypre's sequential vector.
Links to upstream sources:
◆ HypreVector()
TNL::Containers::HypreVector::HypreVector |
( |
hypre_Vector * | handle, |
|
|
bool | take_ownership = true ) |
|
inlineexplicit |
Convert Hypre's format to HypreVector.
- Parameters
-
handle | is the Hypre vector handle. |
take_ownership | indicates if the vector should take ownership of the handle, i.e. whether to call hypre_VectorDestroy when it does not need it anymore. |
◆ bind()
void TNL::Containers::HypreVector::bind |
( |
hypre_Vector * | handle, |
|
|
bool | take_ownership = true ) |
|
inline |
Convert Hypre's format to HypreSeqVector.
- Parameters
-
handle | is the Hypre vector handle. |
take_ownership | indicates if the vector should take ownership of the handle, i.e. whether to call hypre_VectorDestroy when it does not need it anymore. |
◆ setSize()
void TNL::Containers::HypreVector::setSize |
( |
IndexType | size | ) |
|
|
inline |
Set the new vector size.
- if the vector previously owned data, they are deallocated
- new size is set
- the vector is initialized with hypre_SeqVectorInitialize (i.e., data are allocated)
The documentation for this class was generated from the following file:
- src/TNL/Containers/HypreVector.h