We present here the simplified dynamic model of the Mitsubishi PA-10 Robot as discussed in, "Dynamic Identification and Control of an Industrial Robot," by Rodrigo Jamisola,  Marcelo Ang, Jr., Tao Ming Lim, Oussama Khatib, and Ser Yong Lim.

The robot dynamic equation:

t=A ddQ + H (Q,dQ) + G(Q);

where t is the torque at the joint, A is the Inertia Matrix, H is the Coriolis and centrifugal terms, and G is the gravitational terms. Q, dQ, and ddQ are the angular positions, velocities and accelerations, respectively.



Some trigonometric subtitutions
The Mitsubishi Robot Physical Parameters (provided by Manufacturer)
The gravitational constant (m/s^2)
The gravity terms
The Inertia Matrix
The lumped inertias of the Inertia Matrix whose numerical values can be derived by experiments
The Coriolis and centrifugal terms (the lumped inertias found here are the same as the lumped inertias found in the Inertia Matrix)



Some trigonometric subtitutions:        up

C1=cos(Q[1]);
 C2=cos(Q[2]);
 C3=cos(Q[3]);
 C4=cos(Q[4]);
 C5=cos(Q[5]);
 C6=cos(Q[6]);
 C7=cos(Q[7]);

 C11=cos(2*Q[1]);
 C22=cos(2*Q[2]);
 C33=cos(2*Q[3]);
 C44=cos(2*Q[4]);
 C55=cos(2*Q[5]);
 C66=cos(2*Q[6]);
 C77=cos(2*Q[7]);

 S1=sin(Q[1]);
 S2=sin(Q[2]);
 S3=sin(Q[3]);
 S4=sin(Q[4]);
 S5=sin(Q[5]);
 S6=sin(Q[6]);
 S7=sin(Q[7]);

 S11=sin(2*Q[1]);
 S22=sin(2*Q[2]);
 S33=sin(2*Q[3]);
 S44=sin(2*Q[4]);
 S55=sin(2*Q[5]);
 S66=sin(2*Q[6]);
 S77=sin(2*Q[7]);

 CC1=pow(C1,2);
 CC2=pow(C2,2);
 CC3=pow(C3,2);
 CC4=pow(C4,2);
 CC5=pow(C5,2);
 CC6=pow(C6,2);
 CC7=pow(C7,2);

 SS1=pow(S1,2);
 SS2=pow(S2,2);
 SS3=pow(S3,2);
 SS4=pow(S4,2);
 SS5=pow(S5,2);
 SS6=pow(S6,2);
 SS7=pow(S7,2);



The Mitsubishi Robot Physical Parameters (provided by Manufacturer)   up

link masses (kg)
m2= 8.41;
m3=3.51;
m4= 4.31;
m5= 3.45;
m6= 1.46;
m7= 0.24;

center of mass (m)
rz2= 0.06325;
ry3= 0.08944;
rz4= 0.04609;
ry5= 0.1647;
rz6= -0.03;
rz7= -0.029;

offset distance (m)
d1= 0.115;
d3=  0.450;
d5=  0.50;
d7=  0.08;
 

motor constants (link-referenced in kg-m^2):
Im1=Im2=0.75;
Im3=Im4=0.2125;
Im5=Im6=Im7=0.00575;



The gravitational constant (m/s^2)     up
g= 9.81;



The gravity terms:      up

gravity[1]=0;
gravity[2]=-(
      g*(S2*(d3*(m3 + m4 + m5 + m6 + m7) - m3*ry3 + m2*rz2 +
                  C4*(d5*(m5 + m6 + m7) - m5*ry5 + m4*rz4 +
                        C6*(m6*rz6 + m7*(d7 + rz7))) -
                  C5*(m6*rz6 + m7*(d7 + rz7))*S4*S6) +
            C2*(C3*(d5*(m5 + m6 + m7) - m5*ry5 + m4*rz4 +
                        C6*(m6*rz6 + m7*(d7 + rz7)))*
                    S4 + (m6*rz6 + m7*(d7 + rz7))*(C3*C4*C5 - S3*S5)*S6)));
gravity[3]=g*
    S2*((d5*(m5 + m6 + m7) - m5*ry5 + m4*rz4 + C6*(m6*rz6 + m7*(d7 + rz7)))*
          S3*S4 + (m6*rz6 + m7*(d7 + rz7))*(C4*C5*S3 + C3*S5)*S6);
gravity[4]=-(
        g*(d5*(m5 + m6 + m7) - m5*ry5 + m4*rz4 +
              C6*(m6*rz6 + m7*(d7 + rz7)))*(C3*C4*S2 + C2*S4)) +
    C5*g*(m6*rz6 + m7*(d7 + rz7))*(-(C2*C4) + C3*S2*S4)*S6;
gravity[5]=g*(m6*rz6 + m7*(d7 + rz7))*(C5*S2*S3 + (C3*C4*S2 + C2*S4)*S5)*S6;
gravity[6]=-(
      g*(m6*rz6 + m7*(d7 + rz7))*(
          C6*(C5*(C3*C4*S2 + C2*S4) - S2*S3*S5) + (C2*C4 - C3*S2*S4)*S6));
gravity[7]=0;



The Inertia Matrix:     up
a[1][
    1]=Im1+I18 +(-CC3 + CC2*(1 + CC3))*CC4*I11 + (1 + (-CC3 + CC2*(1 + CC3))*CC4)*CC5*
      I12 +  CC2*I21 +
    CC2*CC5*I22 + (
        1 - CC5 + CC3*(-1 + CC4*(1 + CC5)) +
          CC2*(CC5 - CC4*(1 + CC5) + CC3*(1 - CC4*(1 + CC5))))*CC6*
      I9 + (C2*C3*I20*S2*S44)/2. +
    CC5*I10*(CC3 - CC2*CC3 + C2*C3*S2*S44) + (
        I5*(C4*S33 - C4*CC2*S33 + 2*C2*S2*S3*S4)*S55)/8. +
    I24*(2*C4*C6 - 2*C5*S4*S6 - S22*S3*S5*S6 +
          C2*C3*S2*(2*C6*S4 + 2*C4*C5*S6) + CC2*(-2*C4*C6 + 2*C5*S4*S6)) +
    CC3*I19*SS2 + 2*I23*(C2*C3*S2*S4 + C4*SS2) +
    I6*(2*C6 + (C5*(C3*C44*S22 - 2*C4*S4 + S44) + 2*C3*S3*S4*S5)*S6 +
          C2*S2*(2*C3*C6*S44 - 2*C4*S3*S5*S6) +
          CC3*(-(C5*S44*S6) - 2*C6*SS4) +
          CC2*(-2*C6*CC4 + 2*S4*(C4*C5 - C3*S3*S5)*S6 +
                CC3*(C5*S44*S6 + 2*C6*SS4))) + (
        I4*(-(C4*C66*S33*S55) + 2*C3*C44*C5*S22*S66 - 4*C4*C5*S4*S66 +
              2*C5*S44*S66 + 4*C3*S3*S4*S5*S66 +
              2*C2*S2*(
                  C3*C66*(1 + CC5)*S44 - S3*(C66*S4*S55 + 2*C4*S5*S66)) +
              2*CC3*(-(C5*S44*S66) - C66*SS5) +
              CC2*(C4*C66*S33*S55 - 8*C3*C6*S3*S4*S5*S6 + 4*C4*C5*S4*S66 -
                    2*C66*SS5 + 2*CC3*(2*C5*C6*S44*S6 + C66*SS5))))/8.;
a[1][2]=
  a[2][1]=(CC4*I11*S2*S33)/2. - (I19*S2*S33)/2. -
    C2*I23*S3*S4 + (C2*I11*S3*S44)/2. +
    I9*(-(C2*(1 + CC5)*CC6*S3*S44)/
            2. + (CC6*S2*((2 - CC5 - CC4*(1 + CC5))*S33 - C4*CC3*S55))/2.) + (
        I12*(C2*CC5*S3*S44 + S2*((1 + CC4)*CC5*S33 + C4*CC3*S55)))/2. +
    C2*I24*(-(C3*S5*S6) + S3*(-(C6*S4) - C4*C5*S6)) +
    I6*(S2*(C6*S33 - C6*CC4*S33 + (C5*S33*S44*S6)/2. + C33*S4*S5*S6) +
          C2*(-(C3*C4*S5*S6) + S3*(-(C6*S44) - C44*C5*S6))) + (
        I5*S55*(C2*C3*S4 - C4*S2*SS3))/
      8. + (I4*(
            C2*(-2*C44*C5*S3*S66 + C3*(-(C66*S4*S55) - 2*C4*S5*S66)) +
              S2*(-S33 + 4*C33*C6*S4*S5*S6 + C5*S33*S44*S66 +
                    C4*C66*S55*SS3)))/8.;
a[1][3]=a[3][1]=
  C2*CC4*I11 + C2*CC4*CC5*I12 + C2*CC5*I14 + C2*I8 +
    C2*(1 - CC4*(1 + CC5))*CC6*I9 +
    C3*I23*S2*S4 - (C3*I17*S2*S44)/2. + (I5*S2*(-(C3*CC5*S44) + S3*S4*S55))/
      8. + I24*S2*(-(S3*S5*S6) + C3*(C6*S4 + C4*C5*S6)) + (
        I4*(2*C2*(-C66 + C66*CC5 + 2*C5*C6*S44*S6) +
              S2*(C3*(C66*(1 + CC5)*S44 + 4*C44*C5*C6*S6) -
                    S3*(C66*S4*S55 + 4*C4*C6*S5*S6))))/8. +
    I6*(S2*(-(C4*S3*S5*S6) + C3*(2*C4*C6*S4 + C44*C5*S6)) +
          C2*(C5*S44*S6 + 2*C6*SS4));
a[1][4]=
  a[4][1]=-(CC5*I10*S2*S3) +
    C4*I23*S2*S3 + (I7*S2*S3)/8. + (I5*(C2*S4*S55 + S2*(-S3 + C3*C4*S55)))/
      8. + I24*S2*S3*(C4*C6 - C5*S4*S6) +
    I6*(-(C2*C4*S5*S6) + S2*(2*C6*S3 + C3*S4*S5*S6)) + (
        I4*(-(C2*(C66*S4*S55 + 4*C4*C6*S5*S6)) +
              S2*(C3*(-(C4*C66*S55) + 4*C6*S4*S5*S6) + 2*C66*S3*SS5)))/8.;
a[1][5]=
  a[5][1]=(I3*(C2*C4 - C3*S2*S4))/4. +
    I24*S2*(C3*C5*S6 - C4*S3*S5*S6) +
    I6*(C2*C5*S4*S6 + S2*(C3*C4*C5*S6 - S3*S5*S6)) + (
        I4*(C2*(-(C4*C66) + 2*C5*C6*S4*S6) +
              S2*(-2*C6*S3*S5*S6 + C3*(C66*S4 + C4*C5*S66))))/4.;
a[1][6]=
  a[6][1]=(I1*(C2*S4*S5 + S2*(C5*S3 + C3*C4*S5)))/2. +
    I6*(C2*C6*S4*S5 + S2*(C5*C6*S3 + C3*C4*C6*S5)) +
    I24*S2*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6));
a[1][7]=a[7][1]=
  I2*(C2*(C4*C6 - C5*S4*S6) + S2*(S3*S5*S6 + C3*(-(C6*S4) - C4*C5*S6)));

a[2][2]=Im2+
  I13 + (1 - CC3*(1 + CC4))*CC5*I14 + CC4*I15 + CC3*I16 + CC3*CC4*I17 +
    2*C4*I23 +
    I24*(2*C4*C6 - 2*C5*S4*S6) + (
        I4*(-C66 + C66*CC4*(1 + CC5) +
              CC3*(2*C66 - C66*CC5 - C66*CC4*(1 + CC5)) + (C4*C66*S33*S55)/
                2. - S33*S4*S5*S66 - C5*S44*S66*SS3))/
      4. + (I5*(-(C4*S33*S55) + C55*SS4))/8. +
    I6*(2*C6*CC4 + S4*(-2*C4*C5 - S33*S5)*S6 + CC3*(C5*S44*S6 + 2*C6*SS4));
a[2][3]=
  a[3][
    2]=-(I23*S3*S4) + (I11*S3*S44)/2. - (CC5*I14*S3*S44)/
      2. - (CC6*I9*S3*S44)/2. + (C3*I5*S4*S55)/8. -
    I24*(C3*S5*S6 + S3*(C6*S4 + C4*C5*S6)) -
    I6*(C3*C4*S5*S6 + S3*(C6*S44 + C44*C5*S6)) - (
        I4*(S3*(C66*CC5*S44 + 2*C44*C5*S66) + C3*(C66*S4*S55 + 2*C4*S5*S66)))/
      8.;
a[2][4]=a[4][2]=
  C3*C4*I23 + (C3*I7)/8. + (I12*(C3*C55 - C4*S3*S55))/2. +
    C3*I24*(C4*C6 - C5*S4*S6) +
    I6*(2*C3*C6 - S3*S4*S5*S6) + (
        I4*(C3*(1 + 2*C66 - 4*CC5*CC6) + 2*S3*(C4*CC6*S55 - 2*C6*S4*S5*S6)))/
      8.;
a[2][5]=
  a[5][2]=(I3*S3*S4)/4. - I6*(C4*C5*S3*S6 + C3*S5*S6) -
    I24*(C5*S3*S6 + C3*C4*S5*S6) - (
        I4*(2*C3*C6*S5*S6 + S3*(C66*S4 + C4*C5*S66)))/4.;
a[2][6]=
  a[6][2]=(I1*(C3*C5 - C4*S3*S5))/2. + I6*(C3*C5*C6 - C4*C6*S3*S5) +
    I24*(-(C6*S3*S5) + C3*(C4*C5*C6 - S4*S6));
a[2][7]=a[7][2]=I2*(C3*S5*S6 + S3*(C6*S4 + C4*C5*S6));
 

a[3][3]=Im3+I8 +
  CC5*I10 + CC4*I11 + CC4*CC5*I12 +  (1 - CC4*(1 + CC5))*CC6*I9 +
    I6*(C5*S44*S6 + 2*C6*SS4) + (I4*(2*C5*C6*S44*S6 - C66*SS5))/4.;
a[3][4]=
  a[4][3]=(I5*S4*S55)/8. -
    C4*I6*S5*S6 - (I4*(C66*S4*S55 + 4*C4*C6*S5*S6))/8.;
a[3][5]=
  a[5][3]=(C4*I3)/4. +
    C5*I6*S4*S6 + (I4*(-(C4*C66) + 2*C5*C6*S4*S6))/4.;
