PLUTO
hll_speed.c File Reference

Compute the outermost wave speeds for HLL-based solvers. More...

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

Go to the source code of this file.

Functions

void HLL_Speed (double **vL, double **vR, double *a2L, double *a2R, double *hL, double *hR, double *SL, double *SR, int beg, int end)
 

Detailed Description

Compute the outermost wave speeds for HLL-based solvers.

HLL_Speed() computes an estimate to the leftmost and rightmost wave signal speeds bounding the Riemann fan based on the input states ::vR and ::vL. Depending on the estimate, several variants are possible.

Authors
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
June 6, 2013

Definition in file hll_speed.c.

Function Documentation

void HLL_Speed ( double **  vL,
double **  vR,
double *  a2L,
double *  a2R,
double *  hL,
double *  hR,
double *  SL,
double *  SR,
int  beg,
int  end 
)

Compute leftmost (SL) and rightmost (SR) speed for the Riemann fan.

Parameters
[in]vLleft state for the Riemann solver
[in]vRright state for the Riemann solver
[in]a2L1-D array containing the square of the sound speed for the left state
[in]a2R1-D array containing the square of the sound speed for the right state
[out]SLthe (estimated) leftmost speed of the Riemann fan
[out]SRthe (estimated) rightmost speed of the Riemann fan
[in]begstarting index of computation
[in]endfinal index of computation

Definition at line 18 of file hll_speed.c.

35 {
36  int i, err;
37  static real *sl_min, *sl_max;
38  static real *sr_min, *sr_max;
39 
40  if (sl_min == NULL){
41  sl_min = ARRAY_1D(NMAX_POINT, double);
42  sl_max = ARRAY_1D(NMAX_POINT, double);
43 
44  sr_min = ARRAY_1D(NMAX_POINT, double);
45  sr_max = ARRAY_1D(NMAX_POINT, double);
46  }
47 
48 /* ----------------------------------------------
49  DAVIS Estimate
50  ---------------------------------------------- */
51 
52  MaxSignalSpeed (vL, a2L, hL, sl_min, sl_max, beg, end);
53  MaxSignalSpeed (vR, a2R, hR, sr_min, sr_max, beg, end);
54 /*
55  err = MAX_CH_SPEED (vL, sl_min, sl_max, beg, end);
56  if (err != 0) return err;
57  err = MAX_CH_SPEED (vR, sr_min, sr_max, beg, end);
58  if (err != 0) return err;
59 */
60  for (i = beg; i <= end; i++) {
61  SL[i] = MIN(sl_min[i], sr_min[i]);
62  SR[i] = MAX(sl_max[i], sr_max[i]);
63  }
64 /* return 0; */
65 }
#define MAX(a, b)
Definition: macros.h:101
double real
Definition: pluto.h:488
#define MIN(a, b)
Definition: macros.h:104
#define ARRAY_1D(nx, type)
Definition: prototypes.h:170
long int NMAX_POINT
Maximum number of points among the three directions, boundaries excluded.
Definition: globals.h:62
int i
Definition: analysis.c:2
void MaxSignalSpeed(double **v, double *cs2, double *cmin, double *cmax, int beg, int end)
Definition: eigenv.c:34

Here is the call graph for this function: