488{
489
490
492
493
494 bi[1][0] = 1.0,
495 bi[1][1] = -38039.0 / 7040.0,
496 bi[1][2] = 125923.0 / 10560.0,
497 bi[1][3] = -19683.0 / 1760.0,
498 bi[1][4] = 3303.0 / 880.0,
499
500
501
502 bi[2][0] = 0.0,
503 bi[2][1] = 0.0,
504 bi[2][2] = 0.0,
505 bi[2][3] = 0.0,
506 bi[2][4] = 0.0,
507
508
509
510 bi[3][0] = 0.0,
511 bi[3][1] = -12500.0 / 4081.0,
512 bi[3][2] = 205000.0 / 12243.0,
513 bi[3][3] = -90000.0 / 4081.0,
514 bi[3][4] = 36000.0 / 4081.0,
515
516
517
518 bi[4][0] = 0.0,
519 bi[4][1] = -3125.0 / 704.0,
520 bi[4][2] = 25625.0 / 1056.0,
521 bi[4][3] = -5625.0 / 176.0,
522 bi[4][4] = 1125.0 / 88.0,
523
524
525
526 bi[5][0] = 0.0,
527 bi[5][1] = 164025.0 / 74624.0,
528 bi[5][2] = -448335.0 / 37312.0,
529 bi[5][3] = 295245.0 / 18656.0,
530 bi[5][4] = -59049.0 / 9328.0,
531
532
533
534 bi[6][0] = 0.0,
535 bi[6][1] = -25.0 / 28.0,
536 bi[6][2] = 205.0 / 42.0,
537 bi[6][3] = -45.0 / 7.0,
538 bi[6][4] = 18.0 / 7.0,
539
540
541
542 bi[7][0] = 0.0,
543 bi[7][1] = -2.0 / 11.0,
544 bi[7][2] = 73.0 / 55.0,
545 bi[7][3] = -171.0 / 55.0,
546 bi[7][4] = 108.0 / 55.0,
547
548
549
550 bi[8][0] = 0.0,
551 bi[8][1] = 189.0 / 22.0,
552 bi[8][2] = -1593.0 / 55.0,
553 bi[8][3] = 3537.0 / 110.0,
554 bi[8][4] = -648.0 / 55.0,
555
556
557
558 bi[9][0] = 0.0,
559 bi[9][1] = 351.0 / 110.0,
560 bi[9][2] = -999.0 / 55.0,
561 bi[9][3] = 2943.0 / 110.0,
562 bi[9][4] = -648.0 / 55.0;
563
564
565
566
568 std::memset(b, 0.0, sizeof(b));
569
571 for(
G4int j = 0; j <= 4; ++j)
572 {
573 for(
G4int iStage = 1; iStage <= 9; ++iStage)
574 {
575 b[iStage] += bi[iStage][j] * tauPower;
576 }
577 tauPower *= tau;
578 }
579
580
581 const G4double stepLen = fLastStepLength * tau;
582 for(
G4int i = 0; i <
N; ++i)
583 {
584 yOut[i] = fyIn[i] + stepLen * (
585 b[1] * fdydxIn[i] + b[2] * ak2[i] + b[3] * ak3[i] +
586 b[4] * ak4[i] + b[5] * ak5[i] + b[6] * ak6[i] +
587 b[7] * ak7[i] + b[8] * ak8[i] + b[9] * ak9[i]
588 );
589 }
590}