PLUTO
var_names.c File Reference
#include "pluto.h"
Include dependency graph for var_names.c:

Go to the source code of this file.

Functions

void SetDefaultVarNames (Output *output)
 

Function Documentation

void SetDefaultVarNames ( Output output)

Definition at line 4 of file var_names.c.

13 {
14  int nv;
15 
16 /* ----------------------------------------------
17  Physics module file names;
18  these pertain to the physics module ONLY
19  ---------------------------------------------- */
20 
21  output->var_name[RHO] = "rho";
22  EXPAND(output->var_name[VX1] = "vx1"; ,
23  output->var_name[VX2] = "vx2"; ,
24  output->var_name[VX3] = "vx3";)
25 #if HAVE_ENERGY
26  output->var_name[PRS] = "prs";
27 #endif
28 
29 #if PHYSICS == MHD || PHYSICS == RMHD
30  EXPAND(output->var_name[BX1] = "bx1"; ,
31  output->var_name[BX2] = "bx2"; ,
32  output->var_name[BX3] = "bx3";)
33 #endif
34 
35  /* (staggered field names are set in SetOutput) */
36 
37 #ifdef GLM_MHD
38  output->var_name[PSI_GLM] = "psi_glm";
39 #endif
40 
41 /* ------------------------------------------------
42  Dust
43  ------------------------------------------------ */
44 
45 #if DUST == YES
46  output->var_name[RHO_D] = "rho_d";
47  EXPAND(output->var_name[VX1_D] = "vx1_d"; ,
48  output->var_name[VX2_D] = "vx2_d"; ,
49  output->var_name[VX3_D] = "vx3_d";)
50 #endif
51 
52 /* ------------------------------------------------
53  Tracers
54  ------------------------------------------------ */
55 
56  NTRACER_LOOP(nv) sprintf (output->var_name[nv],"tr%d",nv - TRC + 1);
57 
58  #if ENTROPY_SWITCH
59  sprintf (output->var_name[ENTR],"entropy");
60  #endif
61 
62 /* ------------------------------------------------
63  Cooling vars
64  ------------------------------------------------ */
65 
66 #if COOLING == MINEq
67  {
68  static char *ion_name[] = {"X_HI", "X_HeI", "X_HeII"
69  C_EXPAND("X_CI","X_CII", "X_CIII", "X_CIV", "X_CV")
70  N_EXPAND("X_NI","X_NII", "X_NIII", "X_NIV", "X_NV")
71  O_EXPAND("X_OI","X_OII", "X_OIII", "X_OIV", "X_OV")
72  Ne_EXPAND("X_NeI","X_NeII", "X_NeIII", "X_NeIV", "X_NeV")
73  S_EXPAND("X_SI","X_SI I", "X_SIII", "X_SIV", "X_SV")
74  Fe_EXPAND("X_FeI", "X_FeII", "X_FeIII")};
75 
76  NIONS_LOOP(nv) output->var_name[nv] = ion_name[nv-NFLX];
77  }
78 #elif COOLING == SNEq
79 
80  output->var_name[X_HI] = "X_HI";
81 
82 #elif COOLING == H2_COOL
83  {
84  static char *molnames[] = {"X_HI", "X_H2", "X_HII"};
85  NIONS_LOOP(nv) output->var_name[nv] = molnames[nv-NFLX];
86  }
87 
88 #endif
89 
90 }
#define NIONS_LOOP(n)
Definition: pluto.h:614
#define VX2
Definition: mod_defs.h:29
#define RHO
Definition: mod_defs.h:19
#define PSI_GLM
Definition: mod_defs.h:34
#define NTRACER_LOOP(n)
Definition: pluto.h:615
#define TRC
Definition: pluto.h:581
#define S_EXPAND(a, b, c, d, e)
Definition: cooling.h:83
#define VX1
Definition: mod_defs.h:28
#define N_EXPAND(a, b, c, d, e)
Definition: cooling.h:41
#define NFLX
Definition: mod_defs.h:32
#define C_EXPAND(a, b, c, d, e)
Definition: cooling.h:27
Definition: cooling.h:110
#define BX3
Definition: mod_defs.h:27
#define O_EXPAND(a, b, c, d, e)
Definition: cooling.h:55
#define BX1
Definition: mod_defs.h:25
#define VX3
Definition: mod_defs.h:30
#define BX2
Definition: mod_defs.h:26
#define Fe_EXPAND(a, b, c)
Definition: cooling.h:91
char ** var_name
variable names - same for all
Definition: structs.h:242

Here is the caller graph for this function: