deal.II version 9.8.0
\(\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
SUNDIALS::LSRKStepperSSP< VectorType > Class Template Reference

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

Detailed Description

template<typename VectorType = Vector<double>>
class SUNDIALS::LSRKStepperSSP< VectorType >

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

Note
This class is only available when deal.II is compiled against SUNDIALS 7.2.0 or newer.

Definition at line 1684 of file arkode_stepper.h.

Inheritance diagram for SUNDIALS::LSRKStepperSSP< VectorType >:
[legend]

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

Private Types

using CallbackContext
using ARKodeMemoryPtr = typename ARKodeStepper<VectorType>::ARKodeMemoryPtr

Private Member Functions

void reinit (double t0, const VectorType &y0, internal::InvocationContext inv_ctx) override

Private Attributes

AdditionalData data
ARKodeMemoryPtr arkode_mem
CallbackContext callback_ctx

Member Typedef Documentation

◆ CallbackContext

template<typename VectorType = Vector<double>>
using SUNDIALS::LSRKStepperSSP< VectorType >::CallbackContext
private
Initial value:
typename ARKodeStepper<
typename ARKodeStepper< VectorType >::template CallbackContext< LSRKStepperSSP< VectorType > > CallbackContext

Definition at line 1775 of file arkode_stepper.h.

◆ ARKodeMemoryPtr

template<typename VectorType = Vector<double>>
using SUNDIALS::LSRKStepperSSP< VectorType >::ARKodeMemoryPtr = typename ARKodeStepper<VectorType>::ARKodeMemoryPtr
private

Definition at line 1778 of file arkode_stepper.h.

Constructor & Destructor Documentation

◆ LSRKStepperSSP()

template<typename VectorType = Vector<double>>
SUNDIALS::LSRKStepperSSP< VectorType >::LSRKStepperSSP ( const AdditionalData & data = AdditionalData())

Constructor, with class parameters set by the AdditionalData object.

Parameters
dataLSRKStepperSSP configuration data

Member Function Documentation

◆ get_arkode_memory()

template<typename VectorType = Vector<double>>
void * SUNDIALS::LSRKStepperSSP< VectorType >::get_arkode_memory ( ) const
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.

Note
If custom settings of ARKODE functionality (that are not achievable via the interface of this class) are required, the function custom_setup() should be used.
Returns
pointer to the ARKODE memory block that can be passed to SUNDIALS functions

Implements SUNDIALS::ARKodeStepper< VectorType >.

◆ reinit()

template<typename VectorType = Vector<double>>
void SUNDIALS::LSRKStepperSSP< VectorType >::reinit ( double t0,
const VectorType & y0,
internal::InvocationContext inv_ctx )
overrideprivatevirtual

Rebuild the stepper at a given time instance and for a given state vector. Required by the ARKodeStepper interface.

Parameters
t0Time instance that serves as starting time
y0Initial state vector whose layout is used for initialization of the internal ARKODE vectors
inv_ctxInvocation context that provides access to the SUNContext object and the exception pointer managed by the caller

Implements SUNDIALS::ARKodeStepper< VectorType >.

Member Data Documentation

◆ explicit_function

template<typename VectorType = Vector<double>>
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)\).

Note
This variable represents a user provided callback. See there for a description of how to deal with errors and other requirements and conventions. In particular, ARKode can deal with "recoverable" errors in some circumstances, so callbacks can throw exceptions of type RecoverableUserCallbackError.

Definition at line 1756 of file arkode_stepper.h.

◆ custom_setup

template<typename VectorType = Vector<double>>
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.

Note
This function will be called at the end of all other set up right before the actual time evolution is started or continued with solve_ode(). This function is also called when the solver is restarted, see solver_should_restart(). Consult the SUNDIALS manual to see which options are still available at this point.
Parameters
arkode_mempointer to the ARKODE memory block which can be used for custom calls to LSRKStepSet... methods.

Definition at line 1772 of file arkode_stepper.h.

◆ data

template<typename VectorType = Vector<double>>
AdditionalData SUNDIALS::LSRKStepperSSP< VectorType >::data
private

LSRKStepperSSP configuration data.

Definition at line 1798 of file arkode_stepper.h.

◆ arkode_mem

template<typename VectorType = Vector<double>>
ARKodeMemoryPtr SUNDIALS::LSRKStepperSSP< VectorType >::arkode_mem
private

ARKODE memory object.

Definition at line 1803 of file arkode_stepper.h.

◆ callback_ctx

template<typename VectorType = Vector<double>>
CallbackContext SUNDIALS::LSRKStepperSSP< VectorType >::callback_ctx
private

LSRKStepperSSP callback context.

Definition at line 1808 of file arkode_stepper.h.


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