deal.II version GIT relicensing-2167-g9622207b8f 2024-11-21 12:40:00+00:00
|
#include <deal.II/sundials/n_vector.h>
Public Member Functions | |
NVectorView ()=default | |
NVectorView (VectorType &vector, SUNContext nvector_context) | |
NVectorView (NVectorView &&) noexcept=default | |
NVectorView & | operator= (NVectorView &&) noexcept=default |
NVectorView (const NVectorView &)=delete | |
NVectorView & | operator= (const NVectorView &)=delete |
~NVectorView ()=default | |
operator N_Vector () const | |
N_Vector | operator-> () const |
Private Attributes | |
std::unique_ptr< _generic_N_Vector, std::function< void(N_Vector)> > | vector_ptr |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename VectorType > | |
NVectorView< VectorType > | make_nvector_view (VectorType &vector, SUNContext nvector_context) |
A view to a vector which can be used whenever a N_Vector is required.
Objects of this class should preferably be created by make_nvector_view() as
The resulting N_Vector is a view of the actual vector and not owning memory. Also, N_VDestroy() cannot be called on the resulting N_Vector since this would lead to a double delete in the destructor.
VectorType | Type of the vector that is stored in v |
Definition at line 154 of file n_vector.h.
|
default |
Default constructor.
The object is not actually viewing anything and needs to be assigned to with operator=(NVectorView &&).
SUNDIALS::internal::NVectorView< VectorType >::NVectorView | ( | VectorType & | vector, |
SUNContext | nvector_context | ||
) |
Constructor. Create view of vector
.
|
defaultnoexcept |
Move assignment.
|
delete |
Explicitly delete copy ctor. This class is move-only.
|
default |
Destructor.
|
defaultnoexcept |
Move constructor.
|
delete |
Explicitly delete copy assignment. This class is move-only.
SUNDIALS::internal::NVectorView< VectorType >::operator N_Vector | ( | ) | const |
Implicit conversion to N_Vector. This operator makes the NVectorView look like an actual N_Vector and it can be used directly as an argument in many SUNDIALS functions.
N_Vector SUNDIALS::internal::NVectorView< VectorType >::operator-> | ( | ) | const |
Access the N_Vector that is viewed by this object.
|
related |
Create a NVectorView of the given vector
.
This call is intended to be used as
The resulting object view
must be kept around as long as any other object will use the internally viewed N_Vector.
VectorType | Type of the viewed vector. This parameter can be deduced automatically and will respect a potential const-qualifier. |
vector | The vector to view. |
nvector_context | A SUNDIALS context object to be used for the operations we want to do on this vector. |
vector
.
|
private |
Actual pointer to a vector viewed by this class.
Definition at line 230 of file n_vector.h.