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