PLUTO
fluxes.c
Go to the documentation of this file.
1 /* ///////////////////////////////////////////////////////////////////// */
2 /*!
3  \file
4  \brief Compute the flux for the relativistic hydro (RHD) equations.
5 
6  Compute the flux of the conservative RHD equations in the direction
7  given by ::g_dir.
8  This function defines the component of the hyperbolic flux tensor
9  of the standard RHD equations.\n
10  In what follows:
11  - \c VXn, \c MXn are the velocity, momentum components in the direction
12  given by ::g_dir (normal, \c "n")
13  - \c VXt, \c MXt and \c VXb, \c MXb are the transverse components
14  (tangent \c "t" and bi-tangent \c "b").
15 
16  \author A. Mignone (mignone@ph.unito.it)
17  \date July 5, 2015
18 */
19 /* ///////////////////////////////////////////////////////////////////// */
20 #include "pluto.h"
21 
22 /* ********************************************************************* */
23 void Flux (double **u, double **v, double *a2, double **fx,
24  double *p, int beg, int end)
25 /*
26  *
27  *
28  *
29  *********************************************************************** */
30 {
31  int nv, i;
32  double vn;
33 
34  for (i = beg ; i <= end; i++) {
35  vn = v[i][VXn];
36 
37  fx[i][RHO] = u[i][RHO]*vn;
38  EXPAND(fx[i][MX1] = u[i][MX1]*vn; ,
39  fx[i][MX2] = u[i][MX2]*vn; ,
40  fx[i][MX3] = u[i][MX3]*vn;)
41  fx[i][ENG] = u[i][MXn];
42  p[i] = v[i][PRS];
43  }
44 }
#define MX3
Definition: mod_defs.h:22
#define MX1
Definition: mod_defs.h:20
void Flux(double **u, double **w, double *a2, double **fx, double *p, int beg, int end)
Definition: fluxes.c:23
#define RHO
Definition: mod_defs.h:19
double v[NVAR]
Definition: eos.h:106
#define MX2
Definition: mod_defs.h:21
int MXn
Definition: globals.h:74
int VXn
Definition: globals.h:73
PLUTO main header file.
int i
Definition: analysis.c:2