PLUTO  4.0
 All Data Structures Files Functions Variables Enumerations Macros Pages
Functions
states_plm.c File Reference

Compute states using piece-wise linear interpolation. More...

#include "pluto.h"

Functions

void States (const State_1D *state, int beg, int end, Grid *grid)
 

Detailed Description

Provide piece-wise linear reconstruction inside each cell using primitive or characteristic variables. Note that vL and vR are left and right states with respect to the interface, while vm and vp refer to the cell center:

                    vL(i)-> <-vR(i)
     |----------*----------|----------*----------|
      <-vm(i)  (i)  vp(i)->         (i+1)

The default setting (LIMITER == DEFAULT) applies a different limiter to each variable:

Otherwise the same limiter can be imposed to all variables from definitions.h. Slope limiters are function of left, right and centered slopes, limiter=f(dp, dc, dm).

In non-cartesian geometries, function values are defined on the geometrical centers thus giving an effective non-uniform grid spacing even if zones are equidistant. This is implemented, at the moment, only for cylindrical geometry. In this case, limiters use the divided difference and an extra monotonicity constraint is added just before constructing the states. Assuming a monotonically increasing sequence of values,

\[ \left\{\begin{array}{lcl} V_{i,+} &=& V_i + \Delta V_i \delta f_{i,R} \le V_{i+1} \\ \noalign{\medskip} V_{i,-} &=& V_i + \Delta V_i \delta f_{i,L} \ge V_{i-1} \end{array}\right. \quad\Longrightarrow\quad \Delta V_i < \min\left(\frac{V_{i+1} - V_i}{\delta f_{i,R}},\, \frac{V_i - V_{i-1}}{-\delta f_{i,L}},\,\right) \]

In the general case, $\Delta V = {\rm MINMOD}\left[\Delta V, {\rm ABS\_MIN}\left(\frac{V_{i+1} - V_i}{\delta f_{i,R}},\, \frac{V_i - V_{i-1}}{-\delta f_{i,L}},\,\right)\right]$.

A stencil of 3 zones is required for all limiters except for the FOURTH_ORDER_LIM which requires 5 zones.

Author
A. Mignone (migno.nosp@m.ne@p.nosp@m.h.uni.nosp@m.to.i.nosp@m.t)
Date
Sep 27, 2012

Function Documentation

void States ( const State_1D state,
int  beg,
int  end,
Grid grid 
)

Compute states using piecewise linear interpolation.

Parameters
[in]statepointer to a State_1D structure
[in]begstarting point where vp and vm must be computed
[in]endfinal point where vp and vm must be computed
[in]gridpointer to array of Grid structures
Returns
This function has no return value.