![]() |
deal.II version GIT relicensing-6960-g70e9c5b7be 2026-10-22 20:10:01+00:00
|
#include <deal.II/sundials/arkode_stepper.h>
Wrapper for the LSRKStep (Low-Storage Runge-Kutta) SSP (Strong-Stability-Preserving) family.
SSP methods are designed for advection-dominated or hyperbolic problems where strong-stability (monotonicity) of the time integrator is required. Such problems typically have Jacobian eigenvalues that lie on or near the imaginary axis, in contrast to the (near) negative-real-axis spectrum targeted by the STS family in LSRKStepperSTS. Unlike the STS family, SSP methods use a fixed number of stages and do not require a dominant eigenvalue estimate.
Available methods (passed as method_name):
ARKODE_LSRK_SSP_S_2: optimal SSP of order 2 with \(s\) stages.ARKODE_LSRK_SSP_S_3: optimal SSP of order 3 with \(s\) stages.ARKODE_LSRK_SSP_10_4: SSP(10,4) of order 4 with 10 stages (default).The user has to provide the implementation of the following std::function:
Any other custom settings of the LSRKStep object can be specified in
Definition at line 1775 of file arkode_stepper.h.
Classes | |
| class | AdditionalData |
Public Member Functions | |
| LSRKStepperSSP (const AdditionalData &data=AdditionalData()) | |
| void * | get_arkode_memory () const override |
Public Attributes | |
| std::function< void(const double t, const VectorType &y, VectorType &explicit_f)> | explicit_function |
| std::function< void(void *arkode_mem)> | custom_setup |
Protected Member Functions | |
| internal::InvocationContext | invocation_context () const |
Private Types | |
| using | CallbackContext = typename ARKodeStepper< VectorType >::template CallbackContext< LSRKStepperSSP< VectorType > > |
| using | ARKodeMemoryPtr = typename ARKodeStepper< VectorType >::ARKodeMemoryPtr |
Private Member Functions | |
| void | reinit (double t0, const VectorType &y0) override |
| void | resize (double t0, const VectorType &y0, double hscale) override |
| void | attach (std::exception_ptr &pending_exception, const internal::SharedSUNContext &context) |
Private Attributes | |
| AdditionalData | data |
| ARKodeMemoryPtr | arkode_mem |
| CallbackContext | callback_ctx |
| std::exception_ptr * | pending_exception_ptr = nullptr |
| internal::SharedSUNContext | sundials_context |
|
private |
Definition at line 1866 of file arkode_stepper.h.
|
private |
Definition at line 1869 of file arkode_stepper.h.
| SUNDIALS::LSRKStepperSSP< VectorType >::LSRKStepperSSP | ( | const AdditionalData & | data = AdditionalData() | ) |
Constructor, with class parameters set by the AdditionalData object.
| data | LSRKStepperSSP configuration data |
|
overridevirtual |
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.
Implements SUNDIALS::ARKodeStepper< VectorType >.
|
overrideprivatevirtual |
Rebuild the stepper at a given time instance and for a given state vector. Required by the ARKodeStepper interface.
| t0 | Time instance that serves as starting time |
| y0 | Initial state vector whose layout is used for initialization of the internal ARKODE vectors |
Implements SUNDIALS::ARKodeStepper< VectorType >.
|
overrideprivatevirtual |
Resize the ARKODE memory in place via ARKodeResize().
| 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 |
Implements SUNDIALS::ARKodeStepper< VectorType >.
|
inlineprivateinherited |
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.
|
inlineprotectedinherited |
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.
| std::function< void(const double t, const VectorType &y, VectorType &explicit_f)> SUNDIALS::LSRKStepperSSP< VectorType >::explicit_function |
A function object that users must supply and that is intended to compute the IVP right hand side. Sets \(explicit\_f = f(t, y)\).
Definition at line 1847 of file arkode_stepper.h.
| std::function<void(void *arkode_mem)> SUNDIALS::LSRKStepperSSP< VectorType >::custom_setup |
A function object that users may supply and which is intended to perform custom settings on the supplied arkode_mem object. Refer to the SUNDIALS documentation for valid options.
| arkode_mem | pointer to the ARKODE memory block which can be used for custom calls to LSRKStepSet... methods. |
Definition at line 1863 of file arkode_stepper.h.
|
private |
LSRKStepperSSP configuration data.
Definition at line 1896 of file arkode_stepper.h.
|
private |
ARKODE memory object.
Definition at line 1901 of file arkode_stepper.h.
|
private |
LSRKStepperSSP callback context.
Definition at line 1906 of file arkode_stepper.h.
|
privateinherited |
Exception pointer of the ARKode object this stepper is attached to.
Definition at line 211 of file arkode_stepper.h.
|
privateinherited |
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.