a[3][6]=a[6][3]=((I1 + 2*C6*I6)*S4*S5)/2.;
a[3][7]=a[7][3]=I2*(C4*C6 - C5*S4*S6);
 

a[4][4]=Im4+(I7 +C55*I5 + 16*C6*I6 +  2*C66*I4*SS5)/8.;
a[4][5]=a[5][4]=-((C6*I4 + 2*I6)*S5*S6)/2.;
a[4][6]=a[6][4]=(C5*(I1 + 2*C6*I6))/2.;
a[4][7]=a[7][4]=I2*S5*S6;
 

a[5][5]=Im5+(I3 - C66*I4)/4.;
a[5][6]=a[6][5]=0;
a[5][7]=a[7][5]=C6*I2;
a[6][6]=Im6+I1/2.;
a[6][7]=a[7][6]=0;
a[7][7]=Im7+I2;



The lumped inertias of the Inertia Matrix whose numerical values can be derived by experiments:     up

I1=Ixx7 + 2*Iyy6 + Iyy7 + 2*(m6*pow(rz6,2) + m7*pow(d7 + rz7,2));
I2=Izz7;
I3=2*Ixx6 + Ixx7 + 4*Iyy5 + Iyy7 +
    2*(Izz6 + Izz7 + m6*pow(rz6,2) + m7*pow(d7 + rz7,2));
I4=2*Ixx6 + Ixx7 + Iyy7 +
    2*(-Izz6 - Izz7 + m6*pow(rz6,2) + m7*pow(d7 + rz7,2));
I5=-4*Ixx5 - 2*Ixx6 + Ixx7 + 4*Iyy6 + Iyy7 +
    2*(2*Izz5 - Izz6 - Izz7 + m6*pow(rz6,2) + m7*pow(d7 + rz7,2));
I6=d5*(m6*rz6 + m7*(d7 + rz7));
I7=4*Ixx5 + 2*Ixx6 + 3*Ixx7 + 8*Iyy4 + 4*Iyy6 + 3*Iyy7 +
    2*(2*Izz5 + Izz6 + Izz7 + 4*pow(d5,2)*m5 + 4*pow(d5,2)*m6 +
          4*pow(d5,2)*m7 + 3*pow(d7,2)*m7 - 8*d5*m5*ry5 +
          4*m5*pow(ry5,2) + 4*m4*pow(rz4,2) + 3*m6*pow(rz6,2) +
          6*d7*m7*rz7 + 3*m7*pow(rz7,2));
I8=(4*Ixx4 - 2*Ixx6 + Ixx7 + 4*Iyy3 + 4*Iyy6 + Iyy7 +
        2*(2*Izz5 + Izz6 + Izz7 + 2*pow(d5,2)*m5 + 2*pow(d5,2)*m6 +
              2*pow(d5,2)*m7 + pow(d7,2)*m7 - 4*d5*m5*ry5 +
              2*m5*pow(ry5,2) + 2*m4*pow(rz4,2) + m6*pow(rz6,2) +
              2*d7*m7*rz7 + m7*pow(rz7,2)))/4.;
I9=Ixx6 + (
        Ixx7 + Iyy7 +
          2*(-Izz6 - Izz7 + m6*pow(rz6,2) + m7*pow(d7 + rz7,2)))/2.;
I10=(4*Ixx5 + 2*Ixx6 - Ixx7 - 4*Iyy6 - Iyy7 -
        2*(2*Izz5 - Izz6 - Izz7 + m6*pow(rz6,2) + m7*pow(d7 + rz7,2)))/4.;
I11=-Ixx4 + Ixx6 + Iyy5 - Iyy6 + Izz4 - Izz5 -
    pow(d5,2)*(m5 + m6 + m7) + 2*d5*m5*ry5 - m5*pow(ry5,2) -
    m4*pow(rz4,2);
I12=-Ixx5 + Ixx7/2. + Iyy6 + Iyy7/2. + Izz5 - Izz6 - Izz7 +
    m6*pow(rz6,2) + m7*pow(d7 + rz7,2);
I13=Ixx3 + (-4*Ixx5 + 2*Ixx6 + 3*Ixx7 + 8*Iyy2 + 8*Iyy5 + 4*Iyy6 +
          3*Iyy7 +
          2*(4*Izz4 + 2*Izz5 + Izz6 + Izz7 + 4*pow(d3,2)*m3 +
                4*pow(d3,2)*m4 + 4*pow(d3,2)*m5 + 4*pow(d3,2)*m6 +
                4*pow(d3,2)*m7 + 3*pow(d7,2)*m7 - 8*d3*m3*ry3 +
                4*m3*pow(ry3,2) + 4*m2*pow(rz2,2) + 3*m6*pow(rz6,2) +
                6*d7*m7*rz7 + 3*m7*pow(rz7,2)))/8.;
I14=(4*Ixx5 + 2*Ixx6 - Ixx7 - 4*Iyy6 - Iyy7 -
        2*(2*Izz5 - Izz6 - Izz7 + m6*pow(rz6,2) + m7*pow(d7 + rz7,2)))/4.;
I15=(8*Ixx4 + 4*Ixx5 - 2*Ixx6 + Ixx7 - 8*Iyy5 + 4*Iyy6 + Iyy7 +
        2*(-4*Izz4 + 2*Izz5 - Izz6 - Izz7 + 4*pow(d5,2)*m5 +
              4*pow(d5,2)*m6 + 4*pow(d5,2)*m7 + pow(d7,2)*m7 -
              8*d5*m5*ry5 + 4*m5*pow(ry5,2) + 4*m4*pow(rz4,2) +
              m6*pow(rz6,2) + 2*d7*m7*rz7 + m7*pow(rz7,2)))/8.;
I16=-Ixx3 + Ixx5 + Iyy4 - Iyy5 + Izz3 - Izz4 +
    pow(d5,2)*(m5 + m6 + m7) - 2*d5*m5*ry5 + m5*pow(ry5,2) +
    m4*pow(rz4,2);
I17=(-4*Ixx4 + 2*Ixx6 - Ixx7 + 4*Iyy5 - 4*Iyy6 - Iyy7 + 4*Izz4 - 4*Izz5 +
        2*Izz6 + 2*Izz7 - 4*pow(d5,2)*m5 - 4*pow(d5,2)*m6 -
        4*pow(d5,2)*m7 - 2*pow(d7,2)*m7 + 8*d5*m5*ry5 -
        4*m5*pow(ry5,2) - 4*m4*pow(rz4,2) - 2*m6*pow(rz6,2) -
        4*d7*m7*rz7 - 2*m7*pow(rz7,2))/4.;
I18=Ixx2 + Ixx5 + Iyy1 + Iyy4 + Izz3 + Izz6 + Izz7 + pow(d3,2)*m3 +
    pow(d3,2)*m4 + pow(d3,2)*m5 + pow(d5,2)*m5 + pow(d3,2)*m6 +
    pow(d5,2)*m6 + pow(d3,2)*m7 + pow(d5,2)*m7 - 2*d3*m3*ry3 +
    m3*pow(ry3,2) - 2*d5*m5*ry5 + m5*pow(ry5,2) + m2*pow(rz2,2) +
    m4*pow(rz4,2);
I19=(4*Ixx3 - 4*Ixx5 + 2*Ixx6 + Ixx7 - 4*Iyy4 + 4*Iyy5 + Iyy7 -
          2*(2*Izz3 - 2*Izz4 + Izz6 + Izz7))/
      4. + (-2*pow(d5,2)*(m5 + m6 + m7) + 4*d5*m5*ry5 - 2*m5*pow(ry5,2) -
          2*m4*pow(rz4,2) + m6*pow(rz6,2) + m7*pow(d7 + rz7,2))/2.;
I20=(4*Ixx4 - 2*Ixx6 + Ixx7 - 4*Iyy5 + 4*Iyy6 + Iyy7 +
        2*(-2*Izz4 + 2*Izz5 - Izz6 - Izz7 + 2*pow(d5,2)*m5 +
              2*pow(d5,2)*m6 + 2*pow(d5,2)*m7 + pow(d7,2)*m7 -
              4*d5*m5*ry5 + 2*m5*pow(ry5,2) + 2*m4*pow(rz4,2) +
              m6*pow(rz6,2) + 2*d7*m7*rz7 + m7*pow(rz7,2)))/2.;
I21=(-4*Ixx2 + 4*Ixx4 - 4*Ixx5 - 2*Ixx6 + Ixx7 + 4*Iyy3 - 4*Iyy4 +
        4*Iyy6 + Iyy7 -
        2*(-2*Izz2 + 2*Izz3 - 2*Izz5 + Izz6 + Izz7 + 2*pow(d3,2)*m3 +
              2*pow(d3,2)*m4 + 2*pow(d3,2)*m5 + 2*pow(d3,2)*m6 +
              2*pow(d3,2)*m7 - pow(d7,2)*m7 - 4*d3*m3*ry3 +
              2*m3*pow(ry3,2) + 2*m2*pow(rz2,2) - m6*pow(rz6,2) -
              2*d7*m7*rz7 - m7*pow(rz7,2)))/4.;
I22=(8*Ixx5 + 2*Ixx6 - 3*Ixx7 - 8*Iyy6 - 3*Iyy7 -
        2*(4*Izz5 +
              3*(-Izz6 - Izz7 + m6*pow(rz6,2) + m7*pow(d7 + rz7,2))))/4.;
I23=d3*(d5*(m5 + m6 + m7) - m5*ry5 + m4*rz4);
I24=d3*(m6*rz6 + m7*(d7 + rz7));



The Coriolis and centrifugal terms (the lumped inertias found here are the same as the lumped inertias found in the Inertia Matrix):    up

h[1][1][1]=0;
h[1][1][2]=
  h[1][2][1]=(-2*C2*(1 + CC3)*CC4*I11*S2 - 2*C2*(1 + CC3)*CC4*CC5*I12*S2 +
        2*C2*CC3*I19*S2 - 2*C2*I21*S2 - 2*C2*CC5*I22*S2 -
        2*C2*(CC5 - CC4*(1 + CC5) + CC3*(1 - CC4*(1 + CC5)))*CC6*I9*
          S2 + (C3*CC2*I20*S44)/2. - (C3*I20*S44*SS2)/2. +
        2*I23*(2*C2*C4*S2 + C3*CC2*S4 - C3*S4*SS2) + (
            I5*S55*(2*C2*C4*S2*S33 + 2*CC2*S3*S4 - 2*S3*S4*SS2))/8. +
        CC5*I10*(2*C2*CC3*S2 + C3*CC2*S44 - C3*S44*SS2) +
        I24*(-2*C22*S3*S5*S6 + C3*CC2*(2*C6*S4 + 2*C4*C5*S6) -
              2*C2*S2*(-2*C4*C6 + 2*C5*S4*S6) -
              C3*(2*C6*S4 + 2*C4*C5*S6)*SS2) +
        I6*(2*C22*C3*C44*C5*S6 +
              CC2*(2*C3*C6*S44 - 2*C4*S3*S5*S6) - (
                  2*C3*C6*S44 - 2*C4*S3*S5*S6)*SS2 -
              2*C2*S2*(-2*C6*CC4 + 2*S4*(C4*C5 - C3*S3*S5)*S6 +
                    CC3*(C5*S44*S6 + 2*C6*SS4))) + (
            I4*(4*C22*C3*C44*C5*S66 +
                  2*CC2*(C3*C66*(1 + CC5)*S44 -
                        S3*(C66*S4*S55 + 2*C4*S5*S66)) -
                  2*(C3*C66*(1 + CC5)*S44 - S3*(C66*S4*S55 + 2*C4*S5*S66))*
                    SS2 - 2*C2*
                    S2*(C4*C66*S33*S55 - 8*C3*C6*S3*S4*S5*S6 +
                        4*C4*C5*S4*S66 - 2*C66*SS5 +
                        2*CC3*(2*C5*C6*S44*S6 + C66*SS5))))/8.)/2.;
h[1][1][3]=
  h[1][3][1]=(
      CC4*I11*(2*C3*S3 - 2*C3*CC2*S3) + CC4*CC5*I12*(2*C3*S3 - 2*C3*CC2*S3) +
        CC6*I9*(-2*C3*CC2*(1 - CC4*(1 + CC5))*S3 -
              2*C3*(-1 + CC4*(1 + CC5))*S3) -
        2*C2*I23*S2*S3*S4 - (C2*I20*S2*S3*S44)/2. +
        CC5*I10*(-2*C3*S3 + 2*C3*CC2*S3 - C2*S2*S3*S44) + (
            I5*(2*C33*C4 - 2*C33*C4*CC2 + 2*C2*C3*S2*S4)*S55)/8. +
        I24*(-(C3*S22*S5*S6) - C2*S2*S3*(2*C6*S4 + 2*C4*C5*S6)) -
        2*C3*I19*S3*SS2 +
        I6*(C2*S2*(-2*C6*S3*S44 - 2*C3*C4*S5*S6) +
              S6*(-(C44*C5*S22*S3) + 2*CC3*S4*S5 - 2*S4*S5*SS3) -
              2*C3*S3*(-(C5*S44*S6) - 2*C6*SS4) +
              CC2*(2*S4*S6*(-(CC3*S5) + S5*SS3) -
                    2*C3*S3*(C5*S44*S6 + 2*C6*SS4))) + (
            I4*(-2*C33*C4*C66*S55 - 2*C44*C5*S22*S3*S66 + 4*CC3*S4*S5*S66 +
                  2*C2*S2*(-(C66*(1 + CC5)*S3*S44) -
                        C3*(C66*S4*S55 + 2*C4*S5*S66)) - 4*S4*S5*S66*SS3 -
                  4*C3*S3*(-(C5*S44*S66) - C66*SS5) +
                  CC2*(2*C33*C4*C66*S55 - 8*C6*CC3*S4*S5*S6 +
                        8*C6*S4*S5*S6*SS3 -
                        4*C3*S3*(2*C5*C6*S44*S6 + C66*SS5))))/8.)/2.;
