deal.II version GIT relicensing-6960-g70e9c5b7be 2026-10-22 20:10:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SUNDIALS::internal::SharedSUNContext Class Reference

#include <deal.II/sundials/invocation_context.h>

Detailed Description

A SUNContext that is freed when the last copy of this object is destroyed.

SUNDIALS objects retain a reference to the context with which they were created, including during their destruction. Therefore, any object that owns such SUNDIALS objects must also keep the corresponding context alive.

This object implicitly converts to the plain SUNContext that SUNDIALS functions expect.

Definition at line 56 of file invocation_context.h.

Public Member Functions

 SharedSUNContext ()=default
 
 SharedSUNContext (SUNContext context)
 
 operator SUNContext () const
 

Private Attributes

std::shared_ptr< std::remove_pointer_t< SUNContext > > context
 

Constructor & Destructor Documentation

◆ SharedSUNContext() [1/2]

SUNDIALS::internal::SharedSUNContext::SharedSUNContext ( )
default

Construct an object that holds no context.

◆ SharedSUNContext() [2/2]

SUNDIALS::internal::SharedSUNContext::SharedSUNContext ( SUNContext  context)
inlineexplicit

Take ownership of context, which is freed with SUNContext_Free().

Definition at line 67 of file invocation_context.h.

Member Function Documentation

◆ operator SUNContext()

SUNDIALS::internal::SharedSUNContext::operator SUNContext ( ) const
inline

Return the underlying SUNContext.

Definition at line 79 of file invocation_context.h.

Member Data Documentation

◆ context

std::shared_ptr<std::remove_pointer_t<SUNContext> > SUNDIALS::internal::SharedSUNContext::context
private

Definition at line 85 of file invocation_context.h.


The documentation for this class was generated from the following file: