Lines Matching refs:j
172 PetscInt i, j, Mx, dof, xs, xm, sf = ctx->sf, fs = ctx->fs; in FVRHSFunction() local
194 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunction()
197 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunction()
208 for (j = 0; j < dof; j++) { in FVRHSFunction()
209 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunction()
210 min[j] = PetscMin(r[j], 2.0); in FVRHSFunction()
211 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunction()
216 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunction()
219 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hs; in FVRHSFunction()
225 for (j = 0; j < dof; j++) { in FVRHSFunction()
226 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunction()
227 min[j] = PetscMin(r[j], 2.0); in FVRHSFunction()
228 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunction()
232 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunction()
235 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hf; in FVRHSFunction()
241 for (j = 0; j < dof; j++) { in FVRHSFunction()
242 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunction()
243 min[j] = PetscMin(r[j], 2.0); in FVRHSFunction()
244 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunction()
248 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunction()
251 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hf; in FVRHSFunction()
257 for (j = 0; j < dof; j++) { in FVRHSFunction()
258 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunction()
259 min[j] = PetscMin(r[j], 2.0); in FVRHSFunction()
260 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunction()
264 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunction()
267 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hf; in FVRHSFunction()
273 for (j = 0; j < dof; j++) { in FVRHSFunction()
274 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunction()
275 min[j] = PetscMin(r[j], 2.0); in FVRHSFunction()
276 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunction()
280 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunction()
283 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hs; in FVRHSFunction()
289 for (j = 0; j < dof; j++) { in FVRHSFunction()
290 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunction()
291 min[j] = PetscMin(r[j], 2.0); in FVRHSFunction()
292 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunction()
296 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunction()
299 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hs; in FVRHSFunction()
321 PetscInt i, j, Mx, dof, xs, xm, islow = 0, sf = ctx->sf, fs = ctx->fs; in FVRHSFunctionslow() local
343 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionslow()
346 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionslow()
357 for (j = 0; j < dof; j++) { in FVRHSFunctionslow()
358 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunctionslow()
359 min[j] = PetscMin(r[j], 2.0); in FVRHSFunctionslow()
360 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunctionslow()
364 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunctionslow()
367 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hs; in FVRHSFunctionslow()
374 for (j = 0; j < dof; j++) { in FVRHSFunctionslow()
375 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunctionslow()
376 min[j] = PetscMin(r[j], 2.0); in FVRHSFunctionslow()
377 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunctionslow()
381 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunctionslow()
387 for (j = 0; j < dof; j++) { in FVRHSFunctionslow()
388 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunctionslow()
389 min[j] = PetscMin(r[j], 2.0); in FVRHSFunctionslow()
390 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunctionslow()
394 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hs; in FVRHSFunctionslow()
401 for (j = 0; j < dof; j++) { in FVRHSFunctionslow()
402 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunctionslow()
403 min[j] = PetscMin(r[j], 2.0); in FVRHSFunctionslow()
404 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunctionslow()
408 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunctionslow()
411 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hs; in FVRHSFunctionslow()
418 for (j = 0; j < dof; j++) { in FVRHSFunctionslow()
419 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunctionslow()
420 min[j] = PetscMin(r[j], 2.0); in FVRHSFunctionslow()
421 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunctionslow()
425 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hs; in FVRHSFunctionslow()
428 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hs; in FVRHSFunctionslow()
443 PetscInt i, j, Mx, dof, xs, xm, ifast = 0, sf = ctx->sf, fs = ctx->fs; in FVRHSFunctionfast() local
465 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionfast()
468 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionfast()
479 for (j = 0; j < dof; j++) { in FVRHSFunctionfast()
480 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunctionfast()
481 min[j] = PetscMin(r[j], 2.0); in FVRHSFunctionfast()
482 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunctionfast()
486 for (j = 0; j < dof; j++) f[ifast * dof + j] += ctx->flux[j] / hf; in FVRHSFunctionfast()
493 for (j = 0; j < dof; j++) { in FVRHSFunctionfast()
494 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunctionfast()
495 min[j] = PetscMin(r[j], 2.0); in FVRHSFunctionfast()
496 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunctionfast()
500 for (j = 0; j < dof; j++) f[(ifast - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunctionfast()
503 for (j = 0; j < dof; j++) f[ifast * dof + j] += ctx->flux[j] / hf; in FVRHSFunctionfast()
510 for (j = 0; j < dof; j++) { in FVRHSFunctionfast()
511 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunctionfast()
512 min[j] = PetscMin(r[j], 2.0); in FVRHSFunctionfast()
513 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunctionfast()
517 for (j = 0; j < dof; j++) f[(ifast - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunctionfast()
520 for (j = 0; j < dof; j++) f[ifast * dof + j] += ctx->flux[j] / hf; in FVRHSFunctionfast()
527 for (j = 0; j < dof; j++) { in FVRHSFunctionfast()
528 … r[j] = (x[i * dof + j] - x[(i - 1) * dof + j]) / (x[(i - 1) * dof + j] - x[(i - 2) * dof + j]); in FVRHSFunctionfast()
529 min[j] = PetscMin(r[j], 2.0); in FVRHSFunctionfast()
530 …u[j] = x[(i - 1) * dof + j] + PetscMax(0, PetscMin(min[j], alpha[0] + gamma[0] * r[j])) * (x[(i … in FVRHSFunctionfast()
534 for (j = 0; j < dof; j++) f[(ifast - 1) * dof + j] -= ctx->flux[j] / hf; in FVRHSFunctionfast()
550 PetscInt i, j, k, dof, xs, xm, Mx, count_slow, count_fast; in FVSample() local
568 for (j = 0; j < N + 1; j++) { in FVSample()
569 xj = xi + hs * (j - N / 2) / (PetscReal)N; in FVSample()
571 for (k = 0; k < dof; k++) u[i * dof + k] += ((j == 0 || j == N) ? 0.5 : 1.0) * uj[k] / N; in FVSample()
577 for (j = 0; j < N + 1; j++) { in FVSample()
578 xj = xi + hf * (j - N / 2) / (PetscReal)N; in FVSample()
580 for (k = 0; k < dof; k++) u[i * dof + k] += ((j == 0 || j == N) ? 0.5 : 1.0) * uj[k] / N; in FVSample()
586 for (j = 0; j < N + 1; j++) { in FVSample()
587 xj = xi + hs * (j - N / 2) / (PetscReal)N; in FVSample()
589 for (k = 0; k < dof; k++) u[i * dof + k] += ((j == 0 || j == N) ? 0.5 : 1.0) * uj[k] / N; in FVSample()
603 PetscInt imin, imax, Mx, i, j, xs, xm, dof; in SolutionStatsView() local
619 for (j = 0; j < dof; j++) tvsum += PetscAbsScalar(x[i * dof + j] - x[(i - 1) * dof + j]); in SolutionStatsView()