h[1][1][4]=
  h[1][4][1]=(
      2*C2*C3*C44*CC5*I10*S2 + C2*C3*C44*I20*S2 -
        2*C4*(-CC3 + CC2*(1 + CC3))*I11*S4 -
        2*C4*(-CC3 + CC2*(1 + CC3))*CC5*I12*S4 +
        CC6*I9*(-2*C4*CC3*(1 + CC5)*S4 +
              CC2*(2*C4*(1 + CC5)*S4 + 2*C4*CC3*(1 + CC5)*S4)) + (
            I5*(2*C2*C4*S2*S3 - S33*S4 + CC2*S33*S4)*S55)/8. +
        I24*(-2*C6*S4 - 2*C4*C5*S6 + CC2*(2*C6*S4 + 2*C4*C5*S6) +
              C2*C3*S2*(2*C4*C6 - 2*C5*S4*S6)) +
        2*I23*(C2*C3*C4*S2 - S4*SS2) + (
            I4*(C66*S33*S4*S55 + 4*C44*C5*S66 - 4*C44*C5*CC3*S66 -
                  4*C5*CC4*S66 - 4*C3*C5*S22*S44*S66 + 4*C3*C4*S3*S5*S66 +
                  2*C2*S2*(
                      2*C3*C44*C66*(1 + CC5) -
                        S3*(C4*C66*S55 - 2*S4*S5*S66)) + 4*C5*S66*SS4 +
                  CC2*(-(C66*S33*S4*S55) + 8*C44*C5*C6*CC3*S6 -
                        8*C3*C4*C6*S3*S5*S6 + 4*C5*CC4*S66 - 4*C5*S66*SS4)))/
          8. + I6*(
            CC3*(-4*C4*C6*S4 - 2*C44*C5*S6) +
              C2*S2*(4*C3*C44*C6 + 2*S3*S4*S5*S6) +
              CC2*(4*C4*C6*S4 + 2*C4*(C4*C5 - C3*S3*S5)*S6 +
                    CC3*(4*C4*C6*S4 + 2*C44*C5*S6) - 2*C5*S6*SS4) +
              S6*(2*C3*C4*S3*S5 +
                    C5*(2*C44 - 2*CC4 - 2*C3*S22*S44 + 2*SS4))))/2.;
h[1][1][5]=
  h[1][5][1]=((C55*I5*(C4*S33 - C4*CC2*S33 + 2*C2*S2*S3*S4))/4. -
        2*C5*(1 + (-CC3 + CC2*(1 + CC3))*CC4)*I12*S5 - 2*C5*CC2*I22*S5 -
        2*C5*I10*(CC3 - CC2*CC3 + C2*C3*S2*S44)*S5 +
        CC6*I9*(2*C5*S5 - 2*C5*CC3*CC4*S5 +
              CC2*(-2*C5*S5 + 2*C5*CC4*S5 + 2*C5*CC3*CC4*S5)) +
        I24*(-(C5*S22*S3*S6) - 2*C2*C3*C4*S2*S5*S6 + 2*S4*S5*S6 -
              2*CC2*S4*S5*S6) +
        I6*(-2*C2*C4*C5*S2*S3*S6 +
              CC3*S44*S5*
                S6 + (2*C3*C5*S3*S4 - (C3*C44*S22 - 2*C4*S4 + S44)*S5)*S6 +
              CC2*(-(CC3*S44*S5*S6) + 2*S4*(-(C3*C5*S3) - C4*S5)*S6)) + (
            I4*(-2*C4*C55*C66*S33 + 4*C3*C5*S3*S4*S66 - 2*C3*C44*S22*S5*S66 +
                  4*C4*S4*S5*S66 - 2*S44*S5*S66 +
                  CC2*(2*C4*C55*C66*S33 - 4*C5*C66*S5 - 8*C3*C5*C6*S3*S4*S6 +
                        2*CC3*(2*C5*C66*S5 - 2*C6*S44*S5*S6) -
                        4*C4*S4*S5*S66) + 2*CC3*(-2*C5*C66*S5 + S44*S5*S66) +
                  2*C2*S2*(-2*C3*C5*C66*S44*S5 -
                        S3*(2*C55*C66*S4 + 2*C4*C5*S66))))/8.)/2.;
h[1][1][6]=
  h[1][6][1]=(-2*
          C6*(1 - CC5 + CC3*(-1 + CC4*(1 + CC5)) +
              CC2*(CC5 - CC4*(1 + CC5) + CC3*(1 - CC4*(1 + CC5))))*I9*S6 +
        I24*(-2*C5*C6*S4 - C6*S22*S3*S5 - 2*C4*S6 +
              CC2*(2*C5*C6*S4 + 2*C4*S6) + C2*C3*S2*(2*C4*C5*C6 - 2*S4*S6)) +
        I6*(C6*(C5*(C3*C44*S22 - 2*C4*S4 + S44) + 2*C3*S3*S4*S5) - 2*S6 +
              C2*S2*(-2*C4*C6*S3*S5 - 2*C3*S44*S6) +
              CC3*(-(C5*C6*S44) + 2*S6*SS4) +
              CC2*(2*C6*S4*(C4*C5 - C3*S3*S5) + 2*CC4*S6 +
                    CC3*(C5*C6*S44 - 2*S6*SS4))) + (
            I4*(4*C3*C44*C5*C66*S22 - 8*C4*C5*C66*S4 + 4*C5*C66*S44 +
                  8*C3*C66*S3*S4*S5 + 2*C4*S33*S55*S66 +
                  2*C2*S2*(-2*C3*(1 + CC5)*S44*S66 -
                        S3*(4*C4*C66*S5 - 2*S4*S55*S66)) +
                  2*CC3*(-2*C5*C66*S44 + 2*S66*SS5) +
                  CC2*(8*C4*C5*C66*S4 - 8*C3*CC6*S3*S4*S5 -
                        2*C4*S33*S55*S66 + 4*S66*SS5 + 8*C3*S3*S4*S5*SS6 +
                        2*CC3*(2*C5*CC6*S44 - 2*S66*SS5 - 2*C5*S44*SS6))))/
          8.)/2.;
h[1][1][7]=h[1][7][1]=0;
h[1][2][2]=(
      C2*CC4*I11*S33 - C2*I19*S33 + 2*I23*S2*S3*S4 - I11*S2*S3*S44 +
        2*I9*(((1 + CC5)*CC6*S2*S3*S44)/
                2. + (C2*CC6*((2 - CC5 - CC4*(1 + CC5))*S33 - C4*CC3*S55))/
                2.) + I12*(-(CC5*S2*S3*S44) +
              C2*((1 + CC4)*CC5*S33 + C4*CC3*S55)) -
        2*I24*S2*(-(C3*S5*S6) + S3*(-(C6*S4) - C4*C5*S6)) +
        2*I6*(C2*(C6*S33 - C6*CC4*S33 + (C5*S33*S44*S6)/2. + C33*S4*S5*S6) -
              S2*(-(C3*C4*S5*S6) + S3*(-(C6*S44) - C44*C5*S6))) + (
            I5*S55*(-(C3*S2*S4) - C2*C4*SS3))/
          4. + (I4*(-(
                      S2*(-2*C44*C5*S3*S66 +
                            C3*(-(C66*S4*S55) - 2*C4*S5*S66))) +
                  C2*(-S33 + 4*C33*C6*S4*S5*S6 + C5*S33*S44*S66 +
                        C4*C66*S55*SS3)))/4.)/2.;
h[1][2][3]=
  h[1][3][2]=(-(CC4*I11*S2) + C33*CC4*I11*S2 - CC4*CC5*I12*S2 - CC5*I14*S2 -
        C33*I19*S2 -
        I8*S2 - (1 - CC4*(1 + CC5))*CC6*I9*S2 + (C2*C3*I11*S44)/
          2. - (C2*C3*I17*S44)/2. + (I5*(-2*C3*C4*S2*S3 - C2*S3*S4)*S55)/
          8. + (C2*I5*(-(C3*CC5*S44) + S3*S4*S55))/
          8. + (I12*(
                C2*C3*CC5*S44 + S2*(2*C33*(1 + CC4)*CC5 - 2*C3*C4*S3*S55)))/
          2. + I9*(-(C2*C3*(1 + CC5)*CC6*S44)/
                2. + (CC6*
                    S2*(2*C33*(2 - CC5 - CC4*(1 + CC5)) + 2*C3*C4*S3*S55))/
                2.) + C2*I24*(S3*S5*S6 + C3*(-(C6*S4) - C4*C5*S6)) +
        C2*I24*(-(S3*S5*S6) + C3*(C6*S4 + C4*C5*S6)) +
        I6*(S2*(2*C33*C6 - 2*C33*C6*CC4 + C33*C5*S44*S6 - 2*S33*S4*S5*S6) +
              C2*(C4*S3*S5*S6 + C3*(-(C6*S44) - C44*C5*S6))) + (
            I4*(-2*S2*(-C66 + C66*CC5 + 2*C5*C6*S44*S6) +
                  C2*(C3*(C66*(1 + CC5)*S44 + 4*C44*C5*C6*S6) -
                        S3*(C66*S4*S55 + 4*C4*C6*S5*S6))))/
          8. + (I4*(
                S2*(-2*C33 + 2*C3*C4*C66*S3*S55 - 8*C6*S33*S4*S5*S6 +
                        2*C33*C5*S44*S66) +
                  C2*(-2*C3*C44*C5*S66 - S3*(-(C66*S4*S55) - 2*C4*S5*S66))))/
          8. + I6*(
            C2*(-(C4*S3*S5*S6) + C3*(2*C4*C6*S4 + C44*C5*S6)) -
              S2*(C5*S44*S6 + 2*C6*SS4)))/2.;
h[1][2][4]=
  h[1][4][2]=(-(C2*CC5*I10*S3) + C2*C44*I11*S3 + (C2*I7*S3)/8. -
        C4*I11*S2*S33*S4 + (I5*(-(S2*S4*S55) + C2*(-S3 + C3*C4*S55)))/
          8. + (I12*(2*C2*C44*CC5*S3 + S2*(-2*C4*CC5*S33*S4 - CC3*S4*S55)))/
          2. + I9*(-(C2*C44*(1 + CC5)*CC6*S3) + (
                  CC6*S2*(2*C4*(1 + CC5)*S33*S4 + CC3*S4*S55))/2.) +
        C2*I24*S3*(C4*C6 - C5*S4*S6) + C2*I24*S3*(-(C4*C6) + C5*S4*S6) +
        I6*(C4*S2*S5*S6 + C2*(2*C6*S3 + C3*S4*S5*S6)) +
        I6*(S2*(2*C4*C6*S33*S4 + C44*C5*S33*S6 + C33*C4*S5*S6) +
              C2*(C3*S4*S5*S6 + S3*(-2*C44*C6 + 2*C5*S44*S6))) + (
            I5*S55*(C2*C3*C4 + S2*S4*SS3))/
          8. + (I4*(
                C2*(4*C5*S3*S44*S66 + C3*(-(C4*C66*S55) + 2*S4*S5*S66)) +
                  S2*(4*C33*C4*C6*S5*S6 + 2*C44*C5*S33*S66 -
                        C66*S4*S55*SS3)))/
          8. + (I4*(
                S2*(C66*S4*S55 + 4*C4*C6*S5*S6) +
                  C2*(C3*(-(C4*C66*S55) + 4*C6*S4*S5*S6) + 2*C66*S3*SS5)))/
          8.)/2.;
h[1][2][5]=
  h[1][5][2]=((I3*(-(C4*S2) - C2*C3*S4))/
          4. + (I12*(-2*C2*C5*S3*S44*S5 +
                  S2*(2*C4*C55*CC3 - 2*C5*(1 + CC4)*S33*S5)))/2. +
        I9*(C2*C5*CC6*S3*S44*
                S5 + (CC6*S2*(-2*C4*C55*CC3 + S33*(2*C5*S5 + 2*C5*CC4*S5)))/
                2.) + C2*I24*(C3*C5*S6 - C4*S3*S5*S6) +
        C2*I24*(-(C3*C5*S6) + C4*S3*S5*S6) +
        I6*(-(C5*S2*S4*S6) + C2*(C3*C4*C5*S6 - S3*S5*S6)) +
        I6*(C2*(-(C3*C4*C5*S6) + C44*S3*S5*S6) +
              S2*(C33*C5*S4*S6 - (S33*S44*S5*S6)/2.)) + (
            I4*(-(S2*(-(C4*C66) + 2*C5*C6*S4*S6)) +
                  C2*(-2*C6*S3*S5*S6 + C3*(C66*S4 + C4*C5*S66))))/
          4. + (C55*I5*(C2*C3*S4 - C4*S2*SS3))/
          4. + (I4*(
                C2*(2*C44*S3*S5*S66 + C3*(-2*C55*C66*S4 - 2*C4*C5*S66)) +
                  S2*(4*C33*C5*C6*S4*S6 - S33*S44*S5*S66 +
                        2*C4*C55*C66*SS3)))/8.)/2.;
h[1][2][6]=
  h[1][6][2]=((I1*(-(S2*S4*S5) + C2*(C5*S3 + C3*C4*S5)))/2. +
        I6*(-(C6*S2*S4*S5) + C2*(C5*C6*S3 + C3*C4*C6*S5)) +
        I9*(C2*C6*(1 + CC5)*S3*S44*S6 -
              C6*S2*((2 - CC5 - CC4*(1 + CC5))*S33 - C4*CC3*S55)*S6) +
        C2*I24*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6)) +
        C2*I24*(-(C3*C6*S5) + S3*(-(C4*C5*C6) + S4*S6)) +
        I6*(S2*((C5*C6*S33*S44)/2. + C33*C6*S4*S5 - S33*S6 + CC4*S33*S6) +
              C2*(-(C3*C4*C6*S5) + S3*(-(C44*C5*C6) + S44*S6))) + (
            I4*(C2*(-4*C44*C5*C66*S3 + C3*(-4*C4*C66*S5 + 2*S4*S55*S66)) +
                  S2*(2*C5*C66*S33*S44 + 4*C33*CC6*S4*S5 - 2*C4*S55*S66*SS3 -
                        4*C33*S4*S5*SS6)))/8.)/2.;
h[1][2][7]=
  h[1][7][2]=(
      I2*(-(S2*(C4*C6 - C5*S4*S6)) +
            C2*(S3*S5*S6 + C3*(-(C6*S4) - C4*C5*S6))))/2.;
h[1][3][3]=(-2*I23*S2*S3*S4 +
        I17*S2*S3*S44 + (I5*S2*(CC5*S3*S44 + C3*S4*S55))/4. +
        2*I24*S2*(-(C3*S5*S6) - S3*(C6*S4 + C4*C5*S6)) +
        2*I6*S2*(-(C3*C4*S5*S6) - S3*(2*C4*C6*S4 + C44*C5*S6)) + (
            I4*S2*(-(S3*(C66*(1 + CC5)*S44 + 4*C44*C5*C6*S6)) -
                  C3*(C66*S4*S55 + 4*C4*C6*S5*S6)))/4.)/2.;
