![]() |
deal.II version GIT relicensing-6960-g70e9c5b7be 2026-10-22 20:10:01+00:00
|
#include <deal.II/sundials/arkode_stepper.h>
A base class for the implementation of ARKode stepper classes.
This class does not perform any actions during the time marching itself. It is responsible for setting up the internal data structures of the ARKODE via the ARKODE memory block. This setup is very much stepper specific, whereas the time advance itself is generalized in ARKODE. This separation of responsibilities is reflected in the current design that distributes the functionality between ARKode and ARKodeStepper accordingly.
Definition at line 81 of file arkode_stepper.h.
Classes | |
| struct | CallbackContext |
Public Member Functions | |
| virtual | ~ARKodeStepper ()=default |
| virtual void * | get_arkode_memory () const =0 |
Protected Types | |
| using | ARKodeMemoryPtr = std::unique_ptr< void, void(*)(void *)> |
Protected Member Functions | |
| internal::InvocationContext | invocation_context () const |
Private Member Functions | |
| void | attach (std::exception_ptr &pending_exception, const internal::SharedSUNContext &context) |
| virtual void | reinit (double t0, const VectorType &y0)=0 |
| virtual void | resize (double t0, const VectorType &y0, double hscale)=0 |
Private Attributes | |
| std::exception_ptr * | pending_exception_ptr = nullptr |
| internal::SharedSUNContext | sundials_context |
Friends | |
| class | ARKode< VectorType > |
|
protected |
Alias for the memory management of the ARKODE memory block introduced to avoid repeating the long type. This smart pointer is created and destroyed by the corresponding stepper specific functions: for example, for ARKStep these are ARKStepCreate and ARKStepFree, respectively. The underlying object is supplied to the native ARKODE functions.
Definition at line 185 of file arkode_stepper.h.
|
virtualdefault |
Destructor. Made virtual to allow this class to be used as an abstract base class.
|
pure virtual |
Provides user access to the internally used ARKODE memory.
This functionality is intended for users who wish to query additional information directly from the ARKODE integrator, refer to the ARKODE manual for the various ARKStepGet... functions. The ARKStepSet... functions should not be called since this might lead to conflicts with various settings that are performed by this ARKodeStepper object.
Implemented in SUNDIALS::ARKStepper< VectorType >, SUNDIALS::ARKStepper< Vector< double > >, SUNDIALS::ERKStepper< VectorType >, SUNDIALS::LSRKStepperSTS< VectorType >, and SUNDIALS::LSRKStepperSSP< VectorType >.
|
inlineprivate |
Bind the stepper to the ARKode object that drives it. This is called once by the constructor of ARKode. All objects the stepper creates for SUNDIALS use context, which the stepper keeps alive for as long as it lives, and callbacks store exceptions in pending_exception.
Definition at line 125 of file arkode_stepper.h.
|
privatepure virtual |
Rebuild the stepper at a given time instance and for a given state vector.
| t0 | Time instance that serves as starting time |
| y0 | Initial state vector whose layout is used for initialization of the internal ARKODE vectors |
Implemented in SUNDIALS::ARKStepper< VectorType >, SUNDIALS::ERKStepper< VectorType >, SUNDIALS::LSRKStepperSTS< VectorType >, and SUNDIALS::LSRKStepperSSP< VectorType >.
|
privatepure virtual |
Adapt the stepper to a state vector whose size or layout has changed (e.g. after mesh refinement) while keeping the time stepping history (step size, adaptivity state, counters) intact.
| t0 | Current time |
| y0 | Current state vector with the new size |
| hscale | Factor by which the upcoming step size is rescaled; values less or equal to zero are treated as one |
Implemented in SUNDIALS::ARKStepper< VectorType >, SUNDIALS::ERKStepper< VectorType >, SUNDIALS::LSRKStepperSTS< VectorType >, and SUNDIALS::LSRKStepperSSP< VectorType >.
|
inlineprotected |
The context that the ARKode object, to which this stepper is attached. It is used to create SUNDIALS objects and to propagate exceptions across C boundaries (see invocation_context.h).
Definition at line 193 of file arkode_stepper.h.
|
friend |
Make ARKode class a friend such that the latter could access reinit() method.
Definition at line 1912 of file arkode_stepper.h.
|
private |
Exception pointer of the ARKode object this stepper is attached to.
Definition at line 211 of file arkode_stepper.h.
|
private |
Base class members are destroyed after those of derived classes, so the context outlives the ARKODE memory and everything else a derived stepper created with it.
Definition at line 219 of file arkode_stepper.h.