Integrators
Integrators contain useful properties for writing a time-integration
scheme. They are defined in a class hierarchy. MultiStageDriver
owns a pointer to an integrator. The type of integrator depends on the
template parameter. By default it is the base class, and you can
assign child integrator you like, but you must cast the pointer at
runtime to access useful features of the child classes. Alternatively
if you inherit from MultiStageDriver
and specialize to a specific
child class, you can avoid doing the cast.
StagedIntegrator
The base class is the StagedIntegrator
. It contains a timestep
dt
, a total number of integration steps, nstages
, a total
number of scratch buffers required, nbuffers
, and lists of strings
containing suggested names for the stages and buffers, buffer_name
and stage_name
. All other integrators inherit from this one.
LowStorageIntegrator
The LowStorageIntegrator
contains integrators in the 2S form as
described in Ketchson (2010). These integrators are of the classic
Shu Osher form:
where superscripts in parentheses mean subcycles in a Runge-Kutta
integration and
These methods can be generalized to support more general methods with
the introduction of an additional
The full update then takes the form:
where here
The LowStorageIntegrator
contains arrays for delta
, beta
,
gam0
, gam1
, and c
. Available integration methods are:
RK1
, which is simply forward Euler.RK2
, which is Heun’s method.VL2
, 2nd-order Van Leer predictor-corrector from Stone and Gardiner 2009. Requires donor-cell reconstruction for the predictor stage.RK3
, a strong stability preserving variant.RK4
, a strong stability preserving variant.
ButcherIntegrator
The ButcherIntegrator
provides a classic Butcher Tableau with
arrays
RK1
, simple forward Euler.RK2
, Heun’s method.RK4
, The classic 4th-order method.RK10
, A recent version with fewer stages than Fehlberg’s classic RK8(9), computed by Faegin and tabulated here.