39 using BoundState = std::tuple<BoundTrackParameters, Jacobian, double>;
41 std::tuple<CurvilinearTrackParameters, Jacobian, double>;
57 template <
typename Parameters>
60 double ssize = std::numeric_limits<double>::max(),
72 const auto pos = pars.position(gctx);
73 const auto Vp = pars.parameters();
76 double Cf = std::cos(Vp[eBoundPhi]);
78 double Ce = std::cos(Vp[eBoundTheta]);
90 if (std::abs(
pVector[7]) < .000000000000001) {
92 :
pVector[7] = .000000000000001;
96 if (pars.covariance()) {
101 const auto transform = pars.referenceSurface().referenceFrame(
166 const auto&
surface = pars.referenceSurface();
169 double lCf = std::cos(Vp[1]);
170 double lSf = std::sin(Vp[1]);
173 double d0 = lCf * Ax[0] + lSf * Ay[0];
174 double d1 = lCf * Ax[1] + lSf * Ay[1];
175 double d2 = lCf * Ax[2] + lSf * Ay[2];
179 pVector[16] = Vp[0] * (lCf * Ay[0] - lSf * Ax[0]);
180 pVector[17] = Vp[0] * (lCf * Ay[1] - lSf * Ax[1]);
181 pVector[18] = Vp[0] * (lCf * Ay[2] - lSf * Ax[2]);
199 double Bx2 = -A[2] *
pVector[29];
200 double Bx3 = A[1] * pVector[38] - A[2] * pVector[37];
202 double By2 = A[2] * pVector[28];
203 double By3 = A[2] * pVector[36] - A[0] * pVector[38];
205 double Bz2 = A[0] * pVector[29] - A[1] * pVector[28];
206 double Bz3 = A[0] * pVector[37] - A[1] * pVector[36];
208 double B2 = B[0] * Bx2 + B[1] * By2 + B[2] * Bz2;
209 double B3 = B[0] * Bx3 + B[1] * By3 + B[2] * Bz3;
211 Bx2 = (Bx2 - B[0] * B2) * Bn;
212 Bx3 = (Bx3 - B[0] * B3) * Bn;
213 By2 = (By2 - B[1] * B2) * Bn;
214 By3 = (By3 - B[1] * B3) * Bn;
215 Bz2 = (Bz2 - B[2] * B2) * Bn;
216 Bz3 = (Bz3 - B[2] * B3) * Bn;
219 pVector[24] = Bx2 * Vp[0];
220 pVector[32] = Bx3 * Vp[0];
221 pVector[25] = By2 * Vp[0];
222 pVector[33] = By3 * Vp[0];
223 pVector[26] = Bz2 * Vp[0];
224 pVector[34] = Bz3 * Vp[0];
297 std::reference_wrapper<const MagneticFieldContext> mctx,
299 double ssize = std::numeric_limits<double>::max(),
314 const double stepSize = std::numeric_limits<double>::max())
const {
319 boundParams, cov, surface);
406 return detail::updateSingleSurfaceStatus<AtlasStepper>(
418 template <
typename object_
intersection_t>
421 detail::updateSingleStepSize<AtlasStepper>(
state, oIntersection, release);
432 bool release =
true)
const {
472 State& state,
const Surface& surface,
bool transportCov =
true,
490 std::optional<Covariance> covOpt = std::nullopt;
494 if (state.
cov != Covariance::Zero()) {
523 bool transportCov =
true)
const {
538 std::optional<Covariance> covOpt = std::nullopt;
542 if (state.
cov != Covariance::Zero()) {
564 const Surface& surface)
const {
570 state.
pVector[4] = direction.x();
571 state.
pVector[5] = direction.y();
572 state.
pVector[6] = direction.z();
576 if (std::abs(state.
pVector[7]) < .000000000000001) {
578 : state.
pVector[7] = .000000000000001;
587 double Sf = std::sin(boundParams[
eBoundPhi]);
588 double Cf = std::cos(boundParams[eBoundPhi]);
590 double Ce = std::cos(boundParams[eBoundTheta]);
658 double lCf = std::cos(boundParams[
eBoundLoc1]);
659 double lSf = std::sin(boundParams[eBoundLoc1]);
662 double d0 = lCf * Ax[0] + lSf * Ay[0];
663 double d1 = lCf * Ax[1] + lSf * Ay[1];
664 double d2 = lCf * Ax[2] + lSf * Ay[2];
689 double Bx2 = -A[2] * state.
pVector[29];
692 double By2 = A[2] * state.
pVector[28];
698 double B2 = B[0] * Bx2 + B[1] * By2 + B[2] * Bz2;
699 double B3 = B[0] * Bx3 + B[1] * By3 + B[2] * Bz3;
701 Bx2 = (Bx2 - B[0] * B2) * Bn;
702 Bx3 = (Bx3 - B[0] * B3) * Bn;
703 By2 = (By2 - B[1] * B2) * Bn;
704 By3 = (By3 - B[1] * B3) * Bn;
705 Bz2 = (Bz2 - B[2] * B2) * Bn;
706 Bz3 = (Bz3 - B[2] * B3) * Bn;
733 double qop,
double time)
const {
735 state.
pVector[0] = uposition[0];
736 state.
pVector[1] = uposition[1];
737 state.
pVector[2] = uposition[2];
739 state.
pVector[4] = udirection[0];
740 state.
pVector[5] = udirection[1];
741 state.
pVector[6] = udirection[2];
752 for (
unsigned int i = 0;
i < 60; ++
i) {
756 double p = 1. / P[7];
764 double An = std::hypot(P[4], P[5]);
776 double Ay[3] = {-Ax[1] * P[6], Ax[0] * P[6], An};
777 double S[3] = {P[4], P[5], P[6]};
779 double A = P[4] * S[0] + P[5] * S[1] + P[6] * S[2];
787 double s0 = P[8] * S[0] + P[9] * S[1] + P[10] * S[2];
788 double s1 = P[16] * S[0] + P[17] * S[1] + P[18] * S[2];
789 double s2 = P[24] * S[0] + P[25] * S[1] + P[26] * S[2];
790 double s3 = P[32] * S[0] + P[33] * S[1] + P[34] * S[2];
791 double s4 = P[40] * S[0] + P[41] * S[1] + P[42] * S[2];
795 P[10] -= (s0 * P[6]);
796 P[11] -= (s0 * P[59]);
797 P[12] -= (s0 * P[56]);
798 P[13] -= (s0 * P[57]);
799 P[14] -= (s0 * P[58]);
800 P[16] -= (s1 * P[4]);
801 P[17] -= (s1 * P[5]);
802 P[18] -= (s1 * P[6]);
803 P[19] -= (s1 * P[59]);
804 P[20] -= (s1 * P[56]);
805 P[21] -= (s1 * P[57]);
806 P[22] -= (s1 * P[58]);
807 P[24] -= (s2 * P[4]);
808 P[25] -= (s2 * P[5]);
809 P[26] -= (s2 * P[6]);
810 P[27] -= (s2 * P[59]);
811 P[28] -= (s2 * P[56]);
812 P[29] -= (s2 * P[57]);
813 P[30] -= (s2 * P[58]);
814 P[32] -= (s3 * P[4]);
815 P[33] -= (s3 * P[5]);
816 P[34] -= (s3 * P[6]);
817 P[35] -= (s3 * P[59]);
818 P[36] -= (s3 * P[56]);
819 P[37] -= (s3 * P[57]);
820 P[38] -= (s3 * P[58]);
821 P[40] -= (s4 * P[4]);
822 P[41] -= (s4 * P[5]);
823 P[42] -= (s4 * P[6]);
824 P[43] -= (s4 * P[59]);
825 P[44] -= (s4 * P[56]);
826 P[45] -= (s4 * P[57]);
827 P[46] -= (s4 * P[58]);
829 double P3 = 0, P4 = 0,
C = P[4] * P[4] + P[5] * P[5];
843 state.
jacobian[0] = Ax[0] * P[8] + Ax[1] * P[9];
844 state.
jacobian[1] = Ax[0] * P[16] + Ax[1] * P[17];
845 state.
jacobian[2] = Ax[0] * P[24] + Ax[1] * P[25];
846 state.
jacobian[3] = Ax[0] * P[32] + Ax[1] * P[33];
847 state.
jacobian[4] = Ax[0] * P[40] + Ax[1] * P[41];
850 state.
jacobian[6] = Ay[0] * P[8] + Ay[1] * P[9] + Ay[2] * P[10];
852 Ay[0] * P[16] + Ay[1] * P[17] + Ay[2] * P[18];
854 Ay[0] * P[24] + Ay[1] * P[25] + Ay[2] * P[26];
856 Ay[0] * P[32] + Ay[1] * P[33] + Ay[2] * P[34];
858 Ay[0] * P[40] + Ay[1] * P[41] + Ay[2] * P[42];
861 state.
jacobian[12] = P3 * P[13] - P4 * P[12];
862 state.
jacobian[13] = P3 * P[21] - P4 * P[20];
863 state.
jacobian[14] = P3 * P[29] - P4 * P[28];
864 state.
jacobian[15] = P3 * P[37] - P4 * P[36];
865 state.
jacobian[16] = P3 * P[45] - P4 * P[44];
889 Eigen::Map<Eigen::Matrix<double, eBoundSize, eBoundSize, Eigen::RowMajor>>
908 for (
unsigned int i = 0;
i < 60; ++
i) {
912 mom /= std::abs(state.
pVector[7]);
924 double Ax[3] = {fFrame(0, 0), fFrame(1, 0), fFrame(2, 0)};
925 double Ay[3] = {fFrame(0, 1), fFrame(1, 1), fFrame(2, 1)};
926 double S[3] = {fFrame(0, 2), fFrame(1, 2), fFrame(2, 2)};
929 double A = P[4] * S[0] + P[5] * S[1] + P[6] * S[2];
939 double s0 = P[8] * S[0] + P[9] * S[1] + P[10] * S[2];
940 double s1 = P[16] * S[0] + P[17] * S[1] + P[18] * S[2];
941 double s2 = P[24] * S[0] + P[25] * S[1] + P[26] * S[2];
942 double s3 = P[32] * S[0] + P[33] * S[1] + P[34] * S[2];
943 double s4 = P[40] * S[0] + P[41] * S[1] + P[42] * S[2];
956 double d = P[4] * Ay[0] + P[5] * Ay[1] + P[6] * Ay[2];
959 double a = (1. - d) * (1. + d);
965 double X = d * Ay[0] - P[4];
966 double Y = d * Ay[1] - P[5];
967 double Z = d * Ay[2] - P[6];
970 double d0 = P[12] * Ay[0] + P[13] * Ay[1] + P[14] * Ay[2];
971 double d1 = P[20] * Ay[0] + P[21] * Ay[1] + P[22] * Ay[2];
972 double d2 = P[28] * Ay[0] + P[29] * Ay[1] + P[30] * Ay[2];
973 double d3 = P[36] * Ay[0] + P[37] * Ay[1] + P[38] * Ay[2];
974 double d4 = P[44] * Ay[0] + P[45] * Ay[1] + P[46] * Ay[2];
976 s0 = (((P[8] * X + P[9] * Y + P[10] *
Z) + x * (d0 * Ay[0] - P[12])) +
977 (y * (d0 * Ay[1] - P[13]) + z * (d0 * Ay[2] - P[14]))) *
980 s1 = (((P[16] * X + P[17] * Y + P[18] *
Z) + x * (d1 * Ay[0] - P[20])) +
981 (y * (d1 * Ay[1] - P[21]) + z * (d1 * Ay[2] - P[22]))) *
983 s2 = (((P[24] * X + P[25] * Y + P[26] *
Z) + x * (d2 * Ay[0] - P[28])) +
984 (y * (d2 * Ay[1] - P[29]) + z * (d2 * Ay[2] - P[30]))) *
986 s3 = (((P[32] * X + P[33] * Y + P[34] *
Z) + x * (d3 * Ay[0] - P[36])) +
987 (y * (d3 * Ay[1] - P[37]) + z * (d3 * Ay[2] - P[38]))) *
989 s4 = (((P[40] * X + P[41] * Y + P[42] *
Z) + x * (d4 * Ay[0] - P[44])) +
990 (y * (d4 * Ay[1] - P[45]) + z * (d4 * Ay[2] - P[46]))) *
996 P[10] -= (s0 * P[6]);
997 P[11] -= (s0 * P[59]);
998 P[12] -= (s0 * P[56]);
999 P[13] -= (s0 * P[57]);
1000 P[14] -= (s0 * P[58]);
1002 P[16] -= (s1 * P[4]);
1003 P[17] -= (s1 * P[5]);
1004 P[18] -= (s1 * P[6]);
1005 P[19] -= (s1 * P[59]);
1006 P[20] -= (s1 * P[56]);
1007 P[21] -= (s1 * P[57]);
1008 P[22] -= (s1 * P[58]);
1010 P[24] -= (s2 * P[4]);
1011 P[25] -= (s2 * P[5]);
1012 P[26] -= (s2 * P[6]);
1013 P[27] -= (s2 * P[59]);
1014 P[28] -= (s2 * P[56]);
1015 P[29] -= (s2 * P[57]);
1016 P[30] -= (s2 * P[58]);
1018 P[32] -= (s3 * P[4]);
1019 P[33] -= (s3 * P[5]);
1020 P[34] -= (s3 * P[6]);
1021 P[35] -= (s3 * P[59]);
1022 P[36] -= (s3 * P[56]);
1023 P[37] -= (s3 * P[57]);
1024 P[38] -= (s3 * P[58]);
1026 P[40] -= (s4 * P[4]);
1027 P[41] -= (s4 * P[5]);
1028 P[42] -= (s4 * P[6]);
1029 P[43] -= (s4 * P[59]);
1030 P[44] -= (s4 * P[56]);
1031 P[45] -= (s4 * P[57]);
1032 P[46] -= (s4 * P[58]);
1034 double P3 = 0, P4 = 0,
C = P[4] * P[4] + P[5] * P[5];
1046 double MA[3] = {Ax[0], Ax[1], Ax[2]};
1047 double MB[3] = {Ay[0], Ay[1], Ay[2]};
1052 double d[3] = {P[0] - sfc(0), P[1] - sfc(1), P[2] - sfc(2)};
1054 double RC = d[0] * Ax[0] + d[1] * Ax[1] + d[2] * Ax[2];
1055 double RS = d[0] * Ay[0] + d[1] * Ay[1] + d[2] * Ay[2];
1056 double R2 = RC * RC + RS * RS;
1059 double Ri = 1. / sqrt(R2);
1060 MA[0] = (RC * Ax[0] + RS * Ay[0]) * Ri;
1061 MA[1] = (RC * Ax[1] + RS * Ay[1]) * Ri;
1062 MA[2] = (RC * Ax[2] + RS * Ay[2]) * Ri;
1063 MB[0] = (RC * Ay[0] - RS * Ax[0]) * (Ri = 1. / R2);
1064 MB[1] = (RC * Ay[1] - RS * Ax[1]) * Ri;
1065 MB[2] = (RC * Ay[2] - RS * Ax[2]) * Ri;
1068 state.
jacobian[0] = MA[0] * P[8] + MA[1] * P[9] + MA[2] * P[10];
1070 MA[0] * P[16] + MA[1] * P[17] + MA[2] * P[18];
1072 MA[0] * P[24] + MA[1] * P[25] + MA[2] * P[26];
1074 MA[0] * P[32] + MA[1] * P[33] + MA[2] * P[34];
1076 MA[0] * P[40] + MA[1] * P[41] + MA[2] * P[42];
1079 state.
jacobian[6] = MB[0] * P[8] + MB[1] * P[9] + MB[2] * P[10];
1081 MB[0] * P[16] + MB[1] * P[17] + MB[2] * P[18];
1083 MB[0] * P[24] + MB[1] * P[25] + MB[2] * P[26];
1085 MB[0] * P[32] + MB[1] * P[33] + MB[2] * P[34];
1087 MB[0] * P[40] + MB[1] * P[41] + MB[2] * P[42];
1090 state.
jacobian[12] = P3 * P[13] - P4 * P[12];
1091 state.
jacobian[13] = P3 * P[21] - P4 * P[20];
1092 state.
jacobian[14] = P3 * P[29] - P4 * P[28];
1093 state.
jacobian[15] = P3 * P[37] - P4 * P[36];
1094 state.
jacobian[16] = P3 * P[45] - P4 * P[44];
1118 Eigen::Map<Eigen::Matrix<double, eBoundSize, eBoundSize, Eigen::RowMajor>>
1126 template <
typename propagator_state_t,
typename navigator_t>
1128 const navigator_t& )
const {
1130 auto h = state.stepping.stepSize.value() * state.options.direction;
1131 bool Jac = state.stepping.useJacobian;
1133 double*
R = &(state.stepping.pVector[0]);
1134 double*
A = &(state.stepping.pVector[4]);
1135 double* sA = &(state.stepping.pVector[56]);
1137 double Pi = 0.5 * state.stepping.pVector[7];
1142 if (state.stepping.newfield) {
1145 auto fRes =
getField(state.stepping, pos);
1147 return fRes.error();
1151 f0 = state.stepping.field;
1157 size_t nStepTrials = 0;
1160 double S3 = (1. / 3.) *
h, S4 = .25 *
h, PS2 = Pi *
h;
1165 double H0[3] = {f0[0] * PS2, f0[1] * PS2, f0[2] * PS2};
1167 double A0 = A[1] * H0[2] - A[2] * H0[1];
1168 double B0 = A[2] * H0[0] - A[0] * H0[2];
1169 double C0 = A[0] * H0[1] - A[1] * H0[0];
1171 double A2 = A0 + A[0];
1172 double B2 = B0 + A[1];
1173 double C2 = C0 + A[2];
1175 double A1 = A2 + A[0];
1176 double B1 = B2 + A[1];
1177 double C1 = C2 + A[2];
1183 const Vector3 pos(R[0] + A1 * S4, R[1] + B1 * S4, R[2] + C1 * S4);
1185 auto fRes =
getField(state.stepping, pos);
1187 return fRes.error();
1195 double H1[3] = {f[0] * PS2, f[1] * PS2, f[2] * PS2};
1197 double A3 = (A[0] + B2 * H1[2]) - C2 * H1[1];
1198 double B3 = (A[1] + C2 * H1[0]) - A2 * H1[2];
1199 double C3 = (A[2] + A2 * H1[1]) - B2 * H1[0];
1201 double A4 = (A[0] + B3 * H1[2]) - C3 * H1[1];
1202 double B4 = (A[1] + C3 * H1[0]) - A3 * H1[2];
1203 double C4 = (A[2] + A3 * H1[1]) - B3 * H1[0];
1205 double A5 = 2. * A4 - A[0];
1206 double B5 = 2. * B4 - A[1];
1207 double C5 = 2. * C4 - A[2];
1213 const Vector3 pos(R[0] + h * A4, R[1] + h * B4, R[2] + h * C4);
1215 auto fRes =
getField(state.stepping, pos);
1217 return fRes.error();
1225 double H2[3] = {f[0] * PS2, f[1] * PS2, f[2] * PS2};
1227 double A6 = B5 * H2[2] - C5 * H2[1];
1228 double B6 = C5 * H2[0] - A5 * H2[2];
1229 double C6 = A5 * H2[1] - B5 * H2[0];
1237 (std::abs((A1 + A6) - (A3 + A4)) + std::abs((B1 + B6) - (B3 + B4)) +
1238 std::abs((C1 + C6) - (C3 + C4)));
1239 if (std::abs(EST) > std::abs(state.options.tolerance)) {
1242 state.stepping.stepSize.setAccuracy(h * state.options.direction);
1252 double A00 = A[0], A11 = A[1], A22 = A[2];
1254 A[0] = 2. * A3 + (A0 + A5 + A6);
1255 A[1] = 2. * B3 + (B0 + B5 + B6);
1256 A[2] = 2. * C3 + (C0 + C5 + C6);
1258 double D = (A[0] * A[0] + A[1] * A[1]) + (A[2] * A[2] - 9.);
1260 D = (1. / 3.) - ((1. / 648.) * D) * (12. - D);
1262 R[0] += (A2 + A3 + A4) * S3;
1263 R[1] += (B2 + B3 + B4) * S3;
1264 R[2] += (C2 + C3 + C4) * S3;
1276 state.stepping.pVector[3] += h * dtds;
1277 state.stepping.pVector[59] = dtds;
1278 state.stepping.field =
f;
1279 state.stepping.newfield =
false;
1282 double dtdl = h * mass * mass *
charge(state.stepping) /
1284 state.stepping.pVector[43] += dtdl;
1288 double* d2A = &state.stepping.pVector[28];
1289 double* d3A = &state.stepping.pVector[36];
1290 double* d4A = &state.stepping.pVector[44];
1291 double d2A0 = H0[2] * d2A[1] - H0[1] * d2A[2];
1292 double d2B0 = H0[0] * d2A[2] - H0[2] * d2A[0];
1293 double d2C0 = H0[1] * d2A[0] - H0[0] * d2A[1];
1294 double d3A0 = H0[2] * d3A[1] - H0[1] * d3A[2];
1295 double d3B0 = H0[0] * d3A[2] - H0[2] * d3A[0];
1296 double d3C0 = H0[1] * d3A[0] - H0[0] * d3A[1];
1297 double d4A0 = (A0 + H0[2] * d4A[1]) - H0[1] * d4A[2];
1298 double d4B0 = (B0 + H0[0] * d4A[2]) - H0[2] * d4A[0];
1299 double d4C0 = (C0 + H0[1] * d4A[0]) - H0[0] * d4A[1];
1300 double d2A2 = d2A0 + d2A[0];
1301 double d2B2 = d2B0 + d2A[1];
1302 double d2C2 = d2C0 + d2A[2];
1303 double d3A2 = d3A0 + d3A[0];
1304 double d3B2 = d3B0 + d3A[1];
1305 double d3C2 = d3C0 + d3A[2];
1306 double d4A2 = d4A0 + d4A[0];
1307 double d4B2 = d4B0 + d4A[1];
1308 double d4C2 = d4C0 + d4A[2];
1309 double d0 = d4A[0] - A00;
1310 double d1 = d4A[1] - A11;
1311 double d2 = d4A[2] - A22;
1312 double d2A3 = (d2A[0] + d2B2 * H1[2]) - d2C2 * H1[1];
1313 double d2B3 = (d2A[1] + d2C2 * H1[0]) - d2A2 * H1[2];
1314 double d2C3 = (d2A[2] + d2A2 * H1[1]) - d2B2 * H1[0];
1315 double d3A3 = (d3A[0] + d3B2 * H1[2]) - d3C2 * H1[1];
1316 double d3B3 = (d3A[1] + d3C2 * H1[0]) - d3A2 * H1[2];
1317 double d3C3 = (d3A[2] + d3A2 * H1[1]) - d3B2 * H1[0];
1318 double d4A3 = ((A3 + d0) + d4B2 * H1[2]) - d4C2 * H1[1];
1319 double d4B3 = ((B3 + d1) + d4C2 * H1[0]) - d4A2 * H1[2];
1320 double d4C3 = ((C3 + d2) + d4A2 * H1[1]) - d4B2 * H1[0];
1321 double d2A4 = (d2A[0] + d2B3 * H1[2]) - d2C3 * H1[1];
1322 double d2B4 = (d2A[1] + d2C3 * H1[0]) - d2A3 * H1[2];
1323 double d2C4 = (d2A[2] + d2A3 * H1[1]) - d2B3 * H1[0];
1324 double d3A4 = (d3A[0] + d3B3 * H1[2]) - d3C3 * H1[1];
1325 double d3B4 = (d3A[1] + d3C3 * H1[0]) - d3A3 * H1[2];
1326 double d3C4 = (d3A[2] + d3A3 * H1[1]) - d3B3 * H1[0];
1327 double d4A4 = ((A4 + d0) + d4B3 * H1[2]) - d4C3 * H1[1];
1328 double d4B4 = ((B4 + d1) + d4C3 * H1[0]) - d4A3 * H1[2];
1329 double d4C4 = ((C4 + d2) + d4A3 * H1[1]) - d4B3 * H1[0];
1330 double d2A5 = 2. * d2A4 - d2A[0];
1331 double d2B5 = 2. * d2B4 - d2A[1];
1332 double d2C5 = 2. * d2C4 - d2A[2];
1333 double d3A5 = 2. * d3A4 - d3A[0];
1334 double d3B5 = 2. * d3B4 - d3A[1];
1335 double d3C5 = 2. * d3C4 - d3A[2];
1336 double d4A5 = 2. * d4A4 - d4A[0];
1337 double d4B5 = 2. * d4B4 - d4A[1];
1338 double d4C5 = 2. * d4C4 - d4A[2];
1339 double d2A6 = d2B5 * H2[2] - d2C5 * H2[1];
1340 double d2B6 = d2C5 * H2[0] - d2A5 * H2[2];
1341 double d2C6 = d2A5 * H2[1] - d2B5 * H2[0];
1342 double d3A6 = d3B5 * H2[2] - d3C5 * H2[1];
1343 double d3B6 = d3C5 * H2[0] - d3A5 * H2[2];
1344 double d3C6 = d3A5 * H2[1] - d3B5 * H2[0];
1345 double d4A6 = d4B5 * H2[2] - d4C5 * H2[1];
1346 double d4B6 = d4C5 * H2[0] - d4A5 * H2[2];
1347 double d4C6 = d4A5 * H2[1] - d4B5 * H2[0];
1349 double*
dR = &state.stepping.pVector[24];
1350 dR[0] += (d2A2 + d2A3 + d2A4) * S3;
1351 dR[1] += (d2B2 + d2B3 + d2B4) * S3;
1352 dR[2] += (d2C2 + d2C3 + d2C4) * S3;
1353 d2A[0] = ((d2A0 + 2. * d2A3) + (d2A5 + d2A6)) * (1. / 3.);
1354 d2A[1] = ((d2B0 + 2. * d2B3) + (d2B5 + d2B6)) * (1. / 3.);
1355 d2A[2] = ((d2C0 + 2. * d2C3) + (d2C5 + d2C6)) * (1. / 3.);
1357 dR = &state.stepping.pVector[32];
1358 dR[0] += (d3A2 + d3A3 + d3A4) * S3;
1359 dR[1] += (d3B2 + d3B3 + d3B4) * S3;
1360 dR[2] += (d3C2 + d3C3 + d3C4) * S3;
1361 d3A[0] = ((d3A0 + 2. * d3A3) + (d3A5 + d3A6)) * (1. / 3.);
1362 d3A[1] = ((d3B0 + 2. * d3B3) + (d3B5 + d3B6)) * (1. / 3.);
1363 d3A[2] = ((d3C0 + 2. * d3C3) + (d3C5 + d3C6)) * (1. / 3.);
1365 dR = &state.stepping.pVector[40];
1366 dR[0] += (d4A2 + d4A3 + d4A4) * S3;
1367 dR[1] += (d4B2 + d4B3 + d4B4) * S3;
1368 dR[2] += (d4C2 + d4C3 + d4C4) * S3;
1369 d4A[0] = ((d4A0 + 2. * d4A3) + (d4A5 + d4A6 + A6)) * (1. / 3.);
1370 d4A[1] = ((d4B0 + 2. * d4B3) + (d4B5 + d4B6 + B6)) * (1. / 3.);
1371 d4A[2] = ((d4C0 + 2. * d4C3) + (d4C5 + d4C6 + C6)) * (1. / 3.);
1374 state.stepping.pathAccumulated +=
h;
1375 state.stepping.stepSize.nStepTrials = nStepTrials;
1380 state.stepping.pathAccumulated +=
h;