8#include "../include/var_struc.h"
9#include "../include/tools.h"
31void minmod_limiter(
const _Bool NO_h,
const int m,
const _Bool i_f_var_get,
double s[],
32 const double U[],
const double UL,
const double UR,
const double HL, ...)
36 double const alpha =
config[41];
38 double h = HL, HR, * X;
41 HR = va_arg(ap,
double);
42 X = va_arg(ap,
double *);
45#pragma acc parallel loop private(s_L, s_R, h)
47 for(
int j = 0; j < m; ++j)
56 h = 0.5 * (X[j+1] - X[j-1]);
57 s_L = (U[j] - U[j-1]) / h;
62 h = 0.5 * (X[j+1] - X[j] + HL);
63 s_L = (U[j] - UL) / h;
68 h = 0.5 * (X[j+2] - X[j]);
69 s_R = (U[j+1] - U[j]) / h;
74 h = 0.5 * (X[j+1] - X[j] + HR);
75 s_R = (UR - U[j]) / h;
78 s[j] =
minmod3(alpha*s_L, alpha*s_R, s[j]);
double config[N_CONF]
Initial configuration data array.
void minmod_limiter(const _Bool NO_h, const int m, const _Bool i_f_var_get, double s[], const double U[], const double UL, const double UR, const double HL,...)
This function apply the minmod limiter to the slope in one dimension.