h[1][3][4]=
  h[1][4][3]=(-(C3*CC5*I10*S2) - C3*C44*I17*S2 +
        2*C3*C4*I23*S2 + (C3*I7*S2)/8. - 2*C2*C4*I11*S4 -
        2*C2*C4*CC5*I12*S4 +
        2*C2*C4*(1 + CC5)*CC6*I9*S4 + (I5*S2*(-C3 - C4*S3*S55))/
          8. + (I5*S2*(-2*C3*C44*CC5 + C4*S3*S55))/8. +
        2*C3*I24*S2*(C4*C6 - C5*S4*S6) +
        I6*S2*(2*C3*C6 - S3*S4*S5*S6) + (
            I4*(8*C2*C44*C5*C6*S6 +
                  S2*(C3*(2*C44*C66*(1 + CC5) - 8*C5*C6*S44*S6) -
                        S3*(C4*C66*S55 - 4*C6*S4*S5*S6))))/8. +
        I6*(C2*(4*C4*C6*S4 + 2*C44*C5*S6) +
              S2*(S3*S4*S5*S6 + C3*(2*C6*CC4 - 2*C5*S44*S6 - 2*C6*SS4))) + (
            I4*S2*(-(S3*(-(C4*C66*S55) + 4*C6*S4*S5*S6)) + 2*C3*C66*SS5))/8.)/
    2.;
h[1][3][5]=
  h[1][5][3]=((I3*S2*S3*S4)/4. - 2*C2*C5*CC4*I12*S5 - 2*C2*C5*I14*S5 +
        2*C2*C5*CC4*CC6*I9*S5 + (I5*S2*(2*C55*S3*S4 + 2*C3*C5*S44*S5))/8. +
        I6*S2*(-(C4*C5*S3*S6) - C3*S5*S6) +
        2*I24*S2*(-(C5*S3*S6) - C3*C4*S5*S6) +
        I6*(-(C2*S44*S5*S6) + S2*(-(C4*C5*S3*S6) - C3*C44*S5*S6)) + (
            I4*(2*C2*(-2*C5*C66*S5 - 2*C6*S44*S5*S6) +
                  S2*(-(S3*(2*C55*C66*S4 + 4*C4*C5*C6*S6)) +
                        C3*(-2*C5*C66*S44*S5 - 4*C44*C6*S5*S6))))/
          8. + (I4*S2*(-2*C3*C6*S5*S6 - S3*(C66*S4 + C4*C5*S66)))/4.)/2.;
h[1][3][6]=
  h[1][6][3]=((I1*S2*(C3*C5 - C4*S3*S5))/2. +
        I6*S2*(C3*C5*C6 - C4*C6*S3*S5) - 2*C2*C6*(1 - CC4*(1 + CC5))*I9*S6 +
        2*I24*S2*(-(C6*S3*S5) + C3*(C4*C5*C6 - S4*S6)) +
        I6*(S2*(-(C4*C6*S3*S5) + C3*(C44*C5*C6 - 2*C4*S4*S6)) +
              C2*(C5*C6*S44 - 2*S6*SS4)) + (
            I4*(2*C2*(2*C5*CC6*S44 + 2*S66 - 2*CC5*S66 - 2*C5*S44*SS6) +
                  S2*(C3*(4*C44*C5*CC6 - 2*(1 + CC5)*S44*S66 -
                              4*C44*C5*SS6) -
                        S3*(4*C4*CC6*S5 - 2*S4*S55*S66 - 4*C4*S5*SS6))))/8.)/
    2.;
h[1][3][7]=h[1][7][3]=(I2*S2*(C3*S5*S6 - S3*(-(C6*S4) - C4*C5*S6)))/2.;
h[1][4][4]=(-2*I23*S2*S3*S4 + (I5*(C2*C4*S55 - C3*S2*S4*S55))/4. +
        2*I24*S2*S3*(-(C6*S4) - C4*C5*S6) +
        2*I6*(C3*C4*S2*S5*S6 + C2*S4*S5*S6) + (
            I4*(C3*S2*(C66*S4*S55 + 4*C4*C6*S5*S6) -
                  C2*(C4*C66*S55 - 4*C6*S4*S5*S6)))/4.)/2.;
h[1][4][5]=
  h[1][5][4]=((I3*(-(C3*C4*S2) - C2*S4))/
          4. + (I5*(2*C3*C4*C55*S2 + 2*C2*C55*S4))/8. + 2*C5*I10*S2*S3*S5 +
        2*I24*S2*S3*S4*S5*S6 + I6*(C2*C4*C5*S6 - C3*C5*S2*S4*S6) +
        I6*(-(C2*C4*C5*S6) + C3*C5*S2*S4*S6) + (
            I4*(-(C2*(2*C55*C66*S4 + 4*C4*C5*C6*S6)) +
                  S2*(4*C5*C66*S3*S5 + C3*(-2*C4*C55*C66 + 4*C5*C6*S4*S6))))/
          8. + (I4*(
                C2*(C66*S4 + 2*C4*C5*C6*S6) + C3*S2*(C4*C66 - C5*S4*S66)))/
          4.)/2.;
h[1][4][6]=
  h[1][6][4]=((I1*(C2*C4*S5 - C3*S2*S4*S5))/2. +
        I6*(C2*C4*C6*S5 - C3*C6*S2*S4*S5) +
        2*I24*S2*S3*(-(C5*C6*S4) - C4*S6) +
        I6*(-(C2*C4*C6*S5) + S2*(C3*C6*S4*S5 - 2*S3*S6)) + (
            I4*(-(C2*(4*C4*CC6*S5 - 2*S4*S55*S66 - 4*C4*S5*SS6)) +
                  S2*(-4*S3*S66*SS5 +
                        C3*(4*CC6*S4*S5 + 2*C4*S55*S66 - 4*S4*S5*SS6))))/8.)/
    2.;
h[1][4][7]=
  h[1][7][4]=(I2*(C2*(-(C6*S4) - C4*C5*S6) + C3*S2*(-(C4*C6) + C5*S4*S6)))/2.;
h[1][5][5]=(
      2*I24*S2*(-(C4*C5*S3*S6) - C3*S5*S6) +
        2*I6*(-(C2*S4*S5*S6) + S2*(-(C5*S3*S6) - C3*C4*S5*S6)) + (
            I4*(-2*C2*C6*S4*S5*S6 + S2*(-2*C5*C6*S3*S6 - C3*C4*S5*S66)))/2.)/
    2.;
h[1][5][6]=
  h[1][6][5]=(
      2*I24*S2*(C3*C5*C6 - C4*C6*S3*S5) + (
            I1*(C2*C5*S4 + S2*(C3*C4*C5 - S3*S5)))/2. +
        2*I6*(C2*C5*C6*S4 + S2*(C3*C4*C5*C6 - C6*S3*S5)) + (
            I4*(C2*(2*C5*CC6*S4 + 2*C4*S66 - 2*C5*S4*SS6) +
                  S2*(-2*CC6*S3*S5 + C3*(2*C4*C5*C66 - 2*S4*S66) +
                        2*S3*S5*SS6)))/4.)/2.;
h[1][5][7]=h[1][7][5]=(I2*(C2*S4*S5*S6 + S2*(C5*S3*S6 + C3*C4*S5*S6)))/2.;
h[1][6][6]=(
      2*I24*S2*(-(C3*S5*S6) + S3*(-(C6*S4) - C4*C5*S6)) +
        2*I6*(-(C2*S4*S5*S6) + S2*(-(C5*S3*S6) - C3*C4*S5*S6)))/2.;
h[1][6][7]=
  h[1][7][6]=(
      I2*(C2*(-(C5*C6*S4) - C4*S6) +
            S2*(C6*S3*S5 + C3*(-(C4*C5*C6) + S4*S6))))/2.;
h[1][7][7]=0;
h[2][1][1]=(
      2*C2*(1 + CC3)*CC4*I11*S2 + 2*C2*(1 + CC3)*CC4*CC5*I12*S2 -
        2*C2*CC3*I19*S2 + 2*C2*I21*S2 + 2*C2*CC5*I22*S2 +
        2*C2*(CC5 - CC4*(1 + CC5) + CC3*(1 - CC4*(1 + CC5)))*CC6*I9*
          S2 - (C3*CC2*I20*S44)/2. + (C3*I20*S44*SS2)/2. -
        2*I23*(2*C2*C4*S2 + C3*CC2*S4 - C3*S4*SS2) - (
            I5*S55*(2*C2*C4*S2*S33 + 2*CC2*S3*S4 - 2*S3*S4*SS2))/8. -
        CC5*I10*(2*C2*CC3*S2 + C3*CC2*S44 - C3*S44*SS2) -
        I24*(-2*C22*S3*S5*S6 + C3*CC2*(2*C6*S4 + 2*C4*C5*S6) -
              2*C2*S2*(-2*C4*C6 + 2*C5*S4*S6) -
              C3*(2*C6*S4 + 2*C4*C5*S6)*SS2) -
        I6*(2*C22*C3*C44*C5*S6 +
              CC2*(2*C3*C6*S44 - 2*C4*S3*S5*S6) - (
                  2*C3*C6*S44 - 2*C4*S3*S5*S6)*SS2 -
              2*C2*S2*(-2*C6*CC4 + 2*S4*(C4*C5 - C3*S3*S5)*S6 +
                    CC3*(C5*S44*S6 + 2*C6*SS4))) - (
            I4*(4*C22*C3*C44*C5*S66 +
                  2*CC2*(C3*C66*(1 + CC5)*S44 -
                        S3*(C66*S4*S55 + 2*C4*S5*S66)) -
                  2*(C3*C66*(1 + CC5)*S44 - S3*(C66*S4*S55 + 2*C4*S5*S66))*
                    SS2 - 2*C2*
                    S2*(C4*C66*S33*S55 - 8*C3*C6*S3*S4*S5*S6 +
                        4*C4*C5*S4*S66 - 2*C66*SS5 +
                        2*CC3*(2*C5*C6*S44*S6 + C66*SS5))))/8.)/2.;
h[2][1][2]=h[2][2][1]=0;
h[2][1][3]=
  h[2][3][1]=(
      CC4*I11*S2 + C33*CC4*I11*S2 + CC4*CC5*I12*S2 + CC5*I14*S2 -
        C33*I19*S2 + I8*S2 + (1 - CC4*(1 + CC5))*CC6*I9*S2 -
        2*C2*C3*I23*S4 + (C2*C3*I11*S44)/2. + (C2*C3*I17*S44)/
          2. + (I5*(-2*C3*C4*S2*S3 - C2*S3*S4)*S55)/
          8. - (C2*I5*(-(C3*CC5*S44) + S3*S4*S55))/
          8. + (I12*(
                C2*C3*CC5*S44 + S2*(2*C33*(1 + CC4)*CC5 - 2*C3*C4*S3*S55)))/
          2. + I9*(-(C2*C3*(1 + CC5)*CC6*S44)/
                2. + (CC6*
                    S2*(2*C33*(2 - CC5 - CC4*(1 + CC5)) + 2*C3*C4*S3*S55))/
                2.) + C2*I24*(S3*S5*S6 + C3*(-(C6*S4) - C4*C5*S6)) -
        C2*I24*(-(S3*S5*S6) + C3*(C6*S4 + C4*C5*S6)) +
        I6*(S2*(2*C33*C6 - 2*C33*C6*CC4 + C33*C5*S44*S6 - 2*S33*S4*S5*S6) +
              C2*(C4*S3*S5*S6 + C3*(-(C6*S44) - C44*C5*S6))) - (
            I4*(-2*S2*(-C66 + C66*CC5 + 2*C5*C6*S44*S6) +
                  C2*(C3*(C66*(1 + CC5)*S44 + 4*C44*C5*C6*S6) -
                        S3*(C66*S4*S55 + 4*C4*C6*S5*S6))))/
          8. + (I4*(
                S2*(-2*C33 + 2*C3*C4*C66*S3*S55 - 8*C6*S33*S4*S5*S6 +
                        2*C33*C5*S44*S66) +
                  C2*(-2*C3*C44*C5*S66 - S3*(-(C66*S4*S55) - 2*C4*S5*S66))))/
          8. - I6*(
            C2*(-(C4*S3*S5*S6) + C3*(2*C4*C6*S4 + C44*C5*S6)) -
              S2*(C5*S44*S6 + 2*C6*SS4)))/2.;
h[2][1][4]=
  h[2][4][1]=(
      C2*CC5*I10*S3 + C2*C44*I11*S3 - 2*C2*C4*I23*S3 - (C2*I7*S3)/8. -
        C4*I11*S2*S33*S4 - (I5*(-(S2*S4*S55) + C2*(-S3 + C3*C4*S55)))/
          8. + (I12*(2*C2*C44*CC5*S3 + S2*(-2*C4*CC5*S33*S4 - CC3*S4*S55)))/
          2. + I9*(-(C2*C44*(1 + CC5)*CC6*S3) + (
                  CC6*S2*(2*C4*(1 + CC5)*S33*S4 + CC3*S4*S55))/2.) -
        C2*I24*S3*(C4*C6 - C5*S4*S6) + C2*I24*S3*(-(C4*C6) + C5*S4*S6) -
        I6*(C4*S2*S5*S6 + C2*(2*C6*S3 + C3*S4*S5*S6)) +
        I6*(S2*(2*C4*C6*S33*S4 + C44*C5*S33*S6 + C33*C4*S5*S6) +
              C2*(C3*S4*S5*S6 + S3*(-2*C44*C6 + 2*C5*S44*S6))) + (
            I5*S55*(C2*C3*C4 + S2*S4*SS3))/
          8. + (I4*(
                C2*(4*C5*S3*S44*S66 + C3*(-(C4*C66*S55) + 2*S4*S5*S66)) +
                  S2*(4*C33*C4*C6*S5*S6 + 2*C44*C5*S33*S66 -
                        C66*S4*S55*SS3)))/
          8. - (I4*(
                S2*(C66*S4*S55 + 4*C4*C6*S5*S6) +
                  C2*(C3*(-(C4*C66*S55) + 4*C6*S4*S5*S6) + 2*C66*S3*SS5)))/
          8.)/2.;
