Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
Classes | |
struct | dg::EntireDomain |
The domain that contains all points. More... | |
struct | dg::AdaptiveTimeloop< ContainerType > |
Integrate using a while loop. More... | |
struct | dg::MultistepTimeloop< ContainerType > |
Integrate using a for loop and a fixed non-changeable time-step. More... | |
struct | dg::MultistepTableau< real_type > |
Manage coefficients of Multistep methods. More... | |
struct | dg::ConvertsToMultistepTableau< real_type > |
Convert identifiers to their corresponding dg::MultistepTableau . More... | |
struct | dg::aTimeloop< ContainerType > |
Abstract timeloop independent of stepper and ODE. More... | |
struct | dg::IdentityFilter |
A filter that does nothing. More... | |
struct | dg::SinglestepTimeloop< ContainerType > |
Integrate using a for loop and a fixed time-step. More... | |
struct | dg::ConvertsToButcherTableau< real_type > |
Convert identifiers to their corresponding dg::ButcherTableau . More... | |
struct | dg::ConvertsToShuOsherTableau< real_type > |
Convert identifiers to their corresponding dg::ShuOsherTableau . More... | |
Functions | |
static std::string | dg::to2str (enum to mode) |
Convert integration mode to string. More... | |
Variables | |
static auto | dg::l2norm = [] ( const auto& x){ return sqrt( dg::blas1::dot(x,x));} |
Compute \( \sqrt{\sum_i x_i^2}\) using dg::blas1::dot . More... | |
static auto | dg::fast_l2norm |
Compute \( \sqrt{\sum_i x_i^2}\) using naive summation. More... | |
static auto | dg::i_control |
\( h_{n+1}= h_n \epsilon_n^{-1/p}\) More... | |
static auto | dg::pi_control |
\( h_{n+1}= h_n \epsilon_n^{-0.8/p}\epsilon_{n-1}^{0.31/p}\) More... | |
static auto | dg::pid_control |
\( h_{n+1}= h_n \epsilon_n^{-0.58/p}\epsilon_{n-1}^{0.21/p}\epsilon_{n-2}^{-0.1/p}\) More... | |
static auto | dg::ex_control |
\( h_{n+1} = h_n \epsilon_n^{-0.367/p}(\epsilon_n/\epsilon_{n-1})^{0.268/p} \) More... | |
static auto | dg::im_control |
\( h_{n+1} = h_n (h_n/h_{n-1}) \epsilon_n^{-0.98/p}(\epsilon_n/\epsilon_{n-1})^{-0.95/p} \) More... | |
static auto | dg::imex_control |
h_{n+1} = |ex_control| < |im_control| ? ex_control : im_control More... | |
Identifiers for Multistep Tableaus.
We follow the naming convention as NAME-S-Q
Identifiers for Butcher Tableaus.
We follow the naming convention of the ARKode library https://sundials.readthedocs.io/en/latest/arkode/Butcher_link.html (They also provide nice stability plots for their methods) as NAME-S-P-Q or NAME-S-Q, where
Enumerator | |
---|---|
EXPLICIT_EULER_1_1 | |
MIDPOINT_2_2 | |
KUTTA_3_3 | |
CLASSIC_4_4 | |
HEUN_EULER_2_1_2 | |
CAVAGLIERI_3_1_2 | |
FEHLBERG_3_2_3 | The original method uses the embedding as the solution [Hairer, Noersett, Wanner, Solving ordinary differential Equations I, 1987]. |
FEHLBERG_4_2_3 | The original method uses the embedding as the solution [Hairer, Noersett, Wanner, Solving ordinary differential Equations I, 1987] (fsal) |
BOGACKI_SHAMPINE_4_2_3 | Bogacki-Shampine-4-2-3 (fsal) |
CAVAGLIERI_4_2_3 | Low-storage implicit/explicit Runge-Kutta schemes for the simulation of stiff high-dimensional ODE systems The SSP scheme IMEXRKCB3c (explicit part) |
ARK324L2SA_ERK_4_2_3 | |
ZONNEVELD_5_3_4 | |
ARK436L2SA_ERK_6_3_4 | |
SAYFY_ABURUB_6_3_4 | |
CASH_KARP_6_4_5 | |
FEHLBERG_6_4_5 | |
DORMAND_PRINCE_7_4_5 | Dormand-Prince-7-4-5 (fsal) |
TSITOURAS09_7_4_5 | Tsitouras 5(4) method from 2009 (fsal), The default method in Julia |
TSITOURAS11_7_4_5 | Tsitouras 5(4) method from 2011 (fsal), Further improves Tsitouras09 (Note that in the paper b-bt is printed instead of bt) |
ARK548L2SA_ERK_8_4_5 | Kennedy and Carpenter (2019) Optimum ARK_2 method (explicit part) |
VERNER_9_5_6 | Verner-9-5-6 (fsal) |
VERNER_10_6_7 | |
FEHLBERG_13_7_8 | |
DORMAND_PRINCE_13_7_8 | [Hairer, Noersett, Wanner, Solving ordinary differential Equations I, 1987] |
FEAGIN_17_8_10 | |
IMPLICIT_EULER_1_1 | |
IMPLICIT_MIDPOINT_1_2 | |
TRAPEZOIDAL_2_2 | |
SDIRK_2_1_2 | |
CAVAGLIERI_IMPLICIT_3_1_2 | |
BILLINGTON_3_3_2 | |
TRBDF2_3_3_2 | |
SANCHEZ_3_3 | |
KVAERNO_4_2_3 | |
SDIRK_4_2_3 | |
CAVAGLIERI_IMPLICIT_4_2_3 | Low-storage implicit/explicit Runge-Kutta schemes for the simulation of stiff high-dimensional ODE systems The SSP scheme IMEXRKCB3c (implicit part) |
ARK324L2SA_DIRK_4_2_3 | |
SANCHEZ_3_4 | |
CASH_5_2_4 | |
CASH_5_3_4 | |
SDIRK_5_3_4 | |
KVAERNO_5_3_4 | |
ARK436L2SA_DIRK_6_3_4 | |
KVAERNO_7_4_5 | |
SANCHEZ_6_5 | |
ARK548L2SA_DIRK_8_4_5 | Kennedy and Carpenter (2019) Optimum ARK_2 method (implicit part) |
SANCHEZ_7_6 | |
SSPRK_2_2 | SSPRK "Shu-Osher-Form" |
SSPRK_3_2 | SSPRK "Shu-Osher-Form" |
SSPRK_3_3 | SSPRK "Shu-Osher-Form" |
SSPRK_5_3 | SSPRK "Shu-Osher-Form" |
SSPRK_5_4 | SSPRK "Shu-Osher-Form" |
|
strong |
|
inlinestatic |
Convert integration mode to string.
Converts
mode | the mode |
|
static |
\( h_{n+1} = h_n \epsilon_n^{-0.367/p}(\epsilon_n/\epsilon_{n-1})^{0.268/p} \)
|
static |
Compute \( \sqrt{\sum_i x_i^2}\) using naive summation.
The intention of this function is to be used in the Adaptive
timestepping class. This function is intended for small arrays (less than 100 elements say) where the dg::blas1::dot
function has its worst performance and takes overly long time to compute.
x | Vector to take the norm of |
sqrt(sum_i x_i^2)
using dg::blas1::reduce
|
static |
\( h_{n+1}= h_n \epsilon_n^{-1/p}\)
|
static |
\( h_{n+1} = h_n (h_n/h_{n-1}) \epsilon_n^{-0.98/p}(\epsilon_n/\epsilon_{n-1})^{-0.95/p} \)
|
static |
h_{n+1} = |ex_control| < |im_control| ? ex_control : im_control
|
static |
Compute \( \sqrt{\sum_i x_i^2}\) using dg::blas1::dot
.
The intention of this function is to be used in the Adaptive
timestepping class.
x | Vector to take the norm of |
sqrt(dg::blas1::dot(x,x))
ContainerType | Any class for which a specialization of TensorTraits exists and which fulfills the requirements of the there defined data and execution policies derived from AnyVectorTag and AnyPolicyTag . Among others
ContainerTypes in the argument list, then TensorTraits must exist for all of them |
|
static |
\( h_{n+1}= h_n \epsilon_n^{-0.8/p}\epsilon_{n-1}^{0.31/p}\)
|
static |
\( h_{n+1}= h_n \epsilon_n^{-0.58/p}\epsilon_{n-1}^{0.21/p}\epsilon_{n-2}^{-0.1/p}\)
PID stands for "Proportional" (the present error), "Integral" (the past error), "Derivative" (the future error). See a good tutorial here https://www.youtube.com/watch?v=UR0hOmjaHp0 and further information in the mathematical primer in the ARKode library. The PID controller is a good controller to start with, it does not overshoot too much, is smooth, has no systematic over- or under-estimation and converges very quickly to the desired timestep. In fact Kennedy and Carpenter, Appl. num. Math., (2003) report that it outperformed other controllers in practical problems
value_type |
dt | the present (old), [0], previous [1] and second previous [2] timestep h_n |
eps | the error relative to the tolerance of the present [0], previous [1] and second previous [2] timestep |
embedded_order | order q of the embedded timestep |
order | order p of the timestep |