PLUTO
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
}
MX3
#define MX3
Definition:
mod_defs.h:22
MX1
#define MX1
Definition:
mod_defs.h:20
Flux
void Flux(double **u, double **w, double *a2, double **fx, double *p, int beg, int end)
Definition:
fluxes.c:23
RHO
#define RHO
Definition:
mod_defs.h:19
func_param::v
double v[NVAR]
Definition:
eos.h:106
MX2
#define MX2
Definition:
mod_defs.h:21
MXn
int MXn
Definition:
globals.h:74
VXn
int VXn
Definition:
globals.h:73
pluto.h
PLUTO main header file.
i
int i
Definition:
analysis.c:2
Src
RHD
fluxes.c
Generated by
1.8.10