h[2][1][5]=
  h[2][5][1]=(-(I3*(-(C4*S2) - C2*C3*S4))/
          4. + (I12*(-2*C2*C5*S3*S44*S5 +
                  S2*(2*C4*C55*CC3 - 2*C5*(1 + CC4)*S33*S5)))/2. +
        I9*(C2*C5*CC6*S3*S44*
                S5 + (CC6*S2*(-2*C4*C55*CC3 + S33*(2*C5*S5 + 2*C5*CC4*S5)))/
                2.) - C2*I24*(C3*C5*S6 - C4*S3*S5*S6) +
        C2*I24*(-(C3*C5*S6) + C4*S3*S5*S6) -
        I6*(-(C5*S2*S4*S6) + C2*(C3*C4*C5*S6 - S3*S5*S6)) +
        I6*(C2*(-(C3*C4*C5*S6) + C44*S3*S5*S6) +
              S2*(C33*C5*S4*S6 - (S33*S44*S5*S6)/2.)) - (
            I4*(-(S2*(-(C4*C66) + 2*C5*C6*S4*S6)) +
                  C2*(-2*C6*S3*S5*S6 + C3*(C66*S4 + C4*C5*S66))))/
          4. + (C55*I5*(C2*C3*S4 - C4*S2*SS3))/
          4. + (I4*(
                C2*(2*C44*S3*S5*S66 + C3*(-2*C55*C66*S4 - 2*C4*C5*S66)) +
                  S2*(4*C33*C5*C6*S4*S6 - S33*S44*S5*S66 +
                        2*C4*C55*C66*SS3)))/8.)/2.;
h[2][1][6]=
  h[2][6][1]=(-(I1*(-(S2*S4*S5) + C2*(C5*S3 + C3*C4*S5)))/2. -
        I6*(-(C6*S2*S4*S5) + C2*(C5*C6*S3 + C3*C4*C6*S5)) +
        I9*(C2*C6*(1 + CC5)*S3*S44*S6 -
              C6*S2*((2 - CC5 - CC4*(1 + CC5))*S33 - C4*CC3*S55)*S6) -
        C2*I24*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6)) +
        C2*I24*(-(C3*C6*S5) + S3*(-(C4*C5*C6) + S4*S6)) +
        I6*(S2*((C5*C6*S33*S44)/2. + C33*C6*S4*S5 - S33*S6 + CC4*S33*S6) +
              C2*(-(C3*C4*C6*S5) + S3*(-(C44*C5*C6) + S44*S6))) + (
            I4*(C2*(-4*C44*C5*C66*S3 + C3*(-4*C4*C66*S5 + 2*S4*S55*S66)) +
                  S2*(2*C5*C66*S33*S44 + 4*C33*CC6*S4*S5 - 2*C4*S55*S66*SS3 -
                        4*C33*S4*S5*SS6)))/8.)/2.;
h[2][1][7]=
  h[2][7][1]=-(
        I2*(-(S2*(C4*C6 - C5*S4*S6)) +
              C2*(S3*S5*S6 + C3*(-(C6*S4) - C4*C5*S6))))/2.;
h[2][2][2]=0;
h[2][2][3]=
  h[2][3][2]=(
      2*C3*(1 + CC4)*CC5*I14*S3 - 2*C3*I16*S3 -
        2*C3*CC4*I17*S3 - (C33*C4*I5*S55)/
          4. + (I4*(-2*C3*(2*C66 - C66*CC5 - C66*CC4*(1 + CC5))*S3 +
                  C33*C4*C66*S55 - 2*C3*C5*S3*S44*S66 - 2*C33*S4*S5*S66))/
          4. + I6*(-2*C33*S4*S5*S6 - 2*C3*S3*(C5*S44*S6 + 2*C6*SS4)))/2.;
h[2][2][4]=
  h[2][4][2]=(
      2*C4*CC3*CC5*I14*S4 - 2*C4*I15*S4 - 2*C4*CC3*I17*S4 -
        2*I23*S4 + (I5*(2*C4*C55*S4 + S33*S4*S55))/8. +
        I24*(-2*C6*S4 - 2*C4*C5*S6) + (
            I4*(-2*C4*C66*(1 + CC5)*S4 +
                  2*C4*C66*CC3*(1 + CC5)*S4 - (C66*S33*S4*S55)/2. -
                  C4*S33*S5*S66 - 2*C44*C5*S66*SS3))/4. +
        I6*(-4*C4*C6*S4 + C4*(-2*C4*C5 - S33*S5)*S6 +
              CC3*(4*C4*C6*S4 + 2*C44*C5*S6) + 2*C5*S6*SS4))/2.;
h[2][2][5]=
  h[2][5][2]=(-2*C5*(1 - CC3*(1 + CC4))*I14*S5 + 2*I24*S4*S5*S6 +
        I6*(-(CC3*S44*S5*S6) + S4*(-(C5*S33) + 2*C4*S5)*S6) + (
            I4*(C4*C55*C66*S33 - 2*C5*C66*CC4*S5 +
                  CC3*(2*C5*C66*S5 + 2*C5*C66*CC4*S5) - C5*S33*S4*S66 +
                  S44*S5*S66*SS3))/4. + (I5*(-2*C4*C55*S33 - 2*S55*SS4))/8.)/
    2.;
h[2][2][6]=
  h[2][6][2]=(
      I24*(-2*C5*C6*S4 - 2*C4*S6) + (
            I4*(-2*C66*S33*S4*S5 + 2*S66 - 2*CC4*(1 + CC5)*S66 -
                  C4*S33*S55*S66 +
                  CC3*(-4*S66 + 2*CC5*S66 + 2*CC4*(1 + CC5)*S66) -
                  2*C5*C66*S44*SS3))/4. +
        I6*(C6*S4*(-2*C4*C5 - S33*S5) - 2*CC4*S6 +
              CC3*(C5*C6*S44 - 2*S6*SS4)))/2.;
h[2][2][7]=h[2][7][2]=0;
h[2][3][3]=(-2*C3*I23*S4 + C3*I11*S44 - C3*CC5*I14*S44 -
        C3*CC6*I9*S44 - (I5*S3*S4*S55)/4. -
        2*I24*(-(S3*S5*S6) + C3*(C6*S4 + C4*C5*S6)) -
        2*I6*(-(C4*S3*S5*S6) + C3*(C6*S44 + C44*C5*S6)) - (
            I4*(C3*(C66*CC5*S44 + 2*C44*C5*S66) -
                  S3*(C66*S4*S55 + 2*C4*S5*S66)))/4.)/2.;
h[2][3][4]=
  h[2][4][3]=(
      C44*I11*S3 - C44*CC5*I14*S3 - 2*C4*I23*S3 - (I7*S3)/8. -
        C44*CC6*I9*S3 + (C3*C4*I5*S55)/8. + (I12*(-(C55*S3) - C3*C4*S55))/
          2. - 2*I24*S3*(C4*C6 - C5*S4*S6) + I6*(-2*C6*S3 - C3*S4*S5*S6) -
        I6*(-(C3*S4*S5*S6) + S3*(2*C44*C6 - 2*C5*S44*S6)) + (
            I4*(-((1 + 2*C66 - 4*CC5*CC6)*S3) +
                  2*C3*(C4*CC6*S55 - 2*C6*S4*S5*S6)))/
          8. - (I4*(
                S3*(2*C44*C66*CC5 - 4*C5*S44*S66) +
                  C3*(C4*C66*S55 - 2*S4*S5*S66)))/8.)/2.;
h[2][3][5]=
  h[2][5][3]=((C3*I3*S4)/4. + (C3*C55*I5*S4)/4. + C5*I14*S3*S44*S5 -
        I6*(C3*C4*C5*S6 - S3*S5*S6) - 2*I24*(C3*C5*S6 - C4*S3*S5*S6) -
        I6*(C3*C4*C5*S6 - C44*S3*S5*S6) - (
            I4*(-2*C6*S3*S5*S6 + C3*(C66*S4 + C4*C5*S66)))/
          4. - (I4*(
                C3*(2*C55*C66*S4 + 2*C4*C5*S66) +
                  S3*(-2*C5*C66*S44*S5 - 2*C44*S5*S66)))/8.)/2.;
h[2][3][6]=
  h[2][6][3]=((I1*(-(C5*S3) - C3*C4*S5))/2. +
        I6*(-(C5*C6*S3) - C3*C4*C6*S5) + C6*I9*S3*S44*S6 +
        I24*(-(C3*C6*S5) - S3*(C4*C5*C6 - S4*S6)) -
        I24*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6)) -
        I6*(C3*C4*C6*S5 + S3*(C44*C5*C6 - S44*S6)) - (
            I4*(S3*(4*C44*C5*C66 - 2*CC5*S44*S66) +
                  C3*(4*C4*C66*S5 - 2*S4*S55*S66)))/8.)/2.;
h[2][3][7]=h[2][7][3]=(I2*(-(S3*S5*S6) + C3*(C6*S4 + C4*C5*S6)))/2.;
h[2][4][4]=(-2*C3*I23*S4 + I12*S3*S4*S55 - 2*C4*I6*S3*S5*S6 +
        2*C3*I24*(-(C6*S4) - C4*C5*S6) + (
            I4*S3*(-(CC6*S4*S55) - 2*C4*C6*S5*S6))/2.)/2.;
h[2][4][5]=
  h[2][5][4]=((C4*I3*S3)/4. + (I12*(-2*C4*C55*S3 - 2*C3*S55))/2. +
        2*C3*I24*S4*S5*
          S6 + (I4*(8*C3*C5*CC6*S5 + 2*S3*(2*C4*C55*CC6 - 2*C5*C6*S4*S6)))/
          8. - (I4*S3*(C4*C66 - C5*S4*S66))/4.)/2.;
h[2][4][6]=
  h[2][6][4]=((I1*S3*S4*S5)/2. + C6*I6*S3*S4*S5 +
        I6*(-(C6*S3*S4*S5) - 2*C3*S6) +
        2*C3*I24*(-(C5*C6*S4) - C4*S6) + (
            I4*(C3*(8*C6*CC5*S6 - 4*S66) +
                  2*S3*(-2*CC6*S4*S5 - 2*C4*C6*S55*S6 + 2*S4*S5*SS6)))/8.)/2.;
h[2][4][7]=h[2][7][4]=(I2*S3*(C4*C6 - C5*S4*S6))/2.;
h[2][5][5]=(-2*I24*(C3*C4*C5*S6 - S3*S5*S6) -
        2*I6*(C3*C5*S6 - C4*S3*S5*S6) - (I4*(2*C3*C5*C6*S6 - C4*S3*S5*S66))/
          2.)/2.;
h[2][5][6]=
  h[2][6][5]=((I1*(-(C4*C5*S3) - C3*S5))/2. +
        I6*(-(C4*C5*C6*S3) - C3*C6*S5) - I6*(C4*C5*C6*S3 + C3*C6*S5) +
        I24*(-(C5*C6*S3) - C3*C4*C6*S5) -
        I24*(C5*C6*S3 + C3*C4*C6*S5) - (
            I4*(2*C3*CC6*S5 + S3*(2*C4*C5*C66 - 2*S4*S66) - 2*C3*S5*SS6))/4.)/
    2.;
h[2][5][7]=h[2][7][5]=(I2*(C3*C5*S6 - C4*S3*S5*S6))/2.;
h[2][6][6]=(
      2*I6*(-(C3*C5*S6) + C4*S3*S5*S6) +
        2*I24*(S3*S5*S6 + C3*(-(C6*S4) - C4*C5*S6)))/2.;
h[2][6][7]=h[2][7][6]=(I2*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6)))/2.;
h[2][7][7]=0;
h[3][1][1]=(-(CC4*I11*(2*C3*S3 - 2*C3*CC2*S3)) -
        CC4*CC5*I12*(2*C3*S3 - 2*C3*CC2*S3) -
        CC6*I9*(-2*C3*CC2*(1 - CC4*(1 + CC5))*S3 -
              2*C3*(-1 + CC4*(1 + CC5))*S3) +
        2*C2*I23*S2*S3*S4 + (C2*I20*S2*S3*S44)/2. -
        CC5*I10*(-2*C3*S3 + 2*C3*CC2*S3 - C2*S2*S3*S44) - (
            I5*(2*C33*C4 - 2*C33*C4*CC2 + 2*C2*C3*S2*S4)*S55)/8. -
        I24*(-(C3*S22*S5*S6) - C2*S2*S3*(2*C6*S4 + 2*C4*C5*S6)) +
        2*C3*I19*S3*SS2 -
        I6*(C2*S2*(-2*C6*S3*S44 - 2*C3*C4*S5*S6) +
              S6*(-(C44*C5*S22*S3) + 2*CC3*S4*S5 - 2*S4*S5*SS3) -
              2*C3*S3*(-(C5*S44*S6) - 2*C6*SS4) +
              CC2*(2*S4*S6*(-(CC3*S5) + S5*SS3) -
                    2*C3*S3*(C5*S44*S6 + 2*C6*SS4))) - (
            I4*(-2*C33*C4*C66*S55 - 2*C44*C5*S22*S3*S66 + 4*CC3*S4*S5*S66 +
                  2*C2*S2*(-(C66*(1 + CC5)*S3*S44) -
                        C3*(C66*S4*S55 + 2*C4*S5*S66)) - 4*S4*S5*S66*SS3 -
                  4*C3*S3*(-(C5*S44*S66) - C66*SS5) +
                  CC2*(2*C33*C4*C66*S55 - 8*C6*CC3*S4*S5*S6 +
                        8*C6*S4*S5*S6*SS3 -
                        4*C3*S3*(2*C5*C6*S44*S6 + C66*SS5))))/8.)/2.;
h[3][1][2]=
  h[3][2][1]=(-(CC4*I11*S2) - C33*CC4*I11*S2 - CC4*CC5*I12*S2 - CC5*I14*S2 +
        C33*I19*S2 - I8*S2 - (1 - CC4*(1 + CC5))*CC6*I9*S2 +
        2*C2*C3*I23*S4 - (C2*C3*I11*S44)/2. - (C2*C3*I17*S44)/
          2. - (I5*(-2*C3*C4*S2*S3 - C2*S3*S4)*S55)/
          8. + (C2*I5*(-(C3*CC5*S44) + S3*S4*S55))/
          8. - (I12*(
                C2*C3*CC5*S44 + S2*(2*C33*(1 + CC4)*CC5 - 2*C3*C4*S3*S55)))/
          2. - I9*(-(C2*C3*(1 + CC5)*CC6*S44)/
                2. + (CC6*
                    S2*(2*C33*(2 - CC5 - CC4*(1 + CC5)) + 2*C3*C4*S3*S55))/
                2.) - C2*I24*(S3*S5*S6 + C3*(-(C6*S4) - C4*C5*S6)) +
        C2*I24*(-(S3*S5*S6) + C3*(C6*S4 + C4*C5*S6)) -
        I6*(S2*(2*C33*C6 - 2*C33*C6*CC4 + C33*C5*S44*S6 - 2*S33*S4*S5*S6) +
              C2*(C4*S3*S5*S6 + C3*(-(C6*S44) - C44*C5*S6))) + (
            I4*(-2*S2*(-C66 + C66*CC5 + 2*C5*C6*S44*S6) +
                  C2*(C3*(C66*(1 + CC5)*S44 + 4*C44*C5*C6*S6) -
                        S3*(C66*S4*S55 + 4*C4*C6*S5*S6))))/
          8. - (I4*(
                S2*(-2*C33 + 2*C3*C4*C66*S3*S55 - 8*C6*S33*S4*S5*S6 +
                        2*C33*C5*S44*S66) +
                  C2*(-2*C3*C44*C5*S66 - S3*(-(C66*S4*S55) - 2*C4*S5*S66))))/
          8. + I6*(
            C2*(-(C4*S3*S5*S6) + C3*(2*C4*C6*S4 + C44*C5*S6)) -
              S2*(C5*S44*S6 + 2*C6*SS4)))/2.;
