PLUTO  4.4-patch2
mod_defs.h
Go to the documentation of this file.
1 /* ///////////////////////////////////////////////////////////////////// */
11 /* ///////////////////////////////////////////////////////////////////// */
12 
13 #if RADIATION
15 #endif
16 
17 /* *********************************************************
18  Set flow variable indices.
19  Extra vector components, when not needed, point to the
20  last element (255) of the array stored by startup.c.
21  ********************************************************* */
22 
23 #define RHO 0
24 #define MX1 1
25 #define MX2 2
26 #define MX3 3
27 #if HAVE_ENERGY
28  #define ENG 4
29  #define PRS ENG
30 #endif
31 
32 #define VX1 MX1
33 #define VX2 MX2
34 #define VX3 MX3
35 
36 #if RADIATION
37  #define ENR (4 + HAVE_ENERGY)
38  #define FR1 (ENR + 1)
39  #define FR2 (ENR + 2)
40  #define FR3 (ENR + 3)
41  #define NFLX (8 + HAVE_ENERGY)
42 #else
43  #define NFLX (4 + HAVE_ENERGY)
44 #endif
45 
46 /* *************************************************
47  Now define more convenient and user-friendly
48  pointer labels for geometry setting
49  ************************************************* */
50 
51 #if GEOMETRY == CYLINDRICAL
52 
53  #define iVR VX1
54  #define iVZ VX2
55  #define iVPHI VX3
56 
57  #define iMR MX1
58  #define iMZ MX2
59  #define iMPHI MX3
60 
61 #endif
62 
63 #if GEOMETRY == POLAR
64 
65  #define iVR VX1
66  #define iVPHI VX2
67  #define iVZ VX3
68 
69  #define iMR MX1
70  #define iMPHI MX2
71  #define iMZ MX3
72 
73 #endif
74 
75 #if GEOMETRY == SPHERICAL
76 
77  #define iVR VX1
78  #define iVTH VX2
79  #define iVPHI VX3
80 
81  #define iMR MX1
82  #define iMTH MX2
83  #define iMPHI MX3
84 
85 #endif
86 
87 
88 /* ********************************************************************* */
98 typedef struct Map_param_{
99  double D;
100  double sigma_c;
101  double E;
102  double m2;
104  double rho;
105  double W;
106  double lor;
107  double prs;
108 } Map_param;
109 
110 /* -----------------------------------------------------
111  Function prototype
112  ----------------------------------------------------- */
113 
114 int ConsToPrim (double **, double **, int, int, uint16_t *);
115 void ConvertTo4vel (double **, int, int);
116 void ConvertTo3vel (double **, int, int);
117 
118 void Flux (const State *, int, int);
119 void HLL_Speed (const State *, const State *, double *, double *, int, int);
120 void MaxSignalSpeed (const State *, double *, double *, int, int);
121 void PrimEigenvectors(const State *, int, int);
122 void PrimToCons (double **, double **, int, int);
123 void PrimRHS (double *, double *, double, double, double *);
124 void PrimSource (const State *, double **, int, int, Grid *);
125 
126 Riemann_Solver TwoShock_Solver, LF_Solver, HLL_Solver, HLLC_Solver;
127 
128 int RHD_EnergySolve (double *, double *);
129 int RHD_EntropySolve (double *, double *);
130 int RHD_PressureFix (double *, double *);
131 
132 void VelocityLimiter(double *, double *, double *);
void VelocityLimiter(double *, double *, double *)
Definition: vel_limiter.c:16
void MaxSignalSpeed(const State *, double *, double *, int, int)
Definition: eigenv.c:34
int ConsToPrim(double **, double **, int, int, uint16_t *)
Definition: mappers.c:88
int RHD_PressureFix(double *, double *)
Definition: rhd_pressure_fix.c:28
Header file for the radiation module.
void PrimToCons(double **, double **, int, int)
Definition: mappers.c:26
Definition: structs.h:124
void Flux(const State *, int, int)
Definition: fluxes.c:23
void HLL_Speed(const State *, const State *, double *, double *, int, int)
Definition: hll_speed.c:24
int RHD_EntropySolve(double *, double *)
Definition: rhd_entropy_solve.c:21
Definition: mod_defs.h:101
void TwoShock_Solver(const Sweep *sweep, int beg, int end, double *cmax, Grid *grid)
Definition: two_shock.c:45
void PrimEigenvectors(const State *, int, int)
Definition: eigenv.c:92
Definition: structs.h:261
int RHD_EnergySolve(double *, double *)
Definition: rhd_energy_solve.c:25
void PrimRHS(double *, double *, double, double, double *)
Definition: prim_eqn.c:30
void PrimSource(const State *, double **, int, int, Grid *)
Definition: prim_eqn.c:124