PLUTO
4.4-patch2
|
Convert between primitive and conservative variables. More...
#include "pluto.h"
Functions | |
void | PrimToCons (double **uprim, double **ucons, int beg, int end) |
int | ConsToPrim (double **ucons, double **uprim, int beg, int end, uint16_t *flag) |
The PrimToCons() converts an array of primitive quantities to an array of conservative variables for the RRMHD equations.
The ConsToPrim() converts an array of conservative quantities to an array of primitive quantities. During the conversion, primitive quantities are recovered using the algorithm outlined in
int ConsToPrim | ( | double ** | ucons, |
double ** | uprim, | ||
int | beg, | ||
int | end, | ||
uint16_t * | flag | ||
) |
Convert from conservative to primitive variables.
[in] | ucons | array of conservative variables |
[out] | uprim | array of primitive variables |
[in] | beg | starting index of computation |
[in] | end | final index of computation |
[in,out] | flag | array of flags tagging, in input, zones where entropy must be used to recover pressure and, on output, zones where conversion was not successful. |
void PrimToCons | ( | double ** | uprim, |
double ** | ucons, | ||
int | beg, | ||
int | end | ||
) |
Convert primitive variables to conservative variables.
[in] | uprim | array of primitive variables |
[out] | ucons | array of conservative variables |
[in] | beg | starting index of computation |
[in] | end | final index of computation |