|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
Go to the source code of this file.
Functions | |
| static double | update (scalar *ul, scalar *kl, double t, double dt, void(*Lu)(scalar *ul, double t, scalar *kl), scalar *dul, double w) |
| void | runge_kutta (scalar *ul, double t, double dt, void(*Lu)(scalar *ul, double t, scalar *kl), int order) |
| The runge_kutta() function implements the classical first- (Euler), second- and fourth-order Runge–Kutta time integrators for evolution equations of the form. | |
| void runge_kutta | ( | scalar * | ul, |
| double | t, | ||
| double | dt, | ||
| void(*)(scalar *ul, double t, scalar *kl) | Lu, | ||
| int | order | ||
| ) |
The runge_kutta() function implements the classical first- (Euler), second- and fourth-order Runge–Kutta time integrators for evolution equations of the form.
\[ \frac{\partial\mathbf{u}}{\partial t} = L(\mathbf{u}, t) \]
with \(\mathbf{u}\) a vector (i.e. list) of evolving fields and \(L()\) a generic, user-defined operator.
Given \(\mathbf{u}\), the initial time t, a timestep dt and the function \(L()\) which should fill kl with the right-hand-side of the evolution equation, the function below will return \(\mathbf{u}\) at time \(t + dt\) using the Runge–Kutta scheme specified by order.
Definition at line 42 of file runge-kutta.h.
References _i, assert, dt, free(), k, list_clone(), t, u, ul, update, w, and x.
Referenced by run().