|
METHOD
|
#include <RKPlus.h>


Public Member Functions | |
| RK4 (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod, ModelExtension *modelExtension=NULL) | |
| virtual | ~RK4 () |
| void | stage1 (double *cons, double *prims, double *aux, double dt) |
| void | stage2 (double *cons, double *prims, double *aux, double dt) |
| void | stage3 (double *cons, double *prims, double *aux, double dt) |
| void | stage4 (double *cons, double *prims, double *aux, double dt) |
| void | stage5 (double *cons, double *prims, double *aux, double dt) |
| void | step (double *cons, double *prims, double *aux, double dt=0) |
Public Member Functions inherited from RKPlus | |
| RKPlus (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod, ModelExtension *modelExtension=NULL) | |
| virtual | ~RKPlus () |
| virtual void | rhs (double *cons, double *prims, double *aux, double *rhsVec) |
Public Member Functions inherited from TimeIntegrator | |
| TimeIntegrator (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod, ModelExtension *modelExtension=NULL) | |
| virtual | ~TimeIntegrator () |
| void | finalise (double *cons, double *prims, double *aux) |
Public Member Functions inherited from TimeIntegratorBase | |
| TimeIntegratorBase (Data *data, Model *model, Bcs *bcs, FluxMethod *fluxMethod, ModelExtension *modelExtension=NULL) | |
| virtual | ~TimeIntegratorBase () |
Public Attributes | |
| double * | u1cons |
| double * | u1prims |
| double * | u1aux |
| double * | u2cons |
| double * | u2prims |
| double * | u2aux |
| double * | u3cons |
| double * | u3prims |
| double * | u3aux |
| double * | u4cons |
| double * | u4prims |
| double * | u4aux |
| double * | rhs1 |
| double * | rhs2 |
| double * | rhs3 |
| double * | rhs4 |
| double * | rhs5 |
Public Attributes inherited from RKPlus | |
| double * | fluxCont |
Public Attributes inherited from TimeIntegratorBase | |
| Data * | data |
| Model * | model |
| Bcs * | bcs |
| FluxMethod * | fluxMethod |
| ModelExtension * | modelExtension |
Fourth order RK.
\begin{align} U^{(1)} = U^n + 0.391752226571890 \Delta t \mathcal{L}(U^n). \end{align}
Stage 2:
\begin{align} U^{(2)} = 0.444370493651235 U^n + 0.555629506348765 U^{(1)} + 0.368410593050371 \Delta t \mathcal{L}(U^{(1)}) \end{align}
Stage 3:
\begin{align} U^{(3} = 0.620101851488403 U^n + 0.379898148511597 U^{(2)} + 0.251891774271694 \Delta t \mathcal{L}(U^{(2)}) \end{align}
Stage 4:
\begin{align} U^{(4} = 0.178079954393132 U^n + 0.821920045606868 U^{(3)} + 0.544974750228521 \Delta t \mathcal{L}(U^{(3)}) \end{align}
Stage 5:
\begin{align} U^{n+1} = = 0.517231671970585 U^{(2)} + 0.096059710526147 U^{(3)} + 0.386708617503269 U^{(4)} + 0.063692468666290 \Delta t \mathcal{L}(U^{(3)}) + 0.226007483236906 \Delta t \mathcal{L}(U^{(4)}) \end{align}
| RK4::RK4 | ( | Data * | data, |
| Model * | model, | ||
| Bcs * | bcs, | ||
| FluxMethod * | fluxMethod, | ||
| ModelExtension * | modelExtension = NULL |
||
| ) |
Constructor.
Constructor requires simulation data and the flux and source functions from the model class. Stores the necessary pointer.
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
| [in] | *prims | pointer to primitive vector work array. Size is \(N_{prims} \times N_x \times N_y \times N_z\) |
| [in] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\) |
| dt | the step size desired to move by. Defaults to the value in the Data class |
|
virtual |
| void RK4::stage1 | ( | double * | cons, |
| double * | prims, | ||
| double * | aux, | ||
| double | dt | ||
| ) |
Stage 2 result.
Compute and store stage 2 result.
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
| [in] | *prims | pointer to primitive vector work array. Size is \(N_{prims} \times N_x \times N_y \times N_z\) |
| [in] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\) |
| dt | the step size desired to move by. Defaults to the value in the Data class |
| void RK4::stage2 | ( | double * | cons, |
| double * | prims, | ||
| double * | aux, | ||
| double | dt | ||
| ) |
Stage 2 result.
Compute and store stage 2 result.
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
| [in] | *prims | pointer to primitive vector work array. Size is \(N_{prims} \times N_x \times N_y \times N_z\) |
| [in] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\) |
| dt | the step size desired to move by. Defaults to the value in the Data class |
| void RK4::stage3 | ( | double * | cons, |
| double * | prims, | ||
| double * | aux, | ||
| double | dt | ||
| ) |
Stage 3 result.
Compute and store stage 3 result.
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
| [in] | *prims | pointer to primitive vector work array. Size is \(N_{prims} \times N_x \times N_y \times N_z\) |
| [in] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\) |
| dt | the step size desired to move by. Defaults to the value in the Data class |
| void RK4::stage4 | ( | double * | cons, |
| double * | prims, | ||
| double * | aux, | ||
| double | dt | ||
| ) |
Stage 4 result.
Compute and store stage 4 result.
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
| [in] | *prims | pointer to primitive vector work array. Size is \(N_{prims} \times N_x \times N_y \times N_z\) |
| [in] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\) |
| dt | the step size desired to move by. Defaults to the value in the Data class |
| void RK4::stage5 | ( | double * | cons, |
| double * | prims, | ||
| double * | aux, | ||
| double | dt | ||
| ) |
Stage 5 result.
Compute and store stage 5 result.
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
| [in] | *prims | pointer to primitive vector work array. Size is \(N_{prims} \times N_x \times N_y \times N_z\) |
| [in] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\) |
| dt | the step size desired to move by. Defaults to the value in the Data class |
|
virtual |
Performs a single time step.
The timestep will use the current values of the conserved, primitive and auxiliary variables at t=t0 and compute the values of all of them at time \(t=t_0 + dt\). I.e. the conserved vector is evolved forward, and the corresponding prims and aux vars are found.
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
| [in] | *prims | pointer to primitive vector work array. Size is \(N_{prims} \times N_x \times N_y \times N_z\) |
| [in] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\) |
| dt | the step size desired to move by. Defaults to the value in the Data class |
Implements TimeIntegratorBase.