PLUTO
vel_limiter.c File Reference

Velocity limiter for relativistic hydro or MHD. More...

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

Go to the source code of this file.

Functions

void VelocityLimiter (double *v, double *vp, double *vm)
 

Detailed Description

Velocity limiter for relativistic hydro or MHD.

Flatten reconstruction when either the left or right reconstructed velocity values exceeds one.

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

Definition in file vel_limiter.c.

Function Documentation

void VelocityLimiter ( double *  v,
double *  vp,
double *  vm 
)

Check whether the total reconstructed velocity is > 1 If a superluminal value occurs, flatten distribution.

Definition at line 16 of file vel_limiter.c.

22 {
23 #if RECONSTRUCT_4VEL == NO && COMPONENTS > 1
24  int nv;
25  double v2m, v2p;
26 
27  v2m = EXPAND(vm[VX1]*vm[VX1], + vm[VX2]*vm[VX2], + vm[VX3]*vm[VX3]);
28  v2p = EXPAND(vp[VX1]*vp[VX1], + vp[VX2]*vp[VX2], + vp[VX3]*vp[VX3]);
29  if (v2m >= 1.0 || v2p >= 1.0){
30  for (nv = NVAR; nv--; ) vm[nv] = vp[nv] = v[nv];
31  }
32 #endif
33 }
#define VX2
Definition: mod_defs.h:29
#define VX1
Definition: mod_defs.h:28
#define VX3
Definition: mod_defs.h:30
#define NVAR
Definition: pluto.h:609

Here is the caller graph for this function: