-
Notifications
You must be signed in to change notification settings - Fork 17
/
pTop_WQD.cpp
7854 lines (7813 loc) · 536 KB
/
pTop_WQD.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// LibQPEP: A Library for Globally Optimal Solving Quadratic Pose Estimation Problems,
// It also gives highly accurate uncertainty description of the solutions.
//
// Author: Jin Wu
// Affiliation: Hong Kong University of Science and Technology (HKUST)
// Emails: [email protected]; [email protected]
// Reference: Wu, J., et al. (2022) Quadratic Pose Estimation Problems:
// Globally Optimal Solutions,
// Solvability/Observability Analysis,
// and Uncertainty Description.
// IEEE Transactions on Robotics.
// https://doi.org/10.1109/TRO.2022.3155880
//
//
// pTop_WQD.cpp: Functions for computing matrices of Point-to-Plane registration problems
#include "pTop_WQD.h"
#include "utils.h"
#include <numeric>
#include <thread>
void mixed_pTop_func(Eigen::Matrix<double, 1, 85> &coef_J_pure,
const Eigen::Matrix<double, 9, 1> &pack) {
double r1 = pack(0);
double r2 = pack(1);
double r3 = pack(2);
double b1 = pack(3);
double b2 = pack(4);
double b3 = pack(5);
double n1 = pack(6);
double n2 = pack(7);
double n3 = pack(8);
double s_l_1_r_ = n3 * n3;
double s_l_2_r_ = n2 * n2;
double s_l_3_r_ = n1 * n1;
double s_l_7_r_ = -n1 * r1 + n2 * r2 + n3 * r3;
double s_l_8_r_ = n1 * r1 - n2 * r2 + n3 * r3;
double s_l_9_r_ = b1 * n1 + b2 * n2 + b3 * n3;
double s_l_10_r_ = n1 * r1 + n2 * r2 - n3 * r3;
double s_l_12_r_ = n1 * r1 + n2 * r2 + n3 * r3;
double s_l_13_r_ = n1 * r2 * 4.0 - n2 * r1 * 4.0;
double s_l_14_r_ = n2 * r3 * 2.0 + n3 * r2 * 2.0;
double s_l_15_r_ = n1 * r2 * 4.0 + n2 * r1 * 4.0;
double s_l_16_r_ = n1 * r3 * 4.0 - n3 * r1 * 4.0;
double s_l_17_r_ = n2 * r3 * 2.0 - n3 * r2 * 2.0;
double s_l_24_r_ = n1 * r3 * 2.0 + n3 * r1 * 2.0;
double s_l_25_r_ = n1 * r3 * 2.0 - n3 * r1 * 2.0;
double s_l_48_r_ = n1 * r2 * 2.0 + n2 * r1 * 2.0;
double s_l_54_r_ = n1 * r2 * 2.0 - n2 * r1 * 2.0;
coef_J_pure(0, 0) = s_l_12_r_ * s_l_12_r_;
coef_J_pure(0, 1) = s_l_12_r_ * s_l_17_r_ * 2.0;
coef_J_pure(0, 2) = -s_l_12_r_ * s_l_16_r_;
coef_J_pure(0, 3) = s_l_12_r_ * s_l_13_r_;
coef_J_pure(0, 4) = s_l_7_r_ * s_l_12_r_ * -2.0 + s_l_17_r_ * s_l_17_r_;
coef_J_pure(0, 5) = s_l_12_r_ * s_l_15_r_ - s_l_16_r_ * s_l_17_r_;
coef_J_pure(0, 6) = s_l_13_r_ * s_l_17_r_ + s_l_12_r_ * s_l_24_r_ * 2.0;
coef_J_pure(0, 7) = s_l_8_r_ * s_l_12_r_ * -2.0 + s_l_25_r_ * s_l_25_r_;
coef_J_pure(0, 8) = s_l_12_r_ * s_l_14_r_ * 2.0 - s_l_13_r_ * s_l_25_r_;
coef_J_pure(0, 9) = s_l_10_r_ * s_l_12_r_ * -2.0 + s_l_54_r_ * s_l_54_r_;
coef_J_pure(0, 10) = n1 * s_l_12_r_ * 2.0;
coef_J_pure(0, 11) = n2 * s_l_12_r_ * 2.0;
coef_J_pure(0, 12) = n3 * s_l_12_r_ * 2.0;
coef_J_pure(0, 13) = s_l_9_r_ * s_l_12_r_ * -2.0;
coef_J_pure(0, 14) = s_l_7_r_ * s_l_17_r_ * -2.0;
coef_J_pure(0, 15) = s_l_7_r_ * s_l_16_r_ + s_l_15_r_ * s_l_17_r_;
coef_J_pure(0, 16) = -s_l_7_r_ * s_l_13_r_ + s_l_17_r_ * s_l_24_r_ * 2.0;
coef_J_pure(0, 17) = s_l_8_r_ * s_l_17_r_ * -2.0 - s_l_15_r_ * s_l_25_r_;
coef_J_pure(0, 18) = s_l_14_r_ * s_l_17_r_ * 2.0 - s_l_16_r_ * s_l_24_r_ + s_l_13_r_ * s_l_48_r_;
coef_J_pure(0, 19) = s_l_10_r_ * s_l_17_r_ * -2.0 + s_l_13_r_ * s_l_24_r_;
coef_J_pure(0, 20) = n1 * s_l_17_r_ * 2.0;
coef_J_pure(0, 21) = n2 * s_l_17_r_ * 2.0;
coef_J_pure(0, 22) = n3 * s_l_17_r_ * 2.0;
coef_J_pure(0, 23) = s_l_9_r_ * s_l_17_r_ * -2.0;
coef_J_pure(0, 24) = s_l_8_r_ * s_l_16_r_;
coef_J_pure(0, 25) = -s_l_8_r_ * s_l_13_r_ - s_l_14_r_ * s_l_16_r_;
coef_J_pure(0, 26) = s_l_10_r_ * s_l_16_r_ + s_l_13_r_ * s_l_14_r_;
coef_J_pure(0, 27) = n1 * s_l_25_r_ * -2.0;
coef_J_pure(0, 28) = n2 * s_l_25_r_ * -2.0;
coef_J_pure(0, 29) = n3 * s_l_25_r_ * -2.0;
coef_J_pure(0, 30) = s_l_9_r_ * s_l_16_r_;
coef_J_pure(0, 31) = -s_l_10_r_ * s_l_13_r_;
coef_J_pure(0, 32) = n1 * s_l_54_r_ * 2.0;
coef_J_pure(0, 33) = n2 * s_l_54_r_ * 2.0;
coef_J_pure(0, 34) = n3 * s_l_54_r_ * 2.0;
coef_J_pure(0, 35) = -s_l_9_r_ * s_l_13_r_;
coef_J_pure(0, 36) = s_l_7_r_ * s_l_7_r_;
coef_J_pure(0, 37) = -s_l_7_r_ * s_l_15_r_;
coef_J_pure(0, 38) = s_l_7_r_ * s_l_24_r_ * -2.0;
coef_J_pure(0, 39) = s_l_7_r_ * s_l_8_r_ * 2.0 + s_l_48_r_ * s_l_48_r_;
coef_J_pure(0, 40) = s_l_7_r_ * s_l_14_r_ * -2.0 + s_l_15_r_ * s_l_24_r_;
coef_J_pure(0, 41) = s_l_7_r_ * s_l_10_r_ * 2.0 + s_l_24_r_ * s_l_24_r_;
coef_J_pure(0, 42) = n1 * s_l_7_r_ * -2.0;
coef_J_pure(0, 43) = n2 * s_l_7_r_ * -2.0;
coef_J_pure(0, 44) = n3 * s_l_7_r_ * -2.0;
coef_J_pure(0, 45) = s_l_7_r_ * s_l_9_r_ * 2.0;
coef_J_pure(0, 46) = -s_l_8_r_ * s_l_15_r_;
coef_J_pure(0, 47) = s_l_14_r_ * s_l_15_r_ - s_l_8_r_ * s_l_24_r_ * 2.0;
coef_J_pure(0, 48) = -s_l_10_r_ * s_l_15_r_ + s_l_14_r_ * s_l_24_r_ * 2.0;
coef_J_pure(0, 49) = n1 * s_l_48_r_ * 2.0;
coef_J_pure(0, 50) = n2 * s_l_48_r_ * 2.0;
coef_J_pure(0, 51) = n3 * s_l_48_r_ * 2.0;
coef_J_pure(0, 52) = -s_l_9_r_ * s_l_15_r_;
coef_J_pure(0, 53) = s_l_10_r_ * s_l_24_r_ * -2.0;
coef_J_pure(0, 54) = n1 * s_l_24_r_ * 2.0;
coef_J_pure(0, 55) = n2 * s_l_24_r_ * 2.0;
coef_J_pure(0, 56) = n3 * s_l_24_r_ * 2.0;
coef_J_pure(0, 57) = s_l_9_r_ * s_l_24_r_ * -2.0;
coef_J_pure(0, 58) = s_l_8_r_ * s_l_8_r_;
coef_J_pure(0, 59) = s_l_8_r_ * s_l_14_r_ * -2.0;
coef_J_pure(0, 60) = s_l_8_r_ * s_l_10_r_ * 2.0 + s_l_14_r_ * s_l_14_r_;
coef_J_pure(0, 61) = n1 * s_l_8_r_ * -2.0;
coef_J_pure(0, 62) = n2 * s_l_8_r_ * -2.0;
coef_J_pure(0, 63) = n3 * s_l_8_r_ * -2.0;
coef_J_pure(0, 64) = s_l_8_r_ * s_l_9_r_ * 2.0;
coef_J_pure(0, 65) = s_l_10_r_ * s_l_14_r_ * -2.0;
coef_J_pure(0, 66) = n1 * s_l_14_r_ * 2.0;
coef_J_pure(0, 67) = n2 * s_l_14_r_ * 2.0;
coef_J_pure(0, 68) = n3 * s_l_14_r_ * 2.0;
coef_J_pure(0, 69) = s_l_9_r_ * s_l_14_r_ * -2.0;
coef_J_pure(0, 70) = s_l_10_r_ * s_l_10_r_;
coef_J_pure(0, 71) = n1 * s_l_10_r_ * -2.0;
coef_J_pure(0, 72) = n2 * s_l_10_r_ * -2.0;
coef_J_pure(0, 73) = n3 * s_l_10_r_ * -2.0;
coef_J_pure(0, 74) = s_l_9_r_ * s_l_10_r_ * 2.0;
coef_J_pure(0, 75) = s_l_3_r_;
coef_J_pure(0, 76) = n1 * n2 * 2.0;
coef_J_pure(0, 77) = n1 * n3 * 2.0;
coef_J_pure(0, 78) = n1 * s_l_9_r_ * -2.0;
coef_J_pure(0, 79) = s_l_2_r_;
coef_J_pure(0, 80) = n2 * n3 * 2.0;
coef_J_pure(0, 81) = n2 * s_l_9_r_ * -2.0;
coef_J_pure(0, 82) = s_l_1_r_;
coef_J_pure(0, 83) = n3 * s_l_9_r_ * -2.0;
coef_J_pure(0, 84) = s_l_9_r_ * s_l_9_r_;
}
void mixed2_pTop_func(Eigen::Matrix<double, 3, 3> &G,
Eigen::Matrix<double, 1, 11> &coeftq1,
Eigen::Matrix<double, 1, 11> &coeftq2,
Eigen::Matrix<double, 1, 11> &coeftq3,
Eigen::Matrix<double, 1, 36> &coef_Jacob1_qt,
Eigen::Matrix<double, 1, 36> &coef_Jacob2_qt,
Eigen::Matrix<double, 1, 36> &coef_Jacob3_qt,
Eigen::Matrix<double, 1, 36> &coef_Jacob4_qt,
const Eigen::Matrix<double, 1, 85> &coef_J_pure) {
double coef_J1 = coef_J_pure(0);
double coef_J2 = coef_J_pure(1);
double coef_J3 = coef_J_pure(2);
double coef_J4 = coef_J_pure(3);
double coef_J5 = coef_J_pure(4);
double coef_J6 = coef_J_pure(5);
double coef_J7 = coef_J_pure(6);
double coef_J8 = coef_J_pure(7);
double coef_J9 = coef_J_pure(8);
double coef_J10 = coef_J_pure(9);
double coef_J11 = coef_J_pure(10);
double coef_J12 = coef_J_pure(11);
double coef_J13 = coef_J_pure(12);
double coef_J14 = coef_J_pure(13);
double coef_J15 = coef_J_pure(14);
double coef_J16 = coef_J_pure(15);
double coef_J17 = coef_J_pure(16);
double coef_J18 = coef_J_pure(17);
double coef_J19 = coef_J_pure(18);
double coef_J20 = coef_J_pure(19);
double coef_J21 = coef_J_pure(20);
double coef_J22 = coef_J_pure(21);
double coef_J23 = coef_J_pure(22);
double coef_J24 = coef_J_pure(23);
double coef_J25 = coef_J_pure(24);
double coef_J26 = coef_J_pure(25);
double coef_J27 = coef_J_pure(26);
double coef_J28 = coef_J_pure(27);
double coef_J29 = coef_J_pure(28);
double coef_J30 = coef_J_pure(29);
double coef_J31 = coef_J_pure(30);
double coef_J32 = coef_J_pure(31);
double coef_J33 = coef_J_pure(32);
double coef_J34 = coef_J_pure(33);
double coef_J35 = coef_J_pure(34);
double coef_J36 = coef_J_pure(35);
double coef_J37 = coef_J_pure(36);
double coef_J38 = coef_J_pure(37);
double coef_J39 = coef_J_pure(38);
double coef_J40 = coef_J_pure(39);
double coef_J41 = coef_J_pure(40);
double coef_J42 = coef_J_pure(41);
double coef_J43 = coef_J_pure(42);
double coef_J44 = coef_J_pure(43);
double coef_J45 = coef_J_pure(44);
double coef_J46 = coef_J_pure(45);
double coef_J47 = coef_J_pure(46);
double coef_J48 = coef_J_pure(47);
double coef_J49 = coef_J_pure(48);
double coef_J50 = coef_J_pure(49);
double coef_J51 = coef_J_pure(50);
double coef_J52 = coef_J_pure(51);
double coef_J53 = coef_J_pure(52);
double coef_J54 = coef_J_pure(53);
double coef_J55 = coef_J_pure(54);
double coef_J56 = coef_J_pure(55);
double coef_J57 = coef_J_pure(56);
double coef_J58 = coef_J_pure(57);
double coef_J59 = coef_J_pure(58);
double coef_J60 = coef_J_pure(59);
double coef_J61 = coef_J_pure(60);
double coef_J62 = coef_J_pure(61);
double coef_J63 = coef_J_pure(62);
double coef_J64 = coef_J_pure(63);
double coef_J65 = coef_J_pure(64);
double coef_J66 = coef_J_pure(65);
double coef_J67 = coef_J_pure(66);
double coef_J68 = coef_J_pure(67);
double coef_J69 = coef_J_pure(68);
double coef_J70 = coef_J_pure(69);
double coef_J71 = coef_J_pure(70);
double coef_J72 = coef_J_pure(71);
double coef_J73 = coef_J_pure(72);
double coef_J74 = coef_J_pure(73);
double coef_J75 = coef_J_pure(74);
double coef_J76 = coef_J_pure(75);
double coef_J77 = coef_J_pure(76);
double coef_J78 = coef_J_pure(77);
double coef_J79 = coef_J_pure(78);
double coef_J80 = coef_J_pure(79);
double coef_J81 = coef_J_pure(80);
double coef_J82 = coef_J_pure(81);
double coef_J83 = coef_J_pure(82);
double coef_J84 = coef_J_pure(83);
double coef_J85 = coef_J_pure(84);
G(0, 0) = coef_J76 * -2.0;
G(0, 1) = -coef_J77;
G(0, 2) = -coef_J78;
G(1, 0) = -coef_J77;
G(1, 1) = coef_J80 * -2.0;
G(1, 2) = -coef_J81;
G(2, 0) = -coef_J78;
G(2, 1) = -coef_J81;
G(2, 2) = coef_J83 * -2.0;
coeftq1(0, 0) = coef_J11;
coeftq1(0, 1) = coef_J21;
coeftq1(0, 2) = coef_J28;
coeftq1(0, 3) = coef_J33;
coeftq1(0, 4) = coef_J43;
coeftq1(0, 5) = coef_J50;
coeftq1(0, 6) = coef_J55;
coeftq1(0, 7) = coef_J62;
coeftq1(0, 8) = coef_J67;
coeftq1(0, 9) = coef_J72;
coeftq1(0, 10) = coef_J79;
coeftq2(0, 0) = coef_J12;
coeftq2(0, 1) = coef_J22;
coeftq2(0, 2) = coef_J29;
coeftq2(0, 3) = coef_J34;
coeftq2(0, 4) = coef_J44;
coeftq2(0, 5) = coef_J51;
coeftq2(0, 6) = coef_J56;
coeftq2(0, 7) = coef_J63;
coeftq2(0, 8) = coef_J68;
coeftq2(0, 9) = coef_J73;
coeftq2(0, 10) = coef_J82;
coeftq3(0, 0) = coef_J13;
coeftq3(0, 1) = coef_J23;
coeftq3(0, 2) = coef_J30;
coeftq3(0, 3) = coef_J35;
coeftq3(0, 4) = coef_J45;
coeftq3(0, 5) = coef_J52;
coeftq3(0, 6) = coef_J57;
coeftq3(0, 7) = coef_J64;
coeftq3(0, 8) = coef_J69;
coeftq3(0, 9) = coef_J74;
coeftq3(0, 10) = coef_J84;
coef_Jacob1_qt(0, 0) = coef_J1 * 4.0;
coef_Jacob1_qt(0, 1) = coef_J2 * 3.0;
coef_Jacob1_qt(0, 2) = coef_J3 * 3.0;
coef_Jacob1_qt(0, 3) = coef_J4 * 3.0;
coef_Jacob1_qt(0, 4) = coef_J5 * 2.0;
coef_Jacob1_qt(0, 5) = coef_J6 * 2.0;
coef_Jacob1_qt(0, 6) = coef_J7 * 2.0;
coef_Jacob1_qt(0, 7) = coef_J8 * 2.0;
coef_Jacob1_qt(0, 8) = coef_J9 * 2.0;
coef_Jacob1_qt(0, 9) = coef_J10 * 2.0;
coef_Jacob1_qt(0, 10) = coef_J11 * 2.0;
coef_Jacob1_qt(0, 11) = coef_J12 * 2.0;
coef_Jacob1_qt(0, 12) = coef_J13 * 2.0;
coef_Jacob1_qt(0, 13) = coef_J14 * 2.0;
coef_Jacob1_qt(0, 14) = coef_J15;
coef_Jacob1_qt(0, 15) = coef_J16;
coef_Jacob1_qt(0, 16) = coef_J17;
coef_Jacob1_qt(0, 17) = coef_J18;
coef_Jacob1_qt(0, 18) = coef_J19;
coef_Jacob1_qt(0, 19) = coef_J20;
coef_Jacob1_qt(0, 20) = coef_J21;
coef_Jacob1_qt(0, 21) = coef_J22;
coef_Jacob1_qt(0, 22) = coef_J23;
coef_Jacob1_qt(0, 23) = coef_J24;
coef_Jacob1_qt(0, 24) = coef_J25;
coef_Jacob1_qt(0, 25) = coef_J26;
coef_Jacob1_qt(0, 26) = coef_J27;
coef_Jacob1_qt(0, 27) = coef_J28;
coef_Jacob1_qt(0, 28) = coef_J29;
coef_Jacob1_qt(0, 29) = coef_J30;
coef_Jacob1_qt(0, 30) = coef_J31;
coef_Jacob1_qt(0, 31) = coef_J32;
coef_Jacob1_qt(0, 32) = coef_J33;
coef_Jacob1_qt(0, 33) = coef_J34;
coef_Jacob1_qt(0, 34) = coef_J35;
coef_Jacob1_qt(0, 35) = coef_J36;
coef_Jacob2_qt(0, 0) = coef_J2;
coef_Jacob2_qt(0, 1) = coef_J5 * 2.0;
coef_Jacob2_qt(0, 2) = coef_J6;
coef_Jacob2_qt(0, 3) = coef_J7;
coef_Jacob2_qt(0, 4) = coef_J15 * 3.0;
coef_Jacob2_qt(0, 5) = coef_J16 * 2.0;
coef_Jacob2_qt(0, 6) = coef_J17 * 2.0;
coef_Jacob2_qt(0, 7) = coef_J18;
coef_Jacob2_qt(0, 8) = coef_J19;
coef_Jacob2_qt(0, 9) = coef_J20;
coef_Jacob2_qt(0, 10) = coef_J21;
coef_Jacob2_qt(0, 11) = coef_J22;
coef_Jacob2_qt(0, 12) = coef_J23;
coef_Jacob2_qt(0, 13) = coef_J24;
coef_Jacob2_qt(0, 14) = coef_J37 * 4.0;
coef_Jacob2_qt(0, 15) = coef_J38 * 3.0;
coef_Jacob2_qt(0, 16) = coef_J39 * 3.0;
coef_Jacob2_qt(0, 17) = coef_J40 * 2.0;
coef_Jacob2_qt(0, 18) = coef_J41 * 2.0;
coef_Jacob2_qt(0, 19) = coef_J42 * 2.0;
coef_Jacob2_qt(0, 20) = coef_J43 * 2.0;
coef_Jacob2_qt(0, 21) = coef_J44 * 2.0;
coef_Jacob2_qt(0, 22) = coef_J45 * 2.0;
coef_Jacob2_qt(0, 23) = coef_J46 * 2.0;
coef_Jacob2_qt(0, 24) = coef_J47;
coef_Jacob2_qt(0, 25) = coef_J48;
coef_Jacob2_qt(0, 26) = coef_J49;
coef_Jacob2_qt(0, 27) = coef_J50;
coef_Jacob2_qt(0, 28) = coef_J51;
coef_Jacob2_qt(0, 29) = coef_J52;
coef_Jacob2_qt(0, 30) = coef_J53;
coef_Jacob2_qt(0, 31) = coef_J54;
coef_Jacob2_qt(0, 32) = coef_J55;
coef_Jacob2_qt(0, 33) = coef_J56;
coef_Jacob2_qt(0, 34) = coef_J57;
coef_Jacob2_qt(0, 35) = coef_J58;
coef_Jacob3_qt(0, 0) = coef_J3;
coef_Jacob3_qt(0, 1) = coef_J6;
coef_Jacob3_qt(0, 2) = coef_J8 * 2.0;
coef_Jacob3_qt(0, 3) = coef_J9;
coef_Jacob3_qt(0, 4) = coef_J16;
coef_Jacob3_qt(0, 5) = coef_J18 * 2.0;
coef_Jacob3_qt(0, 6) = coef_J19;
coef_Jacob3_qt(0, 7) = coef_J25 * 3.0;
coef_Jacob3_qt(0, 8) = coef_J26 * 2.0;
coef_Jacob3_qt(0, 9) = coef_J27;
coef_Jacob3_qt(0, 10) = coef_J28;
coef_Jacob3_qt(0, 11) = coef_J29;
coef_Jacob3_qt(0, 12) = coef_J30;
coef_Jacob3_qt(0, 13) = coef_J31;
coef_Jacob3_qt(0, 14) = coef_J38;
coef_Jacob3_qt(0, 15) = coef_J40 * 2.0;
coef_Jacob3_qt(0, 16) = coef_J41;
coef_Jacob3_qt(0, 17) = coef_J47 * 3.0;
coef_Jacob3_qt(0, 18) = coef_J48 * 2.0;
coef_Jacob3_qt(0, 19) = coef_J49;
coef_Jacob3_qt(0, 20) = coef_J50;
coef_Jacob3_qt(0, 21) = coef_J51;
coef_Jacob3_qt(0, 22) = coef_J52;
coef_Jacob3_qt(0, 23) = coef_J53;
coef_Jacob3_qt(0, 24) = coef_J59 * 4.0;
coef_Jacob3_qt(0, 25) = coef_J60 * 3.0;
coef_Jacob3_qt(0, 26) = coef_J61 * 2.0;
coef_Jacob3_qt(0, 27) = coef_J62 * 2.0;
coef_Jacob3_qt(0, 28) = coef_J63 * 2.0;
coef_Jacob3_qt(0, 29) = coef_J64 * 2.0;
coef_Jacob3_qt(0, 30) = coef_J65 * 2.0;
coef_Jacob3_qt(0, 31) = coef_J66;
coef_Jacob3_qt(0, 32) = coef_J67;
coef_Jacob3_qt(0, 33) = coef_J68;
coef_Jacob3_qt(0, 34) = coef_J69;
coef_Jacob3_qt(0, 35) = coef_J70;
coef_Jacob4_qt(0, 0) = coef_J4;
coef_Jacob4_qt(0, 1) = coef_J7;
coef_Jacob4_qt(0, 2) = coef_J9;
coef_Jacob4_qt(0, 3) = coef_J10 * 2.0;
coef_Jacob4_qt(0, 4) = coef_J17;
coef_Jacob4_qt(0, 5) = coef_J19;
coef_Jacob4_qt(0, 6) = coef_J20 * 2.0;
coef_Jacob4_qt(0, 7) = coef_J26;
coef_Jacob4_qt(0, 8) = coef_J27 * 2.0;
coef_Jacob4_qt(0, 9) = coef_J32 * 3.0;
coef_Jacob4_qt(0, 10) = coef_J33;
coef_Jacob4_qt(0, 11) = coef_J34;
coef_Jacob4_qt(0, 12) = coef_J35;
coef_Jacob4_qt(0, 13) = coef_J36;
coef_Jacob4_qt(0, 14) = coef_J39;
coef_Jacob4_qt(0, 15) = coef_J41;
coef_Jacob4_qt(0, 16) = coef_J42 * 2.0;
coef_Jacob4_qt(0, 17) = coef_J48;
coef_Jacob4_qt(0, 18) = coef_J49 * 2.0;
coef_Jacob4_qt(0, 19) = coef_J54 * 3.0;
coef_Jacob4_qt(0, 20) = coef_J55;
coef_Jacob4_qt(0, 21) = coef_J56;
coef_Jacob4_qt(0, 22) = coef_J57;
coef_Jacob4_qt(0, 23) = coef_J58;
coef_Jacob4_qt(0, 24) = coef_J60;
coef_Jacob4_qt(0, 25) = coef_J61 * 2.0;
coef_Jacob4_qt(0, 26) = coef_J66 * 3.0;
coef_Jacob4_qt(0, 27) = coef_J67;
coef_Jacob4_qt(0, 28) = coef_J68;
coef_Jacob4_qt(0, 29) = coef_J69;
coef_Jacob4_qt(0, 30) = coef_J70;
coef_Jacob4_qt(0, 31) = coef_J71 * 4.0;
coef_Jacob4_qt(0, 32) = coef_J72 * 2.0;
coef_Jacob4_qt(0, 33) = coef_J73 * 2.0;
coef_Jacob4_qt(0, 34) = coef_J74 * 2.0;
coef_Jacob4_qt(0, 35) = coef_J75 * 2.0;
}
void mixed3_pTop_func(Eigen::Matrix<double, 4, 24> &coef_f_q_sym,
Eigen::Matrix<double, 4, 64> &W,
Eigen::Matrix<double, 4, 4> &Q,
const Eigen::Matrix<double, 3, 3> &pinvG,
const Eigen::Matrix<double, 3, 11> &coefs_tq,
const Eigen::Matrix<double, 4, 36> &coef_Jacob_qt_syms) {
double pinvG1_1 = pinvG(0, 0);
double pinvG1_2 = pinvG(0, 1);
double pinvG1_3 = pinvG(0, 2);
double pinvG2_1 = pinvG(1, 0);
double pinvG2_2 = pinvG(1, 1);
double pinvG2_3 = pinvG(1, 2);
double pinvG3_1 = pinvG(2, 0);
double pinvG3_2 = pinvG(2, 1);
double pinvG3_3 = pinvG(2, 2);
double coefs_tq1_1 = coefs_tq(0, 0);
double coefs_tq1_2 = coefs_tq(0, 1);
double coefs_tq1_3 = coefs_tq(0, 2);
double coefs_tq1_4 = coefs_tq(0, 3);
double coefs_tq1_5 = coefs_tq(0, 4);
double coefs_tq1_6 = coefs_tq(0, 5);
double coefs_tq1_7 = coefs_tq(0, 6);
double coefs_tq1_8 = coefs_tq(0, 7);
double coefs_tq1_9 = coefs_tq(0, 8);
double coefs_tq1_10 = coefs_tq(0, 9);
double coefs_tq1_11 = coefs_tq(0, 10);
double coefs_tq2_1 = coefs_tq(1, 0);
double coefs_tq2_2 = coefs_tq(1, 1);
double coefs_tq2_3 = coefs_tq(1, 2);
double coefs_tq2_4 = coefs_tq(1, 3);
double coefs_tq2_5 = coefs_tq(1, 4);
double coefs_tq2_6 = coefs_tq(1, 5);
double coefs_tq2_7 = coefs_tq(1, 6);
double coefs_tq2_8 = coefs_tq(1, 7);
double coefs_tq2_9 = coefs_tq(1, 8);
double coefs_tq2_10 = coefs_tq(1, 9);
double coefs_tq2_11 = coefs_tq(1, 10);
double coefs_tq3_1 = coefs_tq(2, 0);
double coefs_tq3_2 = coefs_tq(2, 1);
double coefs_tq3_3 = coefs_tq(2, 2);
double coefs_tq3_4 = coefs_tq(2, 3);
double coefs_tq3_5 = coefs_tq(2, 4);
double coefs_tq3_6 = coefs_tq(2, 5);
double coefs_tq3_7 = coefs_tq(2, 6);
double coefs_tq3_8 = coefs_tq(2, 7);
double coefs_tq3_9 = coefs_tq(2, 8);
double coefs_tq3_10 = coefs_tq(2, 9);
double coefs_tq3_11 = coefs_tq(2, 10);
double coef_Jacob1_qt_syms1 = coef_Jacob_qt_syms(0, 0);
double coef_Jacob1_qt_syms2 = coef_Jacob_qt_syms(0, 1);
double coef_Jacob1_qt_syms3 = coef_Jacob_qt_syms(0, 2);
double coef_Jacob1_qt_syms4 = coef_Jacob_qt_syms(0, 3);
double coef_Jacob1_qt_syms5 = coef_Jacob_qt_syms(0, 4);
double coef_Jacob1_qt_syms6 = coef_Jacob_qt_syms(0, 5);
double coef_Jacob1_qt_syms7 = coef_Jacob_qt_syms(0, 6);
double coef_Jacob1_qt_syms8 = coef_Jacob_qt_syms(0, 7);
double coef_Jacob1_qt_syms9 = coef_Jacob_qt_syms(0, 8);
double coef_Jacob1_qt_syms10 = coef_Jacob_qt_syms(0, 9);
double coef_Jacob1_qt_syms11 = coef_Jacob_qt_syms(0, 10);
double coef_Jacob1_qt_syms12 = coef_Jacob_qt_syms(0, 11);
double coef_Jacob1_qt_syms13 = coef_Jacob_qt_syms(0, 12);
double coef_Jacob1_qt_syms14 = coef_Jacob_qt_syms(0, 13);
double coef_Jacob1_qt_syms15 = coef_Jacob_qt_syms(0, 14);
double coef_Jacob1_qt_syms16 = coef_Jacob_qt_syms(0, 15);
double coef_Jacob1_qt_syms17 = coef_Jacob_qt_syms(0, 16);
double coef_Jacob1_qt_syms18 = coef_Jacob_qt_syms(0, 17);
double coef_Jacob1_qt_syms19 = coef_Jacob_qt_syms(0, 18);
double coef_Jacob1_qt_syms20 = coef_Jacob_qt_syms(0, 19);
double coef_Jacob1_qt_syms21 = coef_Jacob_qt_syms(0, 20);
double coef_Jacob1_qt_syms22 = coef_Jacob_qt_syms(0, 21);
double coef_Jacob1_qt_syms23 = coef_Jacob_qt_syms(0, 22);
double coef_Jacob1_qt_syms24 = coef_Jacob_qt_syms(0, 23);
double coef_Jacob1_qt_syms25 = coef_Jacob_qt_syms(0, 24);
double coef_Jacob1_qt_syms26 = coef_Jacob_qt_syms(0, 25);
double coef_Jacob1_qt_syms27 = coef_Jacob_qt_syms(0, 26);
double coef_Jacob1_qt_syms28 = coef_Jacob_qt_syms(0, 27);
double coef_Jacob1_qt_syms29 = coef_Jacob_qt_syms(0, 28);
double coef_Jacob1_qt_syms30 = coef_Jacob_qt_syms(0, 29);
double coef_Jacob1_qt_syms31 = coef_Jacob_qt_syms(0, 30);
double coef_Jacob1_qt_syms32 = coef_Jacob_qt_syms(0, 31);
double coef_Jacob1_qt_syms33 = coef_Jacob_qt_syms(0, 32);
double coef_Jacob1_qt_syms34 = coef_Jacob_qt_syms(0, 33);
double coef_Jacob1_qt_syms35 = coef_Jacob_qt_syms(0, 34);
double coef_Jacob1_qt_syms36 = coef_Jacob_qt_syms(0, 35);
double coef_Jacob2_qt_syms1 = coef_Jacob_qt_syms(1, 0);
double coef_Jacob2_qt_syms2 = coef_Jacob_qt_syms(1, 1);
double coef_Jacob2_qt_syms3 = coef_Jacob_qt_syms(1, 2);
double coef_Jacob2_qt_syms4 = coef_Jacob_qt_syms(1, 3);
double coef_Jacob2_qt_syms5 = coef_Jacob_qt_syms(1, 4);
double coef_Jacob2_qt_syms6 = coef_Jacob_qt_syms(1, 5);
double coef_Jacob2_qt_syms7 = coef_Jacob_qt_syms(1, 6);
double coef_Jacob2_qt_syms8 = coef_Jacob_qt_syms(1, 7);
double coef_Jacob2_qt_syms9 = coef_Jacob_qt_syms(1, 8);
double coef_Jacob2_qt_syms10 = coef_Jacob_qt_syms(1, 9);
double coef_Jacob2_qt_syms11 = coef_Jacob_qt_syms(1, 10);
double coef_Jacob2_qt_syms12 = coef_Jacob_qt_syms(1, 11);
double coef_Jacob2_qt_syms13 = coef_Jacob_qt_syms(1, 12);
double coef_Jacob2_qt_syms14 = coef_Jacob_qt_syms(1, 13);
double coef_Jacob2_qt_syms15 = coef_Jacob_qt_syms(1, 14);
double coef_Jacob2_qt_syms16 = coef_Jacob_qt_syms(1, 15);
double coef_Jacob2_qt_syms17 = coef_Jacob_qt_syms(1, 16);
double coef_Jacob2_qt_syms18 = coef_Jacob_qt_syms(1, 17);
double coef_Jacob2_qt_syms19 = coef_Jacob_qt_syms(1, 18);
double coef_Jacob2_qt_syms20 = coef_Jacob_qt_syms(1, 19);
double coef_Jacob2_qt_syms21 = coef_Jacob_qt_syms(1, 20);
double coef_Jacob2_qt_syms22 = coef_Jacob_qt_syms(1, 21);
double coef_Jacob2_qt_syms23 = coef_Jacob_qt_syms(1, 22);
double coef_Jacob2_qt_syms24 = coef_Jacob_qt_syms(1, 23);
double coef_Jacob2_qt_syms25 = coef_Jacob_qt_syms(1, 24);
double coef_Jacob2_qt_syms26 = coef_Jacob_qt_syms(1, 25);
double coef_Jacob2_qt_syms27 = coef_Jacob_qt_syms(1, 26);
double coef_Jacob2_qt_syms28 = coef_Jacob_qt_syms(1, 27);
double coef_Jacob2_qt_syms29 = coef_Jacob_qt_syms(1, 28);
double coef_Jacob2_qt_syms30 = coef_Jacob_qt_syms(1, 29);
double coef_Jacob2_qt_syms31 = coef_Jacob_qt_syms(1, 30);
double coef_Jacob2_qt_syms32 = coef_Jacob_qt_syms(1, 31);
double coef_Jacob2_qt_syms33 = coef_Jacob_qt_syms(1, 32);
double coef_Jacob2_qt_syms34 = coef_Jacob_qt_syms(1, 33);
double coef_Jacob2_qt_syms35 = coef_Jacob_qt_syms(1, 34);
double coef_Jacob2_qt_syms36 = coef_Jacob_qt_syms(1, 35);
double coef_Jacob3_qt_syms1 = coef_Jacob_qt_syms(2, 0);
double coef_Jacob3_qt_syms2 = coef_Jacob_qt_syms(2, 1);
double coef_Jacob3_qt_syms3 = coef_Jacob_qt_syms(2, 2);
double coef_Jacob3_qt_syms4 = coef_Jacob_qt_syms(2, 3);
double coef_Jacob3_qt_syms5 = coef_Jacob_qt_syms(2, 4);
double coef_Jacob3_qt_syms6 = coef_Jacob_qt_syms(2, 5);
double coef_Jacob3_qt_syms7 = coef_Jacob_qt_syms(2, 6);
double coef_Jacob3_qt_syms8 = coef_Jacob_qt_syms(2, 7);
double coef_Jacob3_qt_syms9 = coef_Jacob_qt_syms(2, 8);
double coef_Jacob3_qt_syms10 = coef_Jacob_qt_syms(2, 9);
double coef_Jacob3_qt_syms11 = coef_Jacob_qt_syms(2, 10);
double coef_Jacob3_qt_syms12 = coef_Jacob_qt_syms(2, 11);
double coef_Jacob3_qt_syms13 = coef_Jacob_qt_syms(2, 12);
double coef_Jacob3_qt_syms14 = coef_Jacob_qt_syms(2, 13);
double coef_Jacob3_qt_syms15 = coef_Jacob_qt_syms(2, 14);
double coef_Jacob3_qt_syms16 = coef_Jacob_qt_syms(2, 15);
double coef_Jacob3_qt_syms17 = coef_Jacob_qt_syms(2, 16);
double coef_Jacob3_qt_syms18 = coef_Jacob_qt_syms(2, 17);
double coef_Jacob3_qt_syms19 = coef_Jacob_qt_syms(2, 18);
double coef_Jacob3_qt_syms20 = coef_Jacob_qt_syms(2, 19);
double coef_Jacob3_qt_syms21 = coef_Jacob_qt_syms(2, 20);
double coef_Jacob3_qt_syms22 = coef_Jacob_qt_syms(2, 21);
double coef_Jacob3_qt_syms23 = coef_Jacob_qt_syms(2, 22);
double coef_Jacob3_qt_syms24 = coef_Jacob_qt_syms(2, 23);
double coef_Jacob3_qt_syms25 = coef_Jacob_qt_syms(2, 24);
double coef_Jacob3_qt_syms26 = coef_Jacob_qt_syms(2, 25);
double coef_Jacob3_qt_syms27 = coef_Jacob_qt_syms(2, 26);
double coef_Jacob3_qt_syms28 = coef_Jacob_qt_syms(2, 27);
double coef_Jacob3_qt_syms29 = coef_Jacob_qt_syms(2, 28);
double coef_Jacob3_qt_syms30 = coef_Jacob_qt_syms(2, 29);
double coef_Jacob3_qt_syms31 = coef_Jacob_qt_syms(2, 30);
double coef_Jacob3_qt_syms32 = coef_Jacob_qt_syms(2, 31);
double coef_Jacob3_qt_syms33 = coef_Jacob_qt_syms(2, 32);
double coef_Jacob3_qt_syms34 = coef_Jacob_qt_syms(2, 33);
double coef_Jacob3_qt_syms35 = coef_Jacob_qt_syms(2, 34);
double coef_Jacob3_qt_syms36 = coef_Jacob_qt_syms(2, 35);
double coef_Jacob4_qt_syms1 = coef_Jacob_qt_syms(3, 0);
double coef_Jacob4_qt_syms2 = coef_Jacob_qt_syms(3, 1);
double coef_Jacob4_qt_syms3 = coef_Jacob_qt_syms(3, 2);
double coef_Jacob4_qt_syms4 = coef_Jacob_qt_syms(3, 3);
double coef_Jacob4_qt_syms5 = coef_Jacob_qt_syms(3, 4);
double coef_Jacob4_qt_syms6 = coef_Jacob_qt_syms(3, 5);
double coef_Jacob4_qt_syms7 = coef_Jacob_qt_syms(3, 6);
double coef_Jacob4_qt_syms8 = coef_Jacob_qt_syms(3, 7);
double coef_Jacob4_qt_syms9 = coef_Jacob_qt_syms(3, 8);
double coef_Jacob4_qt_syms10 = coef_Jacob_qt_syms(3, 9);
double coef_Jacob4_qt_syms11 = coef_Jacob_qt_syms(3, 10);
double coef_Jacob4_qt_syms12 = coef_Jacob_qt_syms(3, 11);
double coef_Jacob4_qt_syms13 = coef_Jacob_qt_syms(3, 12);
double coef_Jacob4_qt_syms14 = coef_Jacob_qt_syms(3, 13);
double coef_Jacob4_qt_syms15 = coef_Jacob_qt_syms(3, 14);
double coef_Jacob4_qt_syms16 = coef_Jacob_qt_syms(3, 15);
double coef_Jacob4_qt_syms17 = coef_Jacob_qt_syms(3, 16);
double coef_Jacob4_qt_syms18 = coef_Jacob_qt_syms(3, 17);
double coef_Jacob4_qt_syms19 = coef_Jacob_qt_syms(3, 18);
double coef_Jacob4_qt_syms20 = coef_Jacob_qt_syms(3, 19);
double coef_Jacob4_qt_syms21 = coef_Jacob_qt_syms(3, 20);
double coef_Jacob4_qt_syms22 = coef_Jacob_qt_syms(3, 21);
double coef_Jacob4_qt_syms23 = coef_Jacob_qt_syms(3, 22);
double coef_Jacob4_qt_syms24 = coef_Jacob_qt_syms(3, 23);
double coef_Jacob4_qt_syms25 = coef_Jacob_qt_syms(3, 24);
double coef_Jacob4_qt_syms26 = coef_Jacob_qt_syms(3, 25);
double coef_Jacob4_qt_syms27 = coef_Jacob_qt_syms(3, 26);
double coef_Jacob4_qt_syms28 = coef_Jacob_qt_syms(3, 27);
double coef_Jacob4_qt_syms29 = coef_Jacob_qt_syms(3, 28);
double coef_Jacob4_qt_syms30 = coef_Jacob_qt_syms(3, 29);
double coef_Jacob4_qt_syms31 = coef_Jacob_qt_syms(3, 30);
double coef_Jacob4_qt_syms32 = coef_Jacob_qt_syms(3, 31);
double coef_Jacob4_qt_syms33 = coef_Jacob_qt_syms(3, 32);
double coef_Jacob4_qt_syms34 = coef_Jacob_qt_syms(3, 33);
double coef_Jacob4_qt_syms35 = coef_Jacob_qt_syms(3, 34);
double coef_Jacob4_qt_syms36 = coef_Jacob_qt_syms(3, 35);
coef_f_q_sym(0, 0) = coef_Jacob1_qt_syms1 + coefs_tq1_1 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_1 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq2_1 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq1_1 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_1 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq3_1 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq2_1 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_1 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq3_1 * coef_Jacob1_qt_syms13 * pinvG3_3;
coef_f_q_sym(0, 1) = coef_Jacob1_qt_syms2 + coefs_tq1_2 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_1 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_2 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq2_2 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq1_1 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq2_1 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq1_2 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_2 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq3_2 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq1_1 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_1 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq3_1 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq2_2 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_2 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq2_1 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_1 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq3_2 * coef_Jacob1_qt_syms13 * pinvG3_3 +
coefs_tq3_1 * coef_Jacob1_qt_syms23 * pinvG3_3;
coef_f_q_sym(0, 2) = coef_Jacob1_qt_syms3 + coefs_tq1_3 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_3 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq2_3 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq1_1 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_3 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_3 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq3_3 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq1_1 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq2_1 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq2_3 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_3 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq1_1 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_1 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq3_1 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq3_3 * coef_Jacob1_qt_syms13 * pinvG3_3 +
coefs_tq2_1 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_1 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq3_1 * coef_Jacob1_qt_syms30 * pinvG3_3;
coef_f_q_sym(0, 3) = coef_Jacob1_qt_syms4 + coefs_tq1_4 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_4 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq2_4 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq1_1 * coef_Jacob1_qt_syms33 * pinvG1_1 +
coefs_tq1_4 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_4 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq3_4 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq1_1 * coef_Jacob1_qt_syms34 * pinvG2_1 +
coefs_tq2_1 * coef_Jacob1_qt_syms33 * pinvG1_2 +
coefs_tq2_4 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_4 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq1_1 * coef_Jacob1_qt_syms35 * pinvG3_1 +
coefs_tq2_1 * coef_Jacob1_qt_syms34 * pinvG2_2 +
coefs_tq3_1 * coef_Jacob1_qt_syms33 * pinvG1_3 +
coefs_tq3_4 * coef_Jacob1_qt_syms13 * pinvG3_3 +
coefs_tq2_1 * coef_Jacob1_qt_syms35 * pinvG3_2 +
coefs_tq3_1 * coef_Jacob1_qt_syms34 * pinvG2_3 +
coefs_tq3_1 * coef_Jacob1_qt_syms35 * pinvG3_3;
coef_f_q_sym(0, 4) = coef_Jacob1_qt_syms5 + coefs_tq1_5 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_2 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_5 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq2_5 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq1_2 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq2_2 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq1_5 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_5 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq3_5 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq1_2 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_2 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq3_2 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq2_5 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_5 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq2_2 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_2 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq3_5 * coef_Jacob1_qt_syms13 * pinvG3_3 +
coefs_tq3_2 * coef_Jacob1_qt_syms23 * pinvG3_3;
coef_f_q_sym(0, 5) = coef_Jacob1_qt_syms6 + coefs_tq1_6 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_3 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_6 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq2_6 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq1_2 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_3 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq2_3 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq1_6 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_6 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq3_6 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq1_2 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq2_2 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq1_3 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_3 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq3_3 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq2_6 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_6 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq1_2 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_2 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq3_2 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq2_3 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_3 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq3_6 * coef_Jacob1_qt_syms13 * pinvG3_3 +
coefs_tq2_2 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_2 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq3_3 * coef_Jacob1_qt_syms23 * pinvG3_3 +
coefs_tq3_2 * coef_Jacob1_qt_syms30 * pinvG3_3;
coef_f_q_sym(0, 6) = coef_Jacob1_qt_syms7 + coefs_tq1_7 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_4 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_7 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq2_7 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq1_2 * coef_Jacob1_qt_syms33 * pinvG1_1 +
coefs_tq1_4 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq2_4 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq1_7 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_7 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq3_7 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq1_2 * coef_Jacob1_qt_syms34 * pinvG2_1 +
coefs_tq2_2 * coef_Jacob1_qt_syms33 * pinvG1_2 +
coefs_tq1_4 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_4 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq3_4 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq2_7 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_7 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq1_2 * coef_Jacob1_qt_syms35 * pinvG3_1 +
coefs_tq2_2 * coef_Jacob1_qt_syms34 * pinvG2_2 +
coefs_tq3_2 * coef_Jacob1_qt_syms33 * pinvG1_3 +
coefs_tq2_4 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_4 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq3_7 * coef_Jacob1_qt_syms13 * pinvG3_3 +
coefs_tq2_2 * coef_Jacob1_qt_syms35 * pinvG3_2 +
coefs_tq3_2 * coef_Jacob1_qt_syms34 * pinvG2_3 +
coefs_tq3_4 * coef_Jacob1_qt_syms23 * pinvG3_3 +
coefs_tq3_2 * coef_Jacob1_qt_syms35 * pinvG3_3;
coef_f_q_sym(0, 7) = coef_Jacob1_qt_syms8 + coefs_tq1_8 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_8 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq2_8 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq1_3 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_8 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_8 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq3_8 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq1_3 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq2_3 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq2_8 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_8 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq1_3 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_3 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq3_3 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq3_8 * coef_Jacob1_qt_syms13 * pinvG3_3 +
coefs_tq2_3 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_3 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq3_3 * coef_Jacob1_qt_syms30 * pinvG3_3;
coef_f_q_sym(0, 8) = coef_Jacob1_qt_syms9 + coefs_tq1_9 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_9 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq2_9 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq1_4 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_3 * coef_Jacob1_qt_syms33 * pinvG1_1 +
coefs_tq1_9 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_9 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq3_9 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq1_4 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq2_4 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq1_3 * coef_Jacob1_qt_syms34 * pinvG2_1 +
coefs_tq2_3 * coef_Jacob1_qt_syms33 * pinvG1_2 +
coefs_tq2_9 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_9 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq1_4 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_4 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq3_4 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq1_3 * coef_Jacob1_qt_syms35 * pinvG3_1 +
coefs_tq2_3 * coef_Jacob1_qt_syms34 * pinvG2_2 +
coefs_tq3_3 * coef_Jacob1_qt_syms33 * pinvG1_3 +
coefs_tq3_9 * coef_Jacob1_qt_syms13 * pinvG3_3 +
coefs_tq2_4 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_4 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq2_3 * coef_Jacob1_qt_syms35 * pinvG3_2 +
coefs_tq3_3 * coef_Jacob1_qt_syms34 * pinvG2_3 +
coefs_tq3_4 * coef_Jacob1_qt_syms30 * pinvG3_3 +
coefs_tq3_3 * coef_Jacob1_qt_syms35 * pinvG3_3;
coef_f_q_sym(0, 9) = coef_Jacob1_qt_syms10 + coefs_tq1_4 * coef_Jacob1_qt_syms33 * pinvG1_1 +
coefs_tq1_4 * coef_Jacob1_qt_syms34 * pinvG2_1 +
coefs_tq2_4 * coef_Jacob1_qt_syms33 * pinvG1_2 +
coefs_tq1_4 * coef_Jacob1_qt_syms35 * pinvG3_1 +
coefs_tq2_4 * coef_Jacob1_qt_syms34 * pinvG2_2 +
coefs_tq3_4 * coef_Jacob1_qt_syms33 * pinvG1_3 +
coefs_tq2_4 * coef_Jacob1_qt_syms35 * pinvG3_2 +
coefs_tq3_4 * coef_Jacob1_qt_syms34 * pinvG2_3 +
coefs_tq3_4 * coef_Jacob1_qt_syms35 * pinvG3_3 +
coefs_tq1_10 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_10 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq1_10 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_10 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq2_10 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq2_10 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_10 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq3_10 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq3_10 * coef_Jacob1_qt_syms13 * pinvG3_3;
coef_f_q_sym(0, 10) = coef_Jacob1_qt_syms14 + coefs_tq1_11 * coef_Jacob1_qt_syms11 * pinvG1_1 +
coefs_tq1_11 * coef_Jacob1_qt_syms12 * pinvG2_1 +
coefs_tq1_11 * coef_Jacob1_qt_syms13 * pinvG3_1 +
coefs_tq2_11 * coef_Jacob1_qt_syms11 * pinvG1_2 +
coefs_tq2_11 * coef_Jacob1_qt_syms12 * pinvG2_2 +
coefs_tq2_11 * coef_Jacob1_qt_syms13 * pinvG3_2 +
coefs_tq3_11 * coef_Jacob1_qt_syms11 * pinvG1_3 +
coefs_tq3_11 * coef_Jacob1_qt_syms12 * pinvG2_3 +
coefs_tq3_11 * coef_Jacob1_qt_syms13 * pinvG3_3;
coef_f_q_sym(0, 11) = coef_Jacob1_qt_syms15 + coefs_tq1_5 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_5 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq2_5 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq1_5 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_5 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq3_5 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq2_5 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_5 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq3_5 * coef_Jacob1_qt_syms23 * pinvG3_3;
coef_f_q_sym(0, 12) = coef_Jacob1_qt_syms16 + coefs_tq1_6 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_5 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_6 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq2_6 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq1_5 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq2_5 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq1_6 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_6 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq3_6 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq1_5 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_5 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq3_5 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq2_6 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_6 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq2_5 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_5 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq3_6 * coef_Jacob1_qt_syms23 * pinvG3_3 +
coefs_tq3_5 * coef_Jacob1_qt_syms30 * pinvG3_3;
coef_f_q_sym(0, 13) = coef_Jacob1_qt_syms17 + coefs_tq1_7 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_5 * coef_Jacob1_qt_syms33 * pinvG1_1 +
coefs_tq1_7 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq2_7 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq1_5 * coef_Jacob1_qt_syms34 * pinvG2_1 +
coefs_tq2_5 * coef_Jacob1_qt_syms33 * pinvG1_2 +
coefs_tq1_7 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_7 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq3_7 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq1_5 * coef_Jacob1_qt_syms35 * pinvG3_1 +
coefs_tq2_5 * coef_Jacob1_qt_syms34 * pinvG2_2 +
coefs_tq3_5 * coef_Jacob1_qt_syms33 * pinvG1_3 +
coefs_tq2_7 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_7 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq2_5 * coef_Jacob1_qt_syms35 * pinvG3_2 +
coefs_tq3_5 * coef_Jacob1_qt_syms34 * pinvG2_3 +
coefs_tq3_7 * coef_Jacob1_qt_syms23 * pinvG3_3 +
coefs_tq3_5 * coef_Jacob1_qt_syms35 * pinvG3_3;
coef_f_q_sym(0, 14) = coef_Jacob1_qt_syms18 + coefs_tq1_8 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_6 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_8 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq2_8 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq1_6 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq2_6 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq1_8 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_8 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq3_8 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq1_6 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_6 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq3_6 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq2_8 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_8 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq2_6 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_6 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq3_8 * coef_Jacob1_qt_syms23 * pinvG3_3 +
coefs_tq3_6 * coef_Jacob1_qt_syms30 * pinvG3_3;
coef_f_q_sym(0, 15) = coef_Jacob1_qt_syms19 + coefs_tq1_9 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_7 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_6 * coef_Jacob1_qt_syms33 * pinvG1_1 +
coefs_tq1_9 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq2_9 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq1_7 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq2_7 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq1_6 * coef_Jacob1_qt_syms34 * pinvG2_1 +
coefs_tq2_6 * coef_Jacob1_qt_syms33 * pinvG1_2 +
coefs_tq1_9 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_9 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq3_9 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq1_7 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_7 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq3_7 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq1_6 * coef_Jacob1_qt_syms35 * pinvG3_1 +
coefs_tq2_6 * coef_Jacob1_qt_syms34 * pinvG2_2 +
coefs_tq3_6 * coef_Jacob1_qt_syms33 * pinvG1_3 +
coefs_tq2_9 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_9 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq2_7 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_7 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq2_6 * coef_Jacob1_qt_syms35 * pinvG3_2 +
coefs_tq3_6 * coef_Jacob1_qt_syms34 * pinvG2_3 +
coefs_tq3_9 * coef_Jacob1_qt_syms23 * pinvG3_3 +
coefs_tq3_7 * coef_Jacob1_qt_syms30 * pinvG3_3 +
coefs_tq3_6 * coef_Jacob1_qt_syms35 * pinvG3_3;
coef_f_q_sym(0, 16) = coef_Jacob1_qt_syms20 + coefs_tq1_7 * coef_Jacob1_qt_syms33 * pinvG1_1 +
coefs_tq1_7 * coef_Jacob1_qt_syms34 * pinvG2_1 +
coefs_tq2_7 * coef_Jacob1_qt_syms33 * pinvG1_2 +
coefs_tq1_7 * coef_Jacob1_qt_syms35 * pinvG3_1 +
coefs_tq2_7 * coef_Jacob1_qt_syms34 * pinvG2_2 +
coefs_tq3_7 * coef_Jacob1_qt_syms33 * pinvG1_3 +
coefs_tq2_7 * coef_Jacob1_qt_syms35 * pinvG3_2 +
coefs_tq3_7 * coef_Jacob1_qt_syms34 * pinvG2_3 +
coefs_tq3_7 * coef_Jacob1_qt_syms35 * pinvG3_3 +
coefs_tq1_10 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_10 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq1_10 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_10 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq2_10 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq2_10 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_10 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq3_10 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq3_10 * coef_Jacob1_qt_syms23 * pinvG3_3;
coef_f_q_sym(0, 17) = coef_Jacob1_qt_syms24 + coefs_tq1_11 * coef_Jacob1_qt_syms21 * pinvG1_1 +
coefs_tq1_11 * coef_Jacob1_qt_syms22 * pinvG2_1 +
coefs_tq1_11 * coef_Jacob1_qt_syms23 * pinvG3_1 +
coefs_tq2_11 * coef_Jacob1_qt_syms21 * pinvG1_2 +
coefs_tq2_11 * coef_Jacob1_qt_syms22 * pinvG2_2 +
coefs_tq2_11 * coef_Jacob1_qt_syms23 * pinvG3_2 +
coefs_tq3_11 * coef_Jacob1_qt_syms21 * pinvG1_3 +
coefs_tq3_11 * coef_Jacob1_qt_syms22 * pinvG2_3 +
coefs_tq3_11 * coef_Jacob1_qt_syms23 * pinvG3_3;
coef_f_q_sym(0, 18) = coef_Jacob1_qt_syms25 + coefs_tq1_8 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_8 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq2_8 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq1_8 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_8 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq3_8 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq2_8 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_8 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq3_8 * coef_Jacob1_qt_syms30 * pinvG3_3;
coef_f_q_sym(0, 19) = coef_Jacob1_qt_syms26 + coefs_tq1_9 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_8 * coef_Jacob1_qt_syms33 * pinvG1_1 +
coefs_tq1_9 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq2_9 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq1_8 * coef_Jacob1_qt_syms34 * pinvG2_1 +
coefs_tq2_8 * coef_Jacob1_qt_syms33 * pinvG1_2 +
coefs_tq1_9 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_9 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq3_9 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq1_8 * coef_Jacob1_qt_syms35 * pinvG3_1 +
coefs_tq2_8 * coef_Jacob1_qt_syms34 * pinvG2_2 +
coefs_tq3_8 * coef_Jacob1_qt_syms33 * pinvG1_3 +
coefs_tq2_9 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_9 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq2_8 * coef_Jacob1_qt_syms35 * pinvG3_2 +
coefs_tq3_8 * coef_Jacob1_qt_syms34 * pinvG2_3 +
coefs_tq3_9 * coef_Jacob1_qt_syms30 * pinvG3_3 +
coefs_tq3_8 * coef_Jacob1_qt_syms35 * pinvG3_3;
coef_f_q_sym(0, 20) = coef_Jacob1_qt_syms27 + coefs_tq1_9 * coef_Jacob1_qt_syms33 * pinvG1_1 +
coefs_tq1_9 * coef_Jacob1_qt_syms34 * pinvG2_1 +
coefs_tq2_9 * coef_Jacob1_qt_syms33 * pinvG1_2 +
coefs_tq1_9 * coef_Jacob1_qt_syms35 * pinvG3_1 +
coefs_tq2_9 * coef_Jacob1_qt_syms34 * pinvG2_2 +
coefs_tq3_9 * coef_Jacob1_qt_syms33 * pinvG1_3 +
coefs_tq2_9 * coef_Jacob1_qt_syms35 * pinvG3_2 +
coefs_tq3_9 * coef_Jacob1_qt_syms34 * pinvG2_3 +
coefs_tq3_9 * coef_Jacob1_qt_syms35 * pinvG3_3 +
coefs_tq1_10 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_10 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq1_10 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_10 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq2_10 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq2_10 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_10 * coef_Jacob1_qt_syms28 * pinvG1_3 +
coefs_tq3_10 * coef_Jacob1_qt_syms29 * pinvG2_3 +
coefs_tq3_10 * coef_Jacob1_qt_syms30 * pinvG3_3;
coef_f_q_sym(0, 21) = coef_Jacob1_qt_syms31 + coefs_tq1_11 * coef_Jacob1_qt_syms28 * pinvG1_1 +
coefs_tq1_11 * coef_Jacob1_qt_syms29 * pinvG2_1 +
coefs_tq1_11 * coef_Jacob1_qt_syms30 * pinvG3_1 +
coefs_tq2_11 * coef_Jacob1_qt_syms28 * pinvG1_2 +
coefs_tq2_11 * coef_Jacob1_qt_syms29 * pinvG2_2 +
coefs_tq2_11 * coef_Jacob1_qt_syms30 * pinvG3_2 +
coefs_tq3_11 * coef_Jacob1_qt_syms28 * pinvG1_3 +