Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
runge-kutta.h File Reference

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.
 

Function Documentation

◆ runge_kutta()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

static double update ( scalar ul,
scalar kl,
double  t,
double  dt,
void(*)(scalar *ul, double t, scalar *kl Lu,
scalar dul,
double  w 
)
static

Runge–Kutta time integrators

Definition at line 7 of file runge-kutta.h.

References _i, dt, free(), k, list_clone(), t, u, ul, w, and x.

Here is the call graph for this function: