PLUTO
glm.h
Go to the documentation of this file.
1 /* ///////////////////////////////////////////////////////////////////// */
2 /*!
3  \file
4  \brief Header file for GLM Divergence Cleaning
5 
6  Contains function prototypes and global variable declaration
7  for the GLM formulation to control the divergence-free condition
8  of magnetic field.
9 
10  \authors A. Mignone (mignone@ph.unito.it)\n
11  P. Tzeferacos (petros.tzeferacos@ph.unito.it)
12  \date July 24, 2015
13 
14  \b References
15  - "A Second-order unsplit Godunov scheme for cell-centered MHD:
16  The CTU-GLM scheme"\n
17  Mignone \& Tzeferacos, JCP (2010) 229, 2117
18 
19  - "High-order conservative finite difference GLM-MHD scheme for
20  cell-centered MHD"\n
21  Mignone, Tzeferacos \& Bodo, JCP (2010) 229, 5896
22 
23 */
24 /* ///////////////////////////////////////////////////////////////////// */
25 #define GLM_MHD
26 
27 #ifndef GLM_ALPHA
28  #define GLM_ALPHA 0.1 /**< Sets the damping rate of monopoles. */
29 #endif
30 
31 #ifndef GLM_EXTENDED
32  #define GLM_EXTENDED NO /**< The GLM_EXTENDED macro may be turned to YES to enable
33  the extended GLM formalism.
34  Although it breaks conservation of momentum and
35  energy, it has proven to be more robust in treating
36  low-beta plasma. */
37 #endif
38 
39 
40 #define COMPUTE_DIVB NO
41 
42 /* with chombo, COMPUTE_DIVB must be
43  disabled or a segfault will occur */
44 
45 #ifdef CHOMBO
46  #undef COMPUTE_DIVB
47  #define COMPUTE_DIVB NO
48 #endif
49 
50 extern double glm_ch; /**< The propagation speed of divergence error. */
51 
52 void GLM_Solve (const State_1D *, double **, double **, int, int, Grid *);
53 void GLM_SolveNEW (const State_1D *state, int beg, int end, Grid *grid);
54 void GLM_Init (const Data *, const Time_Step *, Grid *);
55 void GLM_Source (const Data_Arr, double, Grid *);
56 void GLM_ExtendedSource (const State_1D *, double, int, int, Grid *);
57 
58 #if COMPUTE_DIVB == YES
59  void GLM_ComputeDivB(const State_1D *state, Grid *grid);
60  double ***GLM_GetDivB(void);
61 #endif
62 
void GLM_ExtendedSource(const State_1D *, double, int, int, Grid *)
Definition: glm.c:168
double **** Data_Arr
Definition: pluto.h:492
void GLM_Init(const Data *, const Time_Step *, Grid *)
Definition: glm.c:324
void GLM_ComputeDivB(const State_1D *state, Grid *grid)
Definition: glm.c:411
double *** GLM_GetDivB(void)
Definition: glm.c:445
Definition: structs.h:78
void GLM_Solve(const State_1D *, double **, double **, int, int, Grid *)
Definition: glm.c:24
void GLM_SolveNEW(const State_1D *state, int beg, int end, Grid *grid)
double glm_ch
The propagation speed of divergence error.
Definition: glm.c:21
Definition: structs.h:30
void GLM_Source(const Data_Arr, double, Grid *)
Definition: glm.c:139