![]() |
deal.II version GIT relicensing-7058-gb35ee29762 2026-11-11 09:30:01+00:00
|
#include <deal.II/sundials/sundials_handle.h>
An owning handle for a C object created by SUNDIALS, for example a SUNLinearSolver or a SUNNonlinearSolver. The object is freed in the destructor by the function provided by the Traits class, which has to satisfy the SundialsTraits concept (when compiling with C++20).
The handle takes ownership of the object passed to the constructor, so any SUNDIALS creation function can be used:
The handle can be moved but not copied.
| Traits | A class that defines the type Handle (the SUNDIALS pointer type) and the static function free(Handle) that releases the object. See SundialsTraits. |
Definition at line 73 of file sundials_handle.h.
Public Types | |
| using | Handle = typename Traits::Handle |
Public Member Functions | |
| SundialsHandle (Handle handle) | |
| ~SundialsHandle () | |
| SundialsHandle (const SundialsHandle &)=delete | |
| SundialsHandle & | operator= (const SundialsHandle &)=delete |
| SundialsHandle (SundialsHandle &&other) noexcept | |
| SundialsHandle & | operator= (SundialsHandle &&other) noexcept |
| operator Handle () const | |
Private Member Functions | |
| void | reset () noexcept |
Private Attributes | |
| Handle | handle |
| using SUNDIALS::internal::SundialsHandle< Traits >::Handle = typename Traits::Handle |
Definition at line 76 of file sundials_handle.h.
|
inlineexplicit |
Constructor. Takes ownership of handle, which must not be null (SUNDIALS returns null if the creation of an object fails).
Definition at line 82 of file sundials_handle.h.
|
inline |
Definition at line 89 of file sundials_handle.h.
|
delete |
|
inlinenoexcept |
Definition at line 98 of file sundials_handle.h.
|
delete |
|
inlinenoexcept |
Definition at line 103 of file sundials_handle.h.
|
inline |
Implicit conversion to the SUNDIALS pointer. The handle keeps the ownership.
Definition at line 117 of file sundials_handle.h.
|
inlineprivatenoexcept |
Definition at line 124 of file sundials_handle.h.
|
private |
Definition at line 133 of file sundials_handle.h.