Lines Matching refs:j
126 PetscInt i, j, k, dof, xs, xm, Mx; in FVSample_3WaySplit() local
145 for (j = 0; j < N + 1; j++) { in FVSample_3WaySplit()
146 xj = xi + hs * (j - N / 2) / (PetscReal)N; in FVSample_3WaySplit()
148 for (k = 0; k < dof; k++) u[i * dof + k] += ((j == 0 || j == N) ? 0.5 : 1.0) * uj[k] / N; in FVSample_3WaySplit()
154 for (j = 0; j < N + 1; j++) { in FVSample_3WaySplit()
155 xj = xi + hm * (j - N / 2) / (PetscReal)N; in FVSample_3WaySplit()
157 for (k = 0; k < dof; k++) u[i * dof + k] += ((j == 0 || j == N) ? 0.5 : 1.0) * uj[k] / N; in FVSample_3WaySplit()
163 for (j = 0; j < N + 1; j++) { in FVSample_3WaySplit()
164 xj = xi + hf * (j - N / 2) / (PetscReal)N; in FVSample_3WaySplit()
166 for (k = 0; k < dof; k++) u[i * dof + k] += ((j == 0 || j == N) ? 0.5 : 1.0) * uj[k] / N; in FVSample_3WaySplit()
172 for (j = 0; j < N + 1; j++) { in FVSample_3WaySplit()
173 xj = xi + hm * (j - N / 2) / (PetscReal)N; in FVSample_3WaySplit()
175 for (k = 0; k < dof; k++) u[i * dof + k] += ((j == 0 || j == N) ? 0.5 : 1.0) * uj[k] / N; in FVSample_3WaySplit()
181 for (j = 0; j < N + 1; j++) { in FVSample_3WaySplit()
182 xj = xi + hs * (j - N / 2) / (PetscReal)N; in FVSample_3WaySplit()
184 for (k = 0; k < dof; k++) u[i * dof + k] += ((j == 0 || j == N) ? 0.5 : 1.0) * uj[k] / N; in FVSample_3WaySplit()
223 PetscInt i, j, k, Mx, dof, xs, xm, sm = ctx->sm, mf = ctx->mf, fm = ctx->fm, ms = ctx->ms; in FVRHSFunction_3WaySplit() local
249 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunction_3WaySplit()
252 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunction_3WaySplit()
264 for (j = 0; j < dof; j++) { in FVRHSFunction_3WaySplit()
266 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunction_3WaySplit()
267 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunction_3WaySplit()
269 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunction_3WaySplit()
270 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunction_3WaySplit()
279 for (j = 0; j < dof; j++) { in FVRHSFunction_3WaySplit()
281 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunction_3WaySplit()
282 slope[i * dof + j] = tmp; in FVRHSFunction_3WaySplit()
292 for (j = 0; j < dof; j++) { in FVRHSFunction_3WaySplit()
293 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunction_3WaySplit()
294 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunction_3WaySplit()
298 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunction_3WaySplit()
301 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxs; in FVRHSFunction_3WaySplit()
304 for (j = 0; j < dof; j++) { in FVRHSFunction_3WaySplit()
305 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunction_3WaySplit()
306 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunction_3WaySplit()
310 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunction_3WaySplit()
313 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxm; in FVRHSFunction_3WaySplit()
316 for (j = 0; j < dof; j++) { in FVRHSFunction_3WaySplit()
317 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunction_3WaySplit()
318 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunction_3WaySplit()
322 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunction_3WaySplit()
325 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxs; in FVRHSFunction_3WaySplit()
328 for (j = 0; j < dof; j++) { in FVRHSFunction_3WaySplit()
329 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunction_3WaySplit()
330 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunction_3WaySplit()
334 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunction_3WaySplit()
337 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxm; in FVRHSFunction_3WaySplit()
340 for (j = 0; j < dof; j++) { in FVRHSFunction_3WaySplit()
341 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunction_3WaySplit()
342 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxf / 2; in FVRHSFunction_3WaySplit()
346 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunction_3WaySplit()
349 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxf; in FVRHSFunction_3WaySplit()
352 for (j = 0; j < dof; j++) { in FVRHSFunction_3WaySplit()
353 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxf / 2; in FVRHSFunction_3WaySplit()
354 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunction_3WaySplit()
358 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxf; in FVRHSFunction_3WaySplit()
361 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxm; in FVRHSFunction_3WaySplit()
364 for (j = 0; j < dof; j++) { in FVRHSFunction_3WaySplit()
365 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxf / 2; in FVRHSFunction_3WaySplit()
366 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxf / 2; in FVRHSFunction_3WaySplit()
371 for (j = 0; j < dof; j++) f[(i - 1) * dof + j] -= ctx->flux[j] / hxf; in FVRHSFunction_3WaySplit()
374 for (j = 0; j < dof; j++) f[i * dof + j] += ctx->flux[j] / hxf; in FVRHSFunction_3WaySplit()
397 …PetscInt i, j, k, Mx, dof, xs, xm, islow = 0, sm = ctx->sm, ms = ctx->ms, lsbwidth = ctx->lsbw… in FVRHSFunctionslow_3WaySplit() local
420 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionslow_3WaySplit()
423 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionslow_3WaySplit()
436 for (j = 0; j < dof; j++) { in FVRHSFunctionslow_3WaySplit()
438 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunctionslow_3WaySplit()
439 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunctionslow_3WaySplit()
441 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunctionslow_3WaySplit()
442 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunctionslow_3WaySplit()
451 for (j = 0; j < dof; j++) { in FVRHSFunctionslow_3WaySplit()
453 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunctionslow_3WaySplit()
454 slope[i * dof + j] = tmp; in FVRHSFunctionslow_3WaySplit()
465 for (j = 0; j < dof; j++) { in FVRHSFunctionslow_3WaySplit()
466 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionslow_3WaySplit()
467 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionslow_3WaySplit()
472 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunctionslow_3WaySplit()
475 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hxs; in FVRHSFunctionslow_3WaySplit()
480 for (j = 0; j < dof; j++) { in FVRHSFunctionslow_3WaySplit()
481 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionslow_3WaySplit()
482 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionslow_3WaySplit()
486 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunctionslow_3WaySplit()
490 for (j = 0; j < dof; j++) { in FVRHSFunctionslow_3WaySplit()
491 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionslow_3WaySplit()
492 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionslow_3WaySplit()
496 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hxs; in FVRHSFunctionslow_3WaySplit()
501 for (j = 0; j < dof; j++) { in FVRHSFunctionslow_3WaySplit()
502 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionslow_3WaySplit()
503 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionslow_3WaySplit()
508 for (j = 0; j < dof; j++) f[(islow - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunctionslow_3WaySplit()
511 for (j = 0; j < dof; j++) f[islow * dof + j] += ctx->flux[j] / hxs; in FVRHSFunctionslow_3WaySplit()
527 …PetscInt i, j, k, Mx, dof, xs, xm, islowbuffer = 0, sm = ctx->sm, ms = ctx->ms, lsbwidth = ctx… in FVRHSFunctionslowbuffer_3WaySplit() local
550 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionslowbuffer_3WaySplit()
553 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionslowbuffer_3WaySplit()
566 for (j = 0; j < dof; j++) { in FVRHSFunctionslowbuffer_3WaySplit()
568 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunctionslowbuffer_3WaySplit()
569 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunctionslowbuffer_3WaySplit()
571 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunctionslowbuffer_3WaySplit()
572 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunctionslowbuffer_3WaySplit()
581 for (j = 0; j < dof; j++) { in FVRHSFunctionslowbuffer_3WaySplit()
583 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunctionslowbuffer_3WaySplit()
584 slope[i * dof + j] = tmp; in FVRHSFunctionslowbuffer_3WaySplit()
595 for (j = 0; j < dof; j++) { in FVRHSFunctionslowbuffer_3WaySplit()
596 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
597 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
601 for (j = 0; j < dof; j++) f[islowbuffer * dof + j] += ctx->flux[j] / hxs; in FVRHSFunctionslowbuffer_3WaySplit()
606 for (j = 0; j < dof; j++) { in FVRHSFunctionslowbuffer_3WaySplit()
607 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
608 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
612 for (j = 0; j < dof; j++) f[(islowbuffer - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunctionslowbuffer_3WaySplit()
615 for (j = 0; j < dof; j++) f[islowbuffer * dof + j] += ctx->flux[j] / hxs; in FVRHSFunctionslowbuffer_3WaySplit()
620 for (j = 0; j < dof; j++) { in FVRHSFunctionslowbuffer_3WaySplit()
621 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
622 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionslowbuffer_3WaySplit()
626 for (j = 0; j < dof; j++) f[(islowbuffer - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunctionslowbuffer_3WaySplit()
630 for (j = 0; j < dof; j++) { in FVRHSFunctionslowbuffer_3WaySplit()
631 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionslowbuffer_3WaySplit()
632 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
636 for (j = 0; j < dof; j++) f[islowbuffer * dof + j] += ctx->flux[j] / hxs; in FVRHSFunctionslowbuffer_3WaySplit()
641 for (j = 0; j < dof; j++) { in FVRHSFunctionslowbuffer_3WaySplit()
642 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
643 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
647 for (j = 0; j < dof; j++) f[(islowbuffer - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunctionslowbuffer_3WaySplit()
650 for (j = 0; j < dof; j++) f[islowbuffer * dof + j] += ctx->flux[j] / hxs; in FVRHSFunctionslowbuffer_3WaySplit()
655 for (j = 0; j < dof; j++) { in FVRHSFunctionslowbuffer_3WaySplit()
656 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
657 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionslowbuffer_3WaySplit()
661 for (j = 0; j < dof; j++) f[(islowbuffer - 1) * dof + j] -= ctx->flux[j] / hxs; in FVRHSFunctionslowbuffer_3WaySplit()
676 …PetscInt i, j, k, Mx, dof, xs, xm, imedium = 0, sm = ctx->sm, mf = ctx->mf, fm = ctx->fm, ms =… in FVRHSFunctionmedium_3WaySplit() local
699 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionmedium_3WaySplit()
702 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionmedium_3WaySplit()
715 for (j = 0; j < dof; j++) { in FVRHSFunctionmedium_3WaySplit()
717 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunctionmedium_3WaySplit()
718 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunctionmedium_3WaySplit()
720 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunctionmedium_3WaySplit()
721 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunctionmedium_3WaySplit()
730 for (j = 0; j < dof; j++) { in FVRHSFunctionmedium_3WaySplit()
732 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunctionmedium_3WaySplit()
733 slope[i * dof + j] = tmp; in FVRHSFunctionmedium_3WaySplit()
744 for (j = 0; j < dof; j++) { in FVRHSFunctionmedium_3WaySplit()
745 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxs / 2; in FVRHSFunctionmedium_3WaySplit()
746 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
750 for (j = 0; j < dof; j++) f[imedium * dof + j] += ctx->flux[j] / hxm; in FVRHSFunctionmedium_3WaySplit()
755 for (j = 0; j < dof; j++) { in FVRHSFunctionmedium_3WaySplit()
756 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
757 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
761 for (j = 0; j < dof; j++) f[(imedium - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunctionmedium_3WaySplit()
764 for (j = 0; j < dof; j++) f[imedium * dof + j] += ctx->flux[j] / hxm; in FVRHSFunctionmedium_3WaySplit()
769 for (j = 0; j < dof; j++) { in FVRHSFunctionmedium_3WaySplit()
770 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
771 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
775 for (j = 0; j < dof; j++) f[(imedium - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunctionmedium_3WaySplit()
779 for (j = 0; j < dof; j++) { in FVRHSFunctionmedium_3WaySplit()
780 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
781 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
785 for (j = 0; j < dof; j++) f[imedium * dof + j] += ctx->flux[j] / hxm; in FVRHSFunctionmedium_3WaySplit()
790 for (j = 0; j < dof; j++) { in FVRHSFunctionmedium_3WaySplit()
791 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
792 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
796 for (j = 0; j < dof; j++) f[(imedium - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunctionmedium_3WaySplit()
799 for (j = 0; j < dof; j++) f[imedium * dof + j] += ctx->flux[j] / hxm; in FVRHSFunctionmedium_3WaySplit()
804 for (j = 0; j < dof; j++) { in FVRHSFunctionmedium_3WaySplit()
805 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmedium_3WaySplit()
806 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxs / 2; in FVRHSFunctionmedium_3WaySplit()
810 for (j = 0; j < dof; j++) f[(imedium - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunctionmedium_3WaySplit()
824 …PetscInt i, j, k, Mx, dof, xs, xm, imediumbuffer = 0, mf = ctx->mf, fm = ctx->fm, lmbwidth = c… in FVRHSFunctionmediumbuffer_3WaySplit() local
847 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionmediumbuffer_3WaySplit()
850 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionmediumbuffer_3WaySplit()
863 for (j = 0; j < dof; j++) { in FVRHSFunctionmediumbuffer_3WaySplit()
865 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunctionmediumbuffer_3WaySplit()
866 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunctionmediumbuffer_3WaySplit()
868 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunctionmediumbuffer_3WaySplit()
869 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunctionmediumbuffer_3WaySplit()
878 for (j = 0; j < dof; j++) { in FVRHSFunctionmediumbuffer_3WaySplit()
880 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunctionmediumbuffer_3WaySplit()
881 slope[i * dof + j] = tmp; in FVRHSFunctionmediumbuffer_3WaySplit()
892 for (j = 0; j < dof; j++) { in FVRHSFunctionmediumbuffer_3WaySplit()
893 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
894 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
898 for (j = 0; j < dof; j++) f[imediumbuffer * dof + j] += ctx->flux[j] / hxm; in FVRHSFunctionmediumbuffer_3WaySplit()
903 for (j = 0; j < dof; j++) { in FVRHSFunctionmediumbuffer_3WaySplit()
904 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
905 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
909 for (j = 0; j < dof; j++) f[(imediumbuffer - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunctionmediumbuffer_3WaySplit()
912 for (j = 0; j < dof; j++) f[imediumbuffer * dof + j] += ctx->flux[j] / hxm; in FVRHSFunctionmediumbuffer_3WaySplit()
917 for (j = 0; j < dof; j++) { in FVRHSFunctionmediumbuffer_3WaySplit()
918 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
919 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxf / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
923 for (j = 0; j < dof; j++) f[(imediumbuffer - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunctionmediumbuffer_3WaySplit()
927 for (j = 0; j < dof; j++) { in FVRHSFunctionmediumbuffer_3WaySplit()
928 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxf / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
929 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
933 for (j = 0; j < dof; j++) f[imediumbuffer * dof + j] += ctx->flux[j] / hxm; in FVRHSFunctionmediumbuffer_3WaySplit()
938 for (j = 0; j < dof; j++) { in FVRHSFunctionmediumbuffer_3WaySplit()
939 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
940 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
944 for (j = 0; j < dof; j++) f[(imediumbuffer - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunctionmediumbuffer_3WaySplit()
947 for (j = 0; j < dof; j++) f[imediumbuffer * dof + j] += ctx->flux[j] / hxm; in FVRHSFunctionmediumbuffer_3WaySplit()
952 for (j = 0; j < dof; j++) { in FVRHSFunctionmediumbuffer_3WaySplit()
953 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
954 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionmediumbuffer_3WaySplit()
958 for (j = 0; j < dof; j++) f[(imediumbuffer - 1) * dof + j] -= ctx->flux[j] / hxm; in FVRHSFunctionmediumbuffer_3WaySplit()
973 PetscInt i, j, k, Mx, dof, xs, xm, ifast = 0, mf = ctx->mf, fm = ctx->fm; in FVRHSFunctionfast_3WaySplit() local
996 for (j = 0; j < dof; j++) x[i * dof + j] = x[j]; in FVRHSFunctionfast_3WaySplit()
999 for (j = 0; j < dof; j++) x[i * dof + j] = x[(xs + xm - 1) * dof + j]; in FVRHSFunctionfast_3WaySplit()
1010 for (j = 0; j < dof; j++) { in FVRHSFunctionfast_3WaySplit()
1012 jmpL = x[(i + 0) * dof + j] - x[(i - 1) * dof + j]; in FVRHSFunctionfast_3WaySplit()
1013 jmpR = x[(i + 1) * dof + j] - x[(i + 0) * dof + j]; in FVRHSFunctionfast_3WaySplit()
1015 cjmpL[k] += ctx->Rinv[k + j * dof] * jmpL; in FVRHSFunctionfast_3WaySplit()
1016 cjmpR[k] += ctx->Rinv[k + j * dof] * jmpR; in FVRHSFunctionfast_3WaySplit()
1025 for (j = 0; j < dof; j++) { in FVRHSFunctionfast_3WaySplit()
1027 for (k = 0; k < dof; k++) tmp += ctx->R[j + k * dof] * ctx->cslope[k]; in FVRHSFunctionfast_3WaySplit()
1028 slope[i * dof + j] = tmp; in FVRHSFunctionfast_3WaySplit()
1039 for (j = 0; j < dof; j++) { in FVRHSFunctionfast_3WaySplit()
1040 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxm / 2; in FVRHSFunctionfast_3WaySplit()
1041 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxf / 2; in FVRHSFunctionfast_3WaySplit()
1045 for (j = 0; j < dof; j++) f[ifast * dof + j] += ctx->flux[j] / hxf; in FVRHSFunctionfast_3WaySplit()
1050 for (j = 0; j < dof; j++) { in FVRHSFunctionfast_3WaySplit()
1051 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxf / 2; in FVRHSFunctionfast_3WaySplit()
1052 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxf / 2; in FVRHSFunctionfast_3WaySplit()
1056 for (j = 0; j < dof; j++) f[(ifast - 1) * dof + j] -= ctx->flux[j] / hxf; in FVRHSFunctionfast_3WaySplit()
1059 for (j = 0; j < dof; j++) f[ifast * dof + j] += ctx->flux[j] / hxf; in FVRHSFunctionfast_3WaySplit()
1064 for (j = 0; j < dof; j++) { in FVRHSFunctionfast_3WaySplit()
1065 uL[j] = x[(i - 1) * dof + j] + slope[(i - 1) * dof + j] * hxf / 2; in FVRHSFunctionfast_3WaySplit()
1066 uR[j] = x[(i - 0) * dof + j] - slope[(i - 0) * dof + j] * hxm / 2; in FVRHSFunctionfast_3WaySplit()
1070 for (j = 0; j < dof; j++) f[(ifast - 1) * dof + j] -= ctx->flux[j] / hxf; in FVRHSFunctionfast_3WaySplit()