|
| | Model () |
| |
| | Model (Data *data) |
| |
| virtual | ~Model () |
| |
| virtual void | sourceTermSingleCell (double *cons, double *prims, double *aux, double *source, int i=-1, int j=-1, int k=-1)=0 |
| |
| virtual void | sourceTerm (double *cons, double *prims, double *aux, double *source)=0 |
| |
| virtual void | getPrimitiveVarsSingleCell (double *cons, double *prims, double *aux, int i=-1, int j=-1, int k=-1)=0 |
| |
| virtual void | getPrimitiveVars (double *cons, double *prims, double *aux)=0 |
| |
| virtual void | primsToAll (double *cons, double *prims, double *aux)=0 |
| |
| virtual void | fluxVector (double *cons, double *prims, double *aux, double *f, int dir)=0 |
| |
| virtual void | finalise (double *cons, double *prims, double *aux) |
| |
Physics model that we want to use
- We're using an abstract base class to form the foundations of the models preparing for additional set ups. Systems will derive from Model and supply their own primitive recoveries for cons2prims, prims2cons functions and the flux vectors. Constructors must require access to public Simulation data.
Definition at line 15 of file model.h.
| virtual void Model::fluxVector |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux, |
|
|
double * |
f, |
|
|
int |
dir |
|
) |
| |
|
pure 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) |
Implemented in Hybrid, SRMHD, TwoFluidEMHD, SRRMHD, and Euler.
| virtual void Model::getPrimitiveVars |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux |
|
) |
| |
|
pure 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\) |
Implemented in Hybrid, SRMHD, TwoFluidEMHD, SRRMHD, and Euler.
| virtual void Model::getPrimitiveVarsSingleCell |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux, |
|
|
int |
i = -1, |
|
|
int |
j = -1, |
|
|
int |
k = -1 |
|
) |
| |
|
pure 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
Implemented in Hybrid, SRMHD, TwoFluidEMHD, SRRMHD, and Euler.
| virtual void Model::primsToAll |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux |
|
) |
| |
|
pure 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\) |
Implemented in Hybrid, SRMHD, TwoFluidEMHD, SRRMHD, and Euler.
| virtual void Model::sourceTerm |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux, |
|
|
double * |
source |
|
) |
| |
|
pure 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
Implemented in Hybrid, SRMHD, TwoFluidEMHD, SRRMHD, and Euler.
| virtual void Model::sourceTermSingleCell |
( |
double * |
cons, |
|
|
double * |
prims, |
|
|
double * |
aux, |
|
|
double * |
source, |
|
|
int |
i = -1, |
|
|
int |
j = -1, |
|
|
int |
k = -1 |
|
) |
| |
|
pure 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
Implemented in Hybrid, SRMHD, TwoFluidEMHD, SRRMHD, and Euler.