21 int nSten = coeffs.
NSten(group);
22 double pValSten[nSten];
24 for (
int s=0; s<nSten; s++) {
25 int i = coeffs.
Lo(group, s) - coeffs.
LoGroup(group);
27 SmoothInd(&vals[i], coeffs, group, s, siSten[s]);
30 double nlWeights[nSten];
31 double nlWeightsSum = 0;
32 for (
int s=0; s<nSten; s++) {
33 nlWeights[s] = coeffs.
LinWeight(group, s)/std::pow(coeffs.
epsW + siSten[s], coeffs.
pW);
34 nlWeightsSum += nlWeights[s];
38 for (
int s=0; s<nSten; s++) {
39 pVal += nlWeights[s]*pValSten[s]/nlWeightsSum;
54 int lo = coeffs.
Lo(group, sten);
72 int lo = coeffs.
Lo(group, sten);
89 void Project(
int n,
int m,
double T[],
double vals[],
double res[]) {
100 for (
int i=0; i<n; i++) {
101 for (
int j=0; j<m; j++) {
102 int rIndex = i*m + j;
104 for (
int k=0; k<n; k++) {
105 int tIndex = i + k*n;
106 int vIndex = k*m + j;
107 res[rIndex] += T[tIndex]*vals[vIndex];
122 for (
int i=0; i<n; i++) {
124 eta = std::max(eta, std::abs(lambdaR[diag] - lambdaL[diag]));
int * stencilSizes
The number of weights for each stencil.
void ReconstPointVal(double vals[], CoeffsWENO &coeffs, int group, double &pVal)
double EntropyFixEta(int n, double lambdaL[], double lambdaR[])
int * stencilStarts
The starting index into the stencilWeight and stencilOffset arrays for each stencil.
int * stencilOffsets
The offsets wrt the grid point at which the stencil is being applied.
StencilSet SmIndSecond(int group)
void ReconstPointValSten(double vals[], CoeffsWENO &coeffs, int group, int sten, double &pVal)
StencilSet SmIndFirst(int group)
void Project(int n, int m, double T[], double vals[], double res[])
Encapsulation for a collection of operator stencils.
int Lo(int group, int sten)
StencilSet Reconst(int group)
double * stencilWeights
The stencil weights.
void SmoothInd(double vals[], CoeffsWENO &coeffs, int group, int sten, double &si)
double LinWeight(int group, int sten)