PLUTO
fluxes.c File Reference

Compute the flux for the relativistic hydro (RHD) equations. More...

#include "pluto.h"
Include dependency graph for fluxes.c:

Go to the source code of this file.

Functions

void Flux (double **u, double **v, double *a2, double **fx, double *p, int beg, int end)
 

Detailed Description

Compute the flux for the relativistic hydro (RHD) equations.

Compute the flux of the conservative RHD equations in the direction given by g_dir. This function defines the component of the hyperbolic flux tensor of the standard RHD equations.
In what follows:

  • VXn, MXn are the velocity, momentum components in the direction given by g_dir (normal, "n")
  • VXt, MXt and VXb, MXb are the transverse components (tangent "t" and bi-tangent "b").
Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
July 5, 2015

Definition in file fluxes.c.

Function Documentation

void Flux ( double **  u,
double **  v,
double *  a2,
double **  fx,
double *  p,
int  beg,
int  end 
)
Parameters
[in]u1D array of conserved quantities
[in]w1D array of primitive quantities
[in]a21D array of sound speeds
[out]fx1D array of fluxes (total pressure excluded)
[out]p1D array of pressure values
[in]beginitial index of computation
[in]endfinal index of computation
Returns
This function has no return value.

Definition at line 23 of file fluxes.c.

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
#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
int i
Definition: analysis.c:2