h[3][1][3]=h[3][3][1]=0;
h[3][1][4]=
  h[3][4][1]=(
      C3*CC5*I10*S2 - C3*C44*I17*S2 - (C3*I7*S2)/8. - 2*C2*C4*I11*S4 -
        2*C2*C4*CC5*I12*S4 +
        2*C2*C4*(1 + CC5)*CC6*I9*S4 - (I5*S2*(-C3 - C4*S3*S55))/
          8. + (I5*S2*(-2*C3*C44*CC5 + C4*S3*S55))/8. -
        I6*S2*(2*C3*C6 - S3*S4*S5*S6) + (
            I4*(8*C2*C44*C5*C6*S6 +
                  S2*(C3*(2*C44*C66*(1 + CC5) - 8*C5*C6*S44*S6) -
                        S3*(C4*C66*S55 - 4*C6*S4*S5*S6))))/8. +
        I6*(C2*(4*C4*C6*S4 + 2*C44*C5*S6) +
              S2*(S3*S4*S5*S6 + C3*(2*C6*CC4 - 2*C5*S44*S6 - 2*C6*SS4))) - (
            I4*S2*(-(S3*(-(C4*C66*S55) + 4*C6*S4*S5*S6)) + 2*C3*C66*SS5))/8.)/
    2.;
h[3][1][5]=
  h[3][5][1]=(-(I3*S2*S3*S4)/4. - 2*C2*C5*CC4*I12*S5 - 2*C2*C5*I14*S5 +
        2*C2*C5*CC4*CC6*I9*S5 + (I5*S2*(2*C55*S3*S4 + 2*C3*C5*S44*S5))/8. -
        I6*S2*(-(C4*C5*S3*S6) - C3*S5*S6) +
        I6*(-(C2*S44*S5*S6) + S2*(-(C4*C5*S3*S6) - C3*C44*S5*S6)) + (
            I4*(2*C2*(-2*C5*C66*S5 - 2*C6*S44*S5*S6) +
                  S2*(-(S3*(2*C55*C66*S4 + 4*C4*C5*C6*S6)) +
                        C3*(-2*C5*C66*S44*S5 - 4*C44*C6*S5*S6))))/
          8. - (I4*S2*(-2*C3*C6*S5*S6 - S3*(C66*S4 + C4*C5*S66)))/4.)/2.;
h[3][1][6]=
  h[3][6][1]=(-(I1*S2*(C3*C5 - C4*S3*S5))/2. -
        I6*S2*(C3*C5*C6 - C4*C6*S3*S5) - 2*C2*C6*(1 - CC4*(1 + CC5))*I9*S6 +
        I6*(S2*(-(C4*C6*S3*S5) + C3*(C44*C5*C6 - 2*C4*S4*S6)) +
              C2*(C5*C6*S44 - 2*S6*SS4)) + (
            I4*(2*C2*(2*C5*CC6*S44 + 2*S66 - 2*CC5*S66 - 2*C5*S44*SS6) +
                  S2*(C3*(4*C44*C5*CC6 - 2*(1 + CC5)*S44*S66 -
                              4*C44*C5*SS6) -
                        S3*(4*C4*CC6*S5 - 2*S4*S55*S66 - 4*C4*S5*SS6))))/8.)/
    2.;
h[3][1][7]=h[3][7][1]=-(I2*S2*(C3*S5*S6 - S3*(-(C6*S4) - C4*C5*S6)))/2.;
h[3][2][2]=(-2*C3*(1 + CC4)*CC5*I14*S3 + 2*C3*I16*S3 +
        2*C3*CC4*I17*S3 + (C33*C4*I5*S55)/
          4. - (I4*(-2*C3*(2*C66 - C66*CC5 - C66*CC4*(1 + CC5))*S3 +
                  C33*C4*C66*S55 - 2*C3*C5*S3*S44*S66 - 2*C33*S4*S5*S66))/
          4. - I6*(-2*C33*S4*S5*S6 - 2*C3*S3*(C5*S44*S6 + 2*C6*SS4)))/2.;
h[3][2][3]=h[3][3][2]=0;
h[3][2][4]=
  h[3][4][2]=(
      C44*I11*S3 - C44*CC5*I14*S3 + (I7*S3)/8. -
        C44*CC6*I9*S3 + (C3*C4*I5*S55)/8. - (I12*(-(C55*S3) - C3*C4*S55))/
          2. - I6*(-2*C6*S3 - C3*S4*S5*S6) -
        I6*(-(C3*S4*S5*S6) + S3*(2*C44*C6 - 2*C5*S44*S6)) - (
            I4*(-((1 + 2*C66 - 4*CC5*CC6)*S3) +
                  2*C3*(C4*CC6*S55 - 2*C6*S4*S5*S6)))/
          8. - (I4*(
                S3*(2*C44*C66*CC5 - 4*C5*S44*S66) +
                  C3*(C4*C66*S55 - 2*S4*S5*S66)))/8.)/2.;
h[3][2][5]=
  h[3][5][2]=(-(C3*I3*S4)/4. + (C3*C55*I5*S4)/4. + C5*I14*S3*S44*S5 +
        I6*(C3*C4*C5*S6 - S3*S5*S6) -
        I6*(C3*C4*C5*S6 - C44*S3*S5*S6) + (
            I4*(-2*C6*S3*S5*S6 + C3*(C66*S4 + C4*C5*S66)))/
          4. - (I4*(
                C3*(2*C55*C66*S4 + 2*C4*C5*S66) +
                  S3*(-2*C5*C66*S44*S5 - 2*C44*S5*S66)))/8.)/2.;
h[3][2][6]=
  h[3][6][2]=(-(I1*(-(C5*S3) - C3*C4*S5))/2. -
        I6*(-(C5*C6*S3) - C3*C4*C6*S5) + C6*I9*S3*S44*S6 -
        I24*(-(C3*C6*S5) - S3*(C4*C5*C6 - S4*S6)) -
        I24*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6)) -
        I6*(C3*C4*C6*S5 + S3*(C44*C5*C6 - S44*S6)) - (
            I4*(S3*(4*C44*C5*C66 - 2*CC5*S44*S66) +
                  C3*(4*C4*C66*S5 - 2*S4*S55*S66)))/8.)/2.;
h[3][2][7]=h[3][7][2]=-(I2*(-(S3*S5*S6) + C3*(C6*S4 + C4*C5*S6)))/2.;
h[3][3][3]=0;
h[3][3][4]=
  h[3][4][3]=(-2*C4*I11*S4 - 2*C4*CC5*I12*S4 + 2*C4*(1 + CC5)*CC6*I9*S4 +
        C44*C5*C6*I4*S6 + I6*(4*C4*C6*S4 + 2*C44*C5*S6))/2.;
h[3][3][5]=
  h[3][5][3]=(-2*C5*I10*S5 - 2*C5*CC4*I12*S5 + 2*C5*CC4*CC6*I9*S5 -
        I6*S44*S5*S6 + (I4*(-2*C5*C66*S5 - 2*C6*S44*S5*S6))/4.)/2.;
h[3][3][6]=
  h[3][6][3]=(-2*C6*(1 - CC4*(1 + CC5))*I9*S6 +
        I6*(C5*C6*S44 - 2*S6*SS4) + (
            I4*(2*C5*CC6*S44 + 2*S66*SS5 - 2*C5*S44*SS6))/4.)/2.;
h[3][3][7]=h[3][7][3]=0;
h[3][4][4]=((C4*I5*S55)/4. +
        2*I6*S4*S5*S6 - (I4*(C4*C66*S55 - 4*C6*S4*S5*S6))/4.)/2.;
h[3][4][5]=
  h[3][5][4]=(-(I3*S4)/4. + (C55*I5*S4)/4. + (I4*(C66*S4 + 2*C4*C5*C6*S6))/
          4. - (I4*(2*C55*C66*S4 + 4*C4*C5*C6*S6))/8.)/2.;
h[3][4][6]=
  h[3][6][4]=(-(C4*C6*I6*S5) + (C4*(I1 + 2*C6*I6)*S5)/
          2. - (I4*(4*C4*CC6*S5 - 2*S4*S55*S66 - 4*C4*S5*SS6))/8.)/2.;
h[3][4][7]=h[3][7][4]=(I2*(-(C6*S4) - C4*C5*S6))/2.;
h[3][5][5]=(-(C6*I4*S4*S5*S6) - 2*I6*S4*S5*S6)/2.;
h[3][5][6]=
  h[3][6][5]=(
      C5*C6*I6*S4 + (C5*(I1 + 2*C6*I6)*S4)/
          2. + (I4*(2*C5*CC6*S4 + 2*C4*S66 - 2*C5*S4*SS6))/4.)/2.;
h[3][5][7]=h[3][7][5]=(I2*S4*S5*S6)/2.;
h[3][6][6]=-(I6*S4*S5*S6);
h[3][6][7]=h[3][7][6]=(I2*(-(C5*C6*S4) - C4*S6))/2.;
h[3][7][7]=0;
h[4][1][1]=(-2*C2*C3*C44*CC5*I10*S2 - C2*C3*C44*I20*S2 +
        2*C4*(-CC3 + CC2*(1 + CC3))*I11*S4 +
        2*C4*(-CC3 + CC2*(1 + CC3))*CC5*I12*S4 -
        CC6*I9*(-2*C4*CC3*(1 + CC5)*S4 +
              CC2*(2*C4*(1 + CC5)*S4 + 2*C4*CC3*(1 + CC5)*S4)) - (
            I5*(2*C2*C4*S2*S3 - S33*S4 + CC2*S33*S4)*S55)/8. -
        I24*(-2*C6*S4 - 2*C4*C5*S6 + CC2*(2*C6*S4 + 2*C4*C5*S6) +
              C2*C3*S2*(2*C4*C6 - 2*C5*S4*S6)) -
        2*I23*(C2*C3*C4*S2 - S4*SS2) - (
            I4*(C66*S33*S4*S55 + 4*C44*C5*S66 - 4*C44*C5*CC3*S66 -
                  4*C5*CC4*S66 - 4*C3*C5*S22*S44*S66 + 4*C3*C4*S3*S5*S66 +
                  2*C2*S2*(
                      2*C3*C44*C66*(1 + CC5) -
                        S3*(C4*C66*S55 - 2*S4*S5*S66)) + 4*C5*S66*SS4 +
                  CC2*(-(C66*S33*S4*S55) + 8*C44*C5*C6*CC3*S6 -
                        8*C3*C4*C6*S3*S5*S6 + 4*C5*CC4*S66 - 4*C5*S66*SS4)))/
          8. - I6*(
            CC3*(-4*C4*C6*S4 - 2*C44*C5*S6) +
              C2*S2*(4*C3*C44*C6 + 2*S3*S4*S5*S6) +
              CC2*(4*C4*C6*S4 + 2*C4*(C4*C5 - C3*S3*S5)*S6 +
                    CC3*(4*C4*C6*S4 + 2*C44*C5*S6) - 2*C5*S6*SS4) +
              S6*(2*C3*C4*S3*S5 +
                    C5*(2*C44 - 2*CC4 - 2*C3*S22*S44 + 2*SS4))))/2.;
h[4][1][2]=
  h[4][2][1]=(-(C2*CC5*I10*S3) - C2*C44*I11*S3 +
        2*C2*C4*I23*S3 + (C2*I7*S3)/8. +
        C4*I11*S2*S33*S4 + (I5*(-(S2*S4*S55) + C2*(-S3 + C3*C4*S55)))/
          8. - (I12*(2*C2*C44*CC5*S3 + S2*(-2*C4*CC5*S33*S4 - CC3*S4*S55)))/
          2. - I9*(-(C2*C44*(1 + CC5)*CC6*S3) + (
                  CC6*S2*(2*C4*(1 + CC5)*S33*S4 + CC3*S4*S55))/2.) +
        C2*I24*S3*(C4*C6 - C5*S4*S6) - C2*I24*S3*(-(C4*C6) + C5*S4*S6) +
        I6*(C4*S2*S5*S6 + C2*(2*C6*S3 + C3*S4*S5*S6)) -
        I6*(S2*(2*C4*C6*S33*S4 + C44*C5*S33*S6 + C33*C4*S5*S6) +
              C2*(C3*S4*S5*S6 + S3*(-2*C44*C6 + 2*C5*S44*S6))) - (
            I5*S55*(C2*C3*C4 + S2*S4*SS3))/
          8. - (I4*(
                C2*(4*C5*S3*S44*S66 + C3*(-(C4*C66*S55) + 2*S4*S5*S66)) +
                  S2*(4*C33*C4*C6*S5*S6 + 2*C44*C5*S33*S66 -
                        C66*S4*S55*SS3)))/
          8. + (I4*(
                S2*(C66*S4*S55 + 4*C4*C6*S5*S6) +
                  C2*(C3*(-(C4*C66*S55) + 4*C6*S4*S5*S6) + 2*C66*S3*SS5)))/
          8.)/2.;
h[4][1][3]=
  h[4][3][1]=(-(C3*CC5*I10*S2) + C3*C44*I17*S2 + (C3*I7*S2)/8. +
        2*C2*C4*I11*S4 + 2*C2*C4*CC5*I12*S4 -
        2*C2*C4*(1 + CC5)*CC6*I9*S4 + (I5*S2*(-C3 - C4*S3*S55))/
          8. - (I5*S2*(-2*C3*C44*CC5 + C4*S3*S55))/8. +
        I6*S2*(2*C3*C6 - S3*S4*S5*S6) - (
            I4*(8*C2*C44*C5*C6*S6 +
                  S2*(C3*(2*C44*C66*(1 + CC5) - 8*C5*C6*S44*S6) -
                        S3*(C4*C66*S55 - 4*C6*S4*S5*S6))))/8. -
        I6*(C2*(4*C4*C6*S4 + 2*C44*C5*S6) +
              S2*(S3*S4*S5*S6 + C3*(2*C6*CC4 - 2*C5*S44*S6 - 2*C6*SS4))) + (
            I4*S2*(-(S3*(-(C4*C66*S55) + 4*C6*S4*S5*S6)) + 2*C3*C66*SS5))/8.)/
    2.;
h[4][1][4]=h[4][4][1]=0;
h[4][1][5]=
  h[4][5][1]=(-(I3*(-(C3*C4*S2) - C2*S4))/
          4. + (I5*(2*C3*C4*C55*S2 + 2*C2*C55*S4))/8. + 2*C5*I10*S2*S3*S5 -
        I6*(C2*C4*C5*S6 - C3*C5*S2*S4*S6) +
        I6*(-(C2*C4*C5*S6) + C3*C5*S2*S4*S6) + (
            I4*(-(C2*(2*C55*C66*S4 + 4*C4*C5*C6*S6)) +
                  S2*(4*C5*C66*S3*S5 + C3*(-2*C4*C55*C66 + 4*C5*C6*S4*S6))))/
          8. - (I4*(
                C2*(C66*S4 + 2*C4*C5*C6*S6) + C3*S2*(C4*C66 - C5*S4*S66)))/
          4.)/2.;
h[4][1][6]=
  h[4][6][1]=(-(I1*(C2*C4*S5 - C3*S2*S4*S5))/2. -
        I6*(C2*C4*C6*S5 - C3*C6*S2*S4*S5) +
        I6*(-(C2*C4*C6*S5) + S2*(C3*C6*S4*S5 - 2*S3*S6)) + (
            I4*(-(C2*(4*C4*CC6*S5 - 2*S4*S55*S66 - 4*C4*S5*SS6)) +
                  S2*(-4*S3*S66*SS5 +
                        C3*(4*CC6*S4*S5 + 2*C4*S55*S66 - 4*S4*S5*SS6))))/8.)/
    2.;
h[4][1][7]=
  h[4][7][1]=-(I2*(C2*(-(C6*S4) - C4*C5*S6) + C3*S2*(-(C4*C6) + C5*S4*S6)))/
    2.;
h[4][2][2]=(-2*C4*CC3*CC5*I14*S4 + 2*C4*I15*S4 + 2*C4*CC3*I17*S4 +
        2*I23*S4 - (I5*(2*C4*C55*S4 + S33*S4*S55))/8. -
        I24*(-2*C6*S4 - 2*C4*C5*S6) - (
            I4*(-2*C4*C66*(1 + CC5)*S4 +
                  2*C4*C66*CC3*(1 + CC5)*S4 - (C66*S33*S4*S55)/2. -
                  C4*S33*S5*S66 - 2*C44*C5*S66*SS3))/4. -
        I6*(-4*C4*C6*S4 + C4*(-2*C4*C5 - S33*S5)*S6 +
              CC3*(4*C4*C6*S4 + 2*C44*C5*S6) + 2*C5*S6*SS4))/2.;
h[4][2][3]=
  h[4][3][2]=(-(C44*I11*S3) + C44*CC5*I14*S3 - (I7*S3)/8. +
        C44*CC6*I9*S3 - (C3*C4*I5*S55)/8. + (I12*(-(C55*S3) - C3*C4*S55))/
          2. + I6*(-2*C6*S3 - C3*S4*S5*S6) +
        I6*(-(C3*S4*S5*S6) + S3*(2*C44*C6 - 2*C5*S44*S6)) + (
            I4*(-((1 + 2*C66 - 4*CC5*CC6)*S3) +
                  2*C3*(C4*CC6*S55 - 2*C6*S4*S5*S6)))/
          8. + (I4*(
                S3*(2*C44*C66*CC5 - 4*C5*S44*S66) +
                  C3*(C4*C66*S55 - 2*S4*S5*S66)))/8.)/2.;
h[4][2][4]=h[4][4][2]=0;
h[4][2][5]=
  h[4][5][2]=(-(C4*I3*S3)/4. + (I12*(-2*C4*C55*S3 - 2*C3*S55))/2. -
        2*C5*I6*S3*S4*
          S6 + (I4*(8*C3*C5*CC6*S5 + 2*S3*(2*C4*C55*CC6 - 2*C5*C6*S4*S6)))/
          8. + (I4*S3*(C4*C66 - C5*S4*S66))/4.)/2.;
h[4][2][6]=
  h[4][6][2]=(-(I1*S3*S4*S5)/2. - C6*I6*S3*S4*S5 +
        I6*(-(C6*S3*S4*S5) - 2*C3*S6) + (
            I4*(C3*(8*C6*CC5*S6 - 4*S66) +
                  2*S3*(-2*CC6*S4*S5 - 2*C4*C6*S55*S6 + 2*S4*S5*SS6)))/8.)/2.;
h[4][2][7]=h[4][7][2]=-(I2*S3*(C4*C6 - C5*S4*S6))/2.;
h[4][3][3]=(
      2*C4*I11*S4 + 2*C4*CC5*I12*S4 - 2*C4*(1 + CC5)*CC6*I9*S4 -
        C44*C5*C6*I4*S6 - I6*(4*C4*C6*S4 + 2*C44*C5*S6))/2.;
h[4][3][4]=h[4][4][3]=0;
h[4][3][5]=
  h[4][5][3]=((I3*S4)/4. + (C55*I5*S4)/4. -
        2*C4*C5*I6*S6 - (I4*(C66*S4 + 2*C4*C5*C6*S6))/
          4. - (I4*(2*C55*C66*S4 + 4*C4*C5*C6*S6))/8.)/2.;
h[4][3][6]=
  h[4][6][3]=(-(C4*C6*I6*S5) - (C4*(I1 + 2*C6*I6)*S5)/
          2. - (I4*(4*C4*CC6*S5 - 2*S4*S55*S66 - 4*C4*S5*SS6))/8.)/2.;
h[4][3][7]=h[4][7][3]=-(I2*(-(C6*S4) - C4*C5*S6))/2.;
h[4][4][4]=0;
h[4][4][5]=h[4][5][4]=(4*C5*C66*I4*S5 - 2*I5*S55)/16.;
h[4][4][6]=h[4][6][4]=(-16*I6*S6 - 4*I4*S66*SS5)/16.;
h[4][4][7]=h[4][7][4]=0;
h[4][5][5]=-(C5*(C6*I4 + 2*I6)*S6)/2.;
h[4][5][6]=
  h[4][6][5]=(-(C6*(C6*I4 + 2*I6)*S5)/2. - ((I1 + 2*C6*I6)*S5)/
          2. + (I4*S5*SS6)/2.)/2.;
h[4][5][7]=h[4][7][5]=(C5*I2*S6)/2.;
h[4][6][6]=-(C5*I6*S6);
h[4][6][7]=h[4][7][6]=(C6*I2*S5)/2.;
h[4][7][7]=0;
h[5][1][1]=(-(C55*I5*(C4*S33 - C4*CC2*S33 + 2*C2*S2*S3*S4))/4. +
        2*C5*(1 + (-CC3 + CC2*(1 + CC3))*CC4)*I12*S5 + 2*C5*CC2*I22*S5 +
        2*C5*I10*(CC3 - CC2*CC3 + C2*C3*S2*S44)*S5 -
        CC6*I9*(2*C5*S5 - 2*C5*CC3*CC4*S5 +
              CC2*(-2*C5*S5 + 2*C5*CC4*S5 + 2*C5*CC3*CC4*S5)) -
        I24*(-(C5*S22*S3*S6) - 2*C2*C3*C4*S2*S5*S6 + 2*S4*S5*S6 -
              2*CC2*S4*S5*S6) -
        I6*(-2*C2*C4*C5*S2*S3*S6 +
              CC3*S44*S5*
                S6 + (2*C3*C5*S3*S4 - (C3*C44*S22 - 2*C4*S4 + S44)*S5)*S6 +
              CC2*(-(CC3*S44*S5*S6) + 2*S4*(-(C3*C5*S3) - C4*S5)*S6)) - (
            I4*(-2*C4*C55*C66*S33 + 4*C3*C5*S3*S4*S66 - 2*C3*C44*S22*S5*S66 +
                  4*C4*S4*S5*S66 - 2*S44*S5*S66 +
                  CC2*(2*C4*C55*C66*S33 - 4*C5*C66*S5 - 8*C3*C5*C6*S3*S4*S6 +
                        2*CC3*(2*C5*C66*S5 - 2*C6*S44*S5*S6) -
                        4*C4*S4*S5*S66) + 2*CC3*(-2*C5*C66*S5 + S44*S5*S66) +
                  2*C2*S2*(-2*C3*C5*C66*S44*S5 -
                        S3*(2*C55*C66*S4 + 2*C4*C5*S66))))/8.)/2.;
h[5][1][2]=
  h[5][2][1]=((I3*(-(C4*S2) - C2*C3*S4))/
          4. - (I12*(-2*C2*C5*S3*S44*S5 +
                  S2*(2*C4*C55*CC3 - 2*C5*(1 + CC4)*S33*S5)))/2. -
        I9*(C2*C5*CC6*S3*S44*
                S5 + (CC6*S2*(-2*C4*C55*CC3 + S33*(2*C5*S5 + 2*C5*CC4*S5)))/
                2.) + C2*I24*(C3*C5*S6 - C4*S3*S5*S6) -
        C2*I24*(-(C3*C5*S6) + C4*S3*S5*S6) +
        I6*(-(C5*S2*S4*S6) + C2*(C3*C4*C5*S6 - S3*S5*S6)) -
        I6*(C2*(-(C3*C4*C5*S6) + C44*S3*S5*S6) +
              S2*(C33*C5*S4*S6 - (S33*S44*S5*S6)/2.)) + (
            I4*(-(S2*(-(C4*C66) + 2*C5*C6*S4*S6)) +
                  C2*(-2*C6*S3*S5*S6 + C3*(C66*S4 + C4*C5*S66))))/
          4. - (C55*I5*(C2*C3*S4 - C4*S2*SS3))/
          4. - (I4*(
                C2*(2*C44*S3*S5*S66 + C3*(-2*C55*C66*S4 - 2*C4*C5*S66)) +
                  S2*(4*C33*C5*C6*S4*S6 - S33*S44*S5*S66 +
                        2*C4*C55*C66*SS3)))/8.)/2.;
h[5][1][3]=
  h[5][3][1]=((I3*S2*S3*S4)/4. + 2*C2*C5*CC4*I12*S5 + 2*C2*C5*I14*S5 -
        2*C2*C5*CC4*CC6*I9*S5 - (I5*S2*(2*C55*S3*S4 + 2*C3*C5*S44*S5))/8. +
        I6*S2*(-(C4*C5*S3*S6) - C3*S5*S6) -
        I6*(-(C2*S44*S5*S6) + S2*(-(C4*C5*S3*S6) - C3*C44*S5*S6)) - (
            I4*(2*C2*(-2*C5*C66*S5 - 2*C6*S44*S5*S6) +
                  S2*(-(S3*(2*C55*C66*S4 + 4*C4*C5*C6*S6)) +
                        C3*(-2*C5*C66*S44*S5 - 4*C44*C6*S5*S6))))/
          8. + (I4*S2*(-2*C3*C6*S5*S6 - S3*(C66*S4 + C4*C5*S66)))/4.)/2.;
h[5][1][4]=
  h[5][4][1]=((I3*(-(C3*C4*S2) - C2*S4))/
          4. - (I5*(2*C3*C4*C55*S2 + 2*C2*C55*S4))/8. - 2*C5*I10*S2*S3*S5 +
        I6*(C2*C4*C5*S6 - C3*C5*S2*S4*S6) -
        I6*(-(C2*C4*C5*S6) + C3*C5*S2*S4*S6) - (
            I4*(-(C2*(2*C55*C66*S4 + 4*C4*C5*C6*S6)) +
                  S2*(4*C5*C66*S3*S5 + C3*(-2*C4*C55*C66 + 4*C5*C6*S4*S6))))/
          8. + (I4*(
                C2*(C66*S4 + 2*C4*C5*C6*S6) + C3*S2*(C4*C66 - C5*S4*S66)))/
          4.)/2.;
h[5][1][5]=h[5][5][1]=0;
h[5][1][6]=
  h[5][6][1]=(-(I1*(C2*C5*S4 + S2*(C3*C4*C5 - S3*S5)))/
          2. + (I4*(
                C2*(2*C5*CC6*S4 + 2*C4*S66 - 2*C5*S4*SS6) +
                  S2*(-2*CC6*S3*S5 + C3*(2*C4*C5*C66 - 2*S4*S66) +
                        2*S3*S5*SS6)))/4.)/2.;
h[5][1][7]=h[5][7][1]=-(I2*(C2*S4*S5*S6 + S2*(C5*S3*S6 + C3*C4*S5*S6)))/2.;
h[5][2][2]=(
      2*C5*(1 - CC3*(1 + CC4))*I14*S5 - 2*I24*S4*S5*S6 -
        I6*(-(CC3*S44*S5*S6) + S4*(-(C5*S33) + 2*C4*S5)*S6) - (
            I4*(C4*C55*C66*S33 - 2*C5*C66*CC4*S5 +
                  CC3*(2*C5*C66*S5 + 2*C5*C66*CC4*S5) - C5*S33*S4*S66 +
                  S44*S5*S66*SS3))/4. - (I5*(-2*C4*C55*S33 - 2*S55*SS4))/8.)/
    2.;
h[5][2][3]=
  h[5][3][2]=((C3*I3*S4)/4. - (C3*C55*I5*S4)/4. - C5*I14*S3*S44*S5 -
        I6*(C3*C4*C5*S6 - S3*S5*S6) +
        I6*(C3*C4*C5*S6 - C44*S3*S5*S6) - (
            I4*(-2*C6*S3*S5*S6 + C3*(C66*S4 + C4*C5*S66)))/
          4. + (I4*(
                C3*(2*C55*C66*S4 + 2*C4*C5*S66) +
                  S3*(-2*C5*C66*S44*S5 - 2*C44*S5*S66)))/8.)/2.;
h[5][2][4]=
  h[5][4][2]=((C4*I3*S3)/4. - (I12*(-2*C4*C55*S3 - 2*C3*S55))/2. +
        2*C5*I6*S3*S4*
          S6 - (I4*(8*C3*C5*CC6*S5 + 2*S3*(2*C4*C55*CC6 - 2*C5*C6*S4*S6)))/
          8. - (I4*S3*(C4*C66 - C5*S4*S66))/4.)/2.;
h[5][2][5]=h[5][5][2]=0;
h[5][2][6]=
  h[5][6][2]=(-(I1*(-(C4*C5*S3) - C3*S5))/2. -
        I6*(-(C4*C5*C6*S3) - C3*C6*S5) - I6*(C4*C5*C6*S3 + C3*C6*S5) -
        I24*(-(C5*C6*S3) - C3*C4*C6*S5) -
        I24*(C5*C6*S3 + C3*C4*C6*S5) - (
            I4*(2*C3*CC6*S5 + S3*(2*C4*C5*C66 - 2*S4*S66) - 2*C3*S5*SS6))/4.)/
    2.;
h[5][2][7]=h[5][7][2]=-(I2*(C3*C5*S6 - C4*S3*S5*S6))/2.;
h[5][3][3]=(
      2*C5*I10*S5 + 2*C5*CC4*I12*S5 - 2*C5*CC4*CC6*I9*S5 +
        I6*S44*S5*S6 - (I4*(-2*C5*C66*S5 - 2*C6*S44*S5*S6))/4.)/2.;
h[5][3][4]=
  h[5][4][3]=(-(I3*S4)/4. - (C55*I5*S4)/4. +
        2*C4*C5*I6*S6 + (I4*(C66*S4 + 2*C4*C5*C6*S6))/
          4. + (I4*(2*C55*C66*S4 + 4*C4*C5*C6*S6))/8.)/2.;
h[5][3][5]=h[5][5][3]=0;
h[5][3][6]=
  h[5][6][3]=(
      C5*C6*I6*S4 - (C5*(I1 + 2*C6*I6)*S4)/
          2. + (I4*(2*C5*CC6*S4 + 2*C4*S66 - 2*C5*S4*SS6))/4.)/2.;
h[5][3][7]=h[5][7][3]=-(I2*S4*S5*S6)/2.;
h[5][4][4]=(-4*C5*C66*I4*S5 + 2*I5*S55)/16.;
h[5][4][5]=h[5][5][4]=0;
h[5][4][6]=
  h[5][6][4]=(-(C6*(C6*I4 + 2*I6)*S5)/2. + ((I1 + 2*C6*I6)*S5)/
          2. + (I4*S5*SS6)/2.)/2.;
h[5][4][7]=h[5][7][4]=-(C5*I2*S6)/2.;
h[5][5][5]=0;
h[5][5][6]=h[5][6][5]=(I4*S66)/4.;
h[5][5][7]=h[5][7][5]=0;
h[5][6][6]=0;
h[5][6][7]=h[5][7][6]=-(I2*S6)/2.;
h[5][7][7]=0;
h[6][1][1]=(
      2*C6*(1 - CC5 + CC3*(-1 + CC4*(1 + CC5)) +
              CC2*(CC5 - CC4*(1 + CC5) + CC3*(1 - CC4*(1 + CC5))))*I9*S6 -
        I24*(-2*C5*C6*S4 - C6*S22*S3*S5 - 2*C4*S6 +
              CC2*(2*C5*C6*S4 + 2*C4*S6) + C2*C3*S2*(2*C4*C5*C6 - 2*S4*S6)) -
        I6*(C6*(C5*(C3*C44*S22 - 2*C4*S4 + S44) + 2*C3*S3*S4*S5) - 2*S6 +
              C2*S2*(-2*C4*C6*S3*S5 - 2*C3*S44*S6) +
              CC3*(-(C5*C6*S44) + 2*S6*SS4) +
              CC2*(2*C6*S4*(C4*C5 - C3*S3*S5) + 2*CC4*S6 +
                    CC3*(C5*C6*S44 - 2*S6*SS4))) - (
            I4*(4*C3*C44*C5*C66*S22 - 8*C4*C5*C66*S4 + 4*C5*C66*S44 +
                  8*C3*C66*S3*S4*S5 + 2*C4*S33*S55*S66 +
                  2*C2*S2*(-2*C3*(1 + CC5)*S44*S66 -
                        S3*(4*C4*C66*S5 - 2*S4*S55*S66)) +
                  2*CC3*(-2*C5*C66*S44 + 2*S66*SS5) +
                  CC2*(8*C4*C5*C66*S4 - 8*C3*CC6*S3*S4*S5 -
                        2*C4*S33*S55*S66 + 4*S66*SS5 + 8*C3*S3*S4*S5*SS6 +
                        2*CC3*(2*C5*CC6*S44 - 2*S66*SS5 - 2*C5*S44*SS6))))/
          8.)/2.;
h[6][1][2]=
  h[6][2][1]=((I1*(-(S2*S4*S5) + C2*(C5*S3 + C3*C4*S5)))/2. +
        I6*(-(C6*S2*S4*S5) + C2*(C5*C6*S3 + C3*C4*C6*S5)) -
        I9*(C2*C6*(1 + CC5)*S3*S44*S6 -
              C6*S2*((2 - CC5 - CC4*(1 + CC5))*S33 - C4*CC3*S55)*S6) +
        C2*I24*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6)) -
        C2*I24*(-(C3*C6*S5) + S3*(-(C4*C5*C6) + S4*S6)) -
        I6*(S2*((C5*C6*S33*S44)/2. + C33*C6*S4*S5 - S33*S6 + CC4*S33*S6) +
              C2*(-(C3*C4*C6*S5) + S3*(-(C44*C5*C6) + S44*S6))) - (
            I4*(C2*(-4*C44*C5*C66*S3 + C3*(-4*C4*C66*S5 + 2*S4*S55*S66)) +
                  S2*(2*C5*C66*S33*S44 + 4*C33*CC6*S4*S5 - 2*C4*S55*S66*SS3 -
                        4*C33*S4*S5*SS6)))/8.)/2.;
h[6][1][3]=
  h[6][3][1]=((I1*S2*(C3*C5 - C4*S3*S5))/2. +
        I6*S2*(C3*C5*C6 - C4*C6*S3*S5) + 2*C2*C6*(1 - CC4*(1 + CC5))*I9*S6 -
        I6*(S2*(-(C4*C6*S3*S5) + C3*(C44*C5*C6 - 2*C4*S4*S6)) +
              C2*(C5*C6*S44 - 2*S6*SS4)) - (
            I4*(2*C2*(2*C5*CC6*S44 + 2*S66 - 2*CC5*S66 - 2*C5*S44*SS6) +
                  S2*(C3*(4*C44*C5*CC6 - 2*(1 + CC5)*S44*S66 -
                              4*C44*C5*SS6) -
                        S3*(4*C4*CC6*S5 - 2*S4*S55*S66 - 4*C4*S5*SS6))))/8.)/
    2.;
h[6][1][4]=
  h[6][4][1]=((I1*(C2*C4*S5 - C3*S2*S4*S5))/2. +
        I6*(C2*C4*C6*S5 - C3*C6*S2*S4*S5) -
        I6*(-(C2*C4*C6*S5) + S2*(C3*C6*S4*S5 - 2*S3*S6)) - (
            I4*(-(C2*(4*C4*CC6*S5 - 2*S4*S55*S66 - 4*C4*S5*SS6)) +
                  S2*(-4*S3*S66*SS5 +
                        C3*(4*CC6*S4*S5 + 2*C4*S55*S66 - 4*S4*S5*SS6))))/8.)/
    2.;
h[6][1][5]=
  h[6][5][1]=((I1*(C2*C5*S4 + S2*(C3*C4*C5 - S3*S5)))/
          2. - (I4*(
                C2*(2*C5*CC6*S4 + 2*C4*S66 - 2*C5*S4*SS6) +
                  S2*(-2*CC6*S3*S5 + C3*(2*C4*C5*C66 - 2*S4*S66) +
                        2*S3*S5*SS6)))/4.)/2.;
h[6][1][6]=h[6][6][1]=0;
h[6][1][7]=
  h[6][7][1]=-(
        I2*(C2*(-(C5*C6*S4) - C4*S6) +
              S2*(C6*S3*S5 + C3*(-(C4*C5*C6) + S4*S6))))/2.;
h[6][2][2]=(-(I24*(-2*C5*C6*S4 - 2*C4*S6)) - (
            I4*(-2*C66*S33*S4*S5 + 2*S66 - 2*CC4*(1 + CC5)*S66 -
                  C4*S33*S55*S66 +
                  CC3*(-4*S66 + 2*CC5*S66 + 2*CC4*(1 + CC5)*S66) -
                  2*C5*C66*S44*SS3))/4. -
        I6*(C6*S4*(-2*C4*C5 - S33*S5) - 2*CC4*S6 +
              CC3*(C5*C6*S44 - 2*S6*SS4)))/2.;
h[6][2][3]=
  h[6][3][2]=((I1*(-(C5*S3) - C3*C4*S5))/2. +
        I6*(-(C5*C6*S3) - C3*C4*C6*S5) - C6*I9*S3*S44*S6 +
        I24*(-(C3*C6*S5) - S3*(C4*C5*C6 - S4*S6)) +
        I24*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6)) +
        I6*(C3*C4*C6*S5 + S3*(C44*C5*C6 - S44*S6)) + (
            I4*(S3*(4*C44*C5*C66 - 2*CC5*S44*S66) +
                  C3*(4*C4*C66*S5 - 2*S4*S55*S66)))/8.)/2.;
h[6][2][4]=
  h[6][4][2]=((I1*S3*S4*S5)/2. + C6*I6*S3*S4*S5 -
        I6*(-(C6*S3*S4*S5) - 2*C3*S6) - (
            I4*(C3*(8*C6*CC5*S6 - 4*S66) +
                  2*S3*(-2*CC6*S4*S5 - 2*C4*C6*S55*S6 + 2*S4*S5*SS6)))/8.)/2.;
h[6][2][5]=
  h[6][5][2]=((I1*(-(C4*C5*S3) - C3*S5))/2. +
        I6*(-(C4*C5*C6*S3) - C3*C6*S5) + I6*(C4*C5*C6*S3 + C3*C6*S5) +
        I24*(-(C5*C6*S3) - C3*C4*C6*S5) +
        I24*(C5*C6*S3 + C3*C4*C6*S5) + (
            I4*(2*C3*CC6*S5 + S3*(2*C4*C5*C66 - 2*S4*S66) - 2*C3*S5*SS6))/4.)/
    2.;
h[6][2][6]=h[6][6][2]=0;
h[6][2][7]=h[6][7][2]=-(I2*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6)))/2.;
h[6][3][3]=(
      2*C6*(1 - CC4*(1 + CC5))*I9*S6 -
        I6*(C5*C6*S44 - 2*S6*SS4) - (
            I4*(2*C5*CC6*S44 + 2*S66*SS5 - 2*C5*S44*SS6))/4.)/2.;
h[6][3][4]=
  h[6][4][3]=(
      C4*C6*I6*S5 + (C4*(I1 + 2*C6*I6)*S5)/
          2. + (I4*(4*C4*CC6*S5 - 2*S4*S55*S66 - 4*C4*S5*SS6))/8.)/2.;
h[6][3][5]=
  h[6][5][3]=(-(C5*C6*I6*S4) + (C5*(I1 + 2*C6*I6)*S4)/
          2. - (I4*(2*C5*CC6*S4 + 2*C4*S66 - 2*C5*S4*SS6))/4.)/2.;
h[6][3][6]=h[6][6][3]=0;
h[6][3][7]=h[6][7][3]=-(I2*(-(C5*C6*S4) - C4*S6))/2.;
h[6][4][4]=(16*I6*S6 + 4*I4*S66*SS5)/16.;
h[6][4][5]=
  h[6][5][4]=((C6*(C6*I4 + 2*I6)*S5)/2. - ((I1 + 2*C6*I6)*S5)/
          2. - (I4*S5*SS6)/2.)/2.;
h[6][4][6]=h[6][6][4]=0;
h[6][4][7]=h[6][7][4]=-(C6*I2*S5)/2.;
h[6][5][5]=-(I4*S66)/4.;
h[6][5][6]=h[6][6][5]=0;
h[6][5][7]=h[6][7][5]=(I2*S6)/2.;
h[6][6][6]=0;
h[6][6][7]=h[6][7][6]=0;
h[6][7][7]=0;
h[7][1][1]=0;
h[7][1][2]=
  h[7][2][1]=(
      I2*(-(S2*(C4*C6 - C5*S4*S6)) +
            C2*(S3*S5*S6 + C3*(-(C6*S4) - C4*C5*S6))))/2.;
h[7][1][3]=h[7][3][1]=(I2*S2*(C3*S5*S6 - S3*(-(C6*S4) - C4*C5*S6)))/2.;
h[7][1][4]=
  h[7][4][1]=(I2*(C2*(-(C6*S4) - C4*C5*S6) + C3*S2*(-(C4*C6) + C5*S4*S6)))/2.;
h[7][1][5]=h[7][5][1]=(I2*(C2*S4*S5*S6 + S2*(C5*S3*S6 + C3*C4*S5*S6)))/2.;
h[7][1][6]=
  h[7][6][1]=(
      I2*(C2*(-(C5*C6*S4) - C4*S6) +
            S2*(C6*S3*S5 + C3*(-(C4*C5*C6) + S4*S6))))/2.;
h[7][1][7]=h[7][7][1]=0;
h[7][2][2]=0;
h[7][2][3]=h[7][3][2]=(I2*(-(S3*S5*S6) + C3*(C6*S4 + C4*C5*S6)))/2.;
h[7][2][4]=h[7][4][2]=(I2*S3*(C4*C6 - C5*S4*S6))/2.;
h[7][2][5]=h[7][5][2]=(I2*(C3*C5*S6 - C4*S3*S5*S6))/2.;
h[7][2][6]=h[7][6][2]=(I2*(C3*C6*S5 + S3*(C4*C5*C6 - S4*S6)))/2.;
h[7][2][7]=h[7][7][2]=0;
h[7][3][3]=0;
h[7][3][4]=h[7][4][3]=(I2*(-(C6*S4) - C4*C5*S6))/2.;
h[7][3][5]=h[7][5][3]=(I2*S4*S5*S6)/2.;
h[7][3][6]=h[7][6][3]=(I2*(-(C5*C6*S4) - C4*S6))/2.;
h[7][3][7]=h[7][7][3]=0;
h[7][4][4]=0;
h[7][4][5]=h[7][5][4]=(C5*I2*S6)/2.;
h[7][4][6]=h[7][6][4]=(C6*I2*S5)/2.;
h[7][4][7]=h[7][7][4]=0;
h[7][5][5]=0;
h[7][5][6]=h[7][6][5]=-(I2*S6)/2.;
h[7][5][7]=h[7][7][5]=0;
h[7][6][6]=0;
h[7][6][7]=h[7][7][6]=0;
h[7][7][7]=0;