HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Explicit Runge-Kutta method. More...
#include <basic.h>
#include <arrayfunctions_gpu.h>
#include <simulation_object.h>
#include <timeintegration.h>
#include <time.h>
#include <math.h>
Go to the source code of this file.
Functions | |
int | TimeRK (void *ts) |
Explicit Runge-Kutta method.
Definition in file TimeRK.c.
int TimeRK | ( | void * | ts | ) |
Advance the ODE given by
\begin{equation} \frac{d{\bf u}}{dt} = {\bf F} \left({\bf u}\right) \end{equation}
by one time step of size HyPar::dt using the forward Euler method given by
\begin{align} {\bf U}^{\left(i\right)} &= {\bf u}_n + \Delta t \sum_{j=1}^{i-1} a_{ij} {\bf F}\left({\bf U}^{\left(j\right)}\right), \\ {\bf u}_{n+1} &= {\bf u}_n + \Delta t \sum_{i=1}^s b_{i} {\bf F}\left({\bf U}^{\left(i\right)}\right), \end{align}
where the subscript represents the time level, the superscripts represent the stages, \(\Delta t\) is the time step size HyPar::dt, and \({\bf F}\left({\bf u}\right)\) is computed by TimeIntegration::RHSFunction. The Butcher tableaux coefficients are \(a_{ij}\) (ExplicitRKParameters::A) and \(b_i\) (ExplicitRKParameters::b).
Note: In the code TimeIntegration::Udot is equivalent to \({\bf F}\left({\bf u}\right)\).
ts | Object of type TimeIntegration |
Definition at line 35 of file TimeRK.c.