#include <Euler.h>
|
| | Euler (Data *data) |
| |
| virtual | ~Euler () |
| |
| void | sourceTermSingleCell (double *cons, double *prims, double *aux, double *source, int i=-1, int j=-1, int k=-1) |
| |
| void | sourceTerm (double *cons, double *prims, double *aux, double *source) |
| |
| void | getPrimitiveVarsSingleCell (double *cons, double *prims, double *aux, int i=-1, int j=-1, int k=-1) |
| |
| void | getPrimitiveVars (double *cons, double *prims, double *aux) |
| |
| void | primsToAll (double *cons, double *prims, double *aux) |
| |
| void | fluxVector (double *cons, double *prims, double *aux, double *f, const int dir) |
| |
| void | finalise (double *cons, double *prims, double *aux) |
| |
| | Model () |
| |
| | Model (Data *data) |
| |
| virtual | ~Model () |
| |
Non relativistic Euler equations.
- Standard, idea fluid, non relativistic euler equations, taken from Leveque 14.3
Definition at line 12 of file Euler.h.
◆ Euler()
| Euler::Euler |
( |
Data * |
data | ) |
|
◆ ~Euler()
| virtual Euler::~Euler |
( |
| ) |
|
|
inlinevirtual |
◆ finalise()
| void Euler::finalise |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux |
|
) |
| |
|
inlinevirtual |
Finalise the simulation variables.
- Mostly, this probably wont be needed, but if there is any final steps to finish off a timestep, this can be done here.
- Parameters
-
| [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\) |
Reimplemented from Model.
Definition at line 24 of file Euler.h.
◆ fluxVector()
| void Euler::fluxVector |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux, |
|
|
double * |
f, |
|
|
const int |
dir |
|
) |
| |
|
virtual |
Flux vector.
Generates the values of the flux vector at the cell centre. dir corresponds to the direction in which we want the flux: 0=x-direction, 1=y-direction, 2=z-direction.
- Parameters
-
| [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\) |
| [out] | *f | pointer to flux vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
| dir | direction in which to generate flux vector. (x, y, z) = (0, 1, 2) |
Implements Model.
◆ getPrimitiveVars()
| void Euler::getPrimitiveVars |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux |
|
) |
| |
|
virtual |
Spectral analysis.
Determines the values of the primitive and auxiliary vectors given some conserved vector, for use in the source and flux contributions to the conserved vector.
- Parameters
-
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
| [in,out] | *prims | pointer to primitive vector work array. Size is \(N_{prims} \times N_x \times N_y \times N_z\) |
| [in,out] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\) |
Implements Model.
◆ getPrimitiveVarsSingleCell()
| void Euler::getPrimitiveVarsSingleCell |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux, |
|
|
int |
i = -1, |
|
|
int |
j = -1, |
|
|
int |
k = -1 |
|
) |
| |
|
virtual |
Single cell cons2prims conversion.
For the same reason as outlined in sourceTermSingleCell, some models will require a single celled primitive conversion method. Each of the arguments are only for a single cell, ie, cons points to an (Ncons,) array, etc.
- Parameters
-
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons}\) |
| [in,out] | *prims | pointer to primitive vector work array. Size is \(N_{prims}\) |
| [in,out] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux}\) |
| i | optional cell number in x-direction |
| j | optional cell number in y-direction |
| k | optional cell number in z-direction |
- See also
- getPrimitiveVars
Implements Model.
◆ primsToAll()
| void Euler::primsToAll |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux |
|
) |
| |
|
virtual |
Primitive-to-all transformation.
Generates conserved and auxiliary vector from primitive vector, reqiored to get simulation started—initial data is given in primitive form.
- Parameters
-
| [out] | *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\) |
| [out] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux} \times N_x \times N_y \times N_z\) |
Implements Model.
◆ sourceTerm()
| void Euler::sourceTerm |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux, |
|
|
double * |
source |
|
) |
| |
|
virtual |
Source term contribution.
Generates the source term contribution to the values of the conserved variables required for the time integrator.
- Parameters
-
| [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\) |
| [out] | *source | pointer to source vector work array. Size is \(N_{cons} \times N_x \times N_y \times N_z\) |
- See also
- sourceTermSingleCell
Implements Model.
◆ sourceTermSingleCell()
| void Euler::sourceTermSingleCell |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux, |
|
|
double * |
source, |
|
|
int |
i = -1, |
|
|
int |
j = -1, |
|
|
int |
k = -1 |
|
) |
| |
|
virtual |
Single cell source term contribution.
Models that can posess a stiff source term and hence (semi-)implicit time integrators will require a source contribution (and cons2prims method) that applies to a single cell. Each of the arguments are only for a single cell, ie, cons points to an (Ncons,) array, etc.
- Parameters
-
| [in] | *cons | pointer to conserved vector work array. Size is \(N_{cons}\) |
| [in] | *prims | pointer to primitive vector work array. Size is \(N_{prims}\) |
| [in] | *aux | pointer to auxiliary vector work array. Size is \(N_{aux}\) |
| [out] | *source | pointer to source vector work array. Size is \(N_{cons}\) |
| i | optional cell number in x-direction |
| j | optional cell number in y-direction |
| k | optional cell number in z-direction |
- See also
- sourceTerm
Implements Model.
The documentation for this class was generated from the following file: