Lines Matching refs:j
190 PetscInt i, j, k, Mx, dof, xs, xm, len_slow; in FVRHSFunctionslow() local
212 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionslow()
215 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionslow()
228 for (j = 0; j < dof; j++) { in FVRHSFunctionslow()
230 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunctionslow()
231 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunctionslow()
233 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunctionslow()
234 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunctionslow()
241 for (j = 0; j < dof; j++) ctx->cslope[j] /= hx; /* rescale to a slope */ in FVRHSFunctionslow()
242 for (j = 0; j < dof; j++) { in FVRHSFunctionslow()
244 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunctionslow()
245 slope[i * dof + j] = tmp; in FVRHSFunctionslow()
256 for (j = 0; j < dof; j++) { in FVRHSFunctionslow()
257 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hx / 2; in FVRHSFunctionslow()
258 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionslow()
263 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hx; in FVRHSFunctionslow()
266 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hx; in FVRHSFunctionslow()
272 for (j = 0; j < dof; j++) { in FVRHSFunctionslow()
273 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hx / 2; in FVRHSFunctionslow()
274 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionslow()
279 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hx; in FVRHSFunctionslow()
295 PetscInt i, j, k, Mx, dof, xs, xm, len_slow; in FVRHSFunctionfast() local
317 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionfast()
320 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionfast()
331 for (j = 0; j < dof; j++) { in FVRHSFunctionfast()
333 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunctionfast()
334 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunctionfast()
336 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunctionfast()
337 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunctionfast()
344 for (j = 0; j < dof; j++) ctx->cslope[j] /= hx; /* rescale to a slope */ in FVRHSFunctionfast()
345 for (j = 0; j < dof; j++) { in FVRHSFunctionfast()
347 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunctionfast()
348 slope[i * dof + j] = tmp; in FVRHSFunctionfast()
359 for (j = 0; j < dof; j++) { in FVRHSFunctionfast()
360 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hx / 2; in FVRHSFunctionfast()
361 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionfast()
366 for (j = 0; j < dof; j++) f[(i - len_slow - 1) * dof + j] -= ctx->flux[j] / hx; in FVRHSFunctionfast()
369 for (j = 0; j < dof; j++) f[(i - len_slow) * dof + j] += ctx->flux[j] / hx; in FVRHSFunctionfast()
375 for (j = 0; j < dof; j++) { in FVRHSFunctionfast()
376 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hx / 2; in FVRHSFunctionfast()
377 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionfast()
382 for (j = 0; j < dof; j++) f[(i - len_slow) * dof + j] += ctx->flux[j] / hx; in FVRHSFunctionfast()
396 PetscInt i, j, k, Mx, dof, xs, xm, len_slow1, len_slow2; in FVRHSFunctionslow2() local
418 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionslow2()
421 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionslow2()
432 for (j = 0; j < dof; j++) { in FVRHSFunctionslow2()
434 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunctionslow2()
435 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunctionslow2()
437 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunctionslow2()
438 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunctionslow2()
445 for (j = 0; j < dof; j++) ctx->cslope[j] /= hx; /* rescale to a slope */ in FVRHSFunctionslow2()
446 for (j = 0; j < dof; j++) { in FVRHSFunctionslow2()
448 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunctionslow2()
449 slope[i * dof + j] = tmp; in FVRHSFunctionslow2()
460 for (j = 0; j < dof; j++) { in FVRHSFunctionslow2()
461 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hx / 2; in FVRHSFunctionslow2()
462 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionslow2()
467 for (j = 0; j < dof; j++) f[(i - len_slow1 - 1) * dof + j] -= ctx->flux[j] / hx; in FVRHSFunctionslow2()
470 for (j = 0; j < dof; j++) f[(i - len_slow1) * dof + j] += ctx->flux[j] / hx; in FVRHSFunctionslow2()
476 for (j = 0; j < dof; j++) { in FVRHSFunctionslow2()
477 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hx / 2; in FVRHSFunctionslow2()
478 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionslow2()
483 for (j = 0; j < dof; j++) f[(i - len_slow1 - 1) * dof + j] -= ctx->flux[j] / hx; in FVRHSFunctionslow2()
489 for (j = 0; j < dof; j++) { in FVRHSFunctionslow2()
490 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hx / 2; in FVRHSFunctionslow2()
491 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionslow2()
496 for (j = 0; j < dof; j++) f[(i - len_slow1) * dof + j] += ctx->flux[j] / hx; in FVRHSFunctionslow2()
511 PetscInt i, j, k, Mx, dof, xs, xm, len_slow1, len_slow2; in FVRHSFunctionfast2() local
534 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionfast2()
537 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionfast2()
548 for (j = 0; j < dof; j++) { in FVRHSFunctionfast2()
550 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunctionfast2()
551 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunctionfast2()
553 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunctionfast2()
554 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunctionfast2()
561 for (j = 0; j < dof; j++) ctx->cslope[j] /= hx; /* rescale to a slope */ in FVRHSFunctionfast2()
562 for (j = 0; j < dof; j++) { in FVRHSFunctionfast2()
564 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunctionfast2()
565 slope[i * dof + j] = tmp; in FVRHSFunctionfast2()
576 for (j = 0; j < dof; j++) { in FVRHSFunctionfast2()
577 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hx / 2; in FVRHSFunctionfast2()
578 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionfast2()
583 for (j = 0; j < dof; j++) f[(i - len_slow1 - len_slow2 - 1) * dof + j] -= ctx->flux[j] / hx; in FVRHSFunctionfast2()
586 for (j = 0; j < dof; j++) f[(i - len_slow1 - len_slow2) * dof + j] += ctx->flux[j] / hx; in FVRHSFunctionfast2()
592 for (j = 0; j < dof; j++) { in FVRHSFunctionfast2()
593 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hx / 2; in FVRHSFunctionfast2()
594 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hx / 2; in FVRHSFunctionfast2()
599 for (j = 0; j < dof; j++) f[(i - len_slow1 - len_slow2) * dof + j] += ctx->flux[j] / hx; in FVRHSFunctionfast2()