PolyFEM
Loading...
Searching...
No Matches
auto_elasticity_rhs.cpp
Go to the documentation of this file.
2
3namespace polyfem
4{
5 namespace autogen
6 {
7 void linear_elasticity_2d_function(const AutodiffHessianPt &pt, const double lambda, const double mu, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> &res)
8 {
9 res.resize(2);
10 const auto // Not supported in C:
11 // f0
12 helper_0 = pt(0);
13 const auto // Not supported in C:
14 //
15 helper_1 = helper_0.getHessian()(0, 0);
16 const auto helper_2 = 2.0 * mu;
17 const auto // Not supported in C:
18 // f1
19 helper_3 = pt(1);
20 const auto // Not supported in C:
21 //
22 helper_4 = helper_3.getHessian()(0, 1);
23 const auto helper_5 = 1.0 * lambda;
24 const auto // Not supported in C:
25 //
26 helper_6 = helper_3.getHessian()(1, 1);
27 const auto // Not supported in C:
28 //
29 helper_7 = helper_0.getHessian()(0, 1);
30 // Not supported in C:
31 //
32 //
33 res(0) = helper_1 * helper_2 + helper_5 * (helper_1 + helper_4) + mu * (helper_4 + helper_0.getHessian()(1, 1));
34 res(1) = helper_2 * helper_6 + helper_5 * (helper_6 + helper_7) + mu * (helper_7 + helper_3.getHessian()(0, 0));
35 }
36
37 void linear_elasticity_3d_function(const AutodiffHessianPt &pt, const double lambda, const double mu, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> &res)
38 {
39 res.resize(3);
40 const auto // Not supported in C:
41 // f0
42 helper_0 = pt(0);
43 const auto // Not supported in C:
44 //
45 helper_1 = helper_0.getHessian()(0, 0);
46 const auto helper_2 = 2.0 * mu;
47 const auto // Not supported in C:
48 // f1
49 helper_3 = pt(1);
50 const auto // Not supported in C:
51 //
52 helper_4 = helper_3.getHessian()(0, 1);
53 const auto // Not supported in C:
54 // f2
55 helper_5 = pt(2);
56 const auto // Not supported in C:
57 //
58 helper_6 = helper_5.getHessian()(0, 2);
59 const auto helper_7 = 1.0 * lambda;
60 const auto // Not supported in C:
61 //
62 helper_8 = helper_3.getHessian()(1, 1);
63 const auto // Not supported in C:
64 //
65 helper_9 = helper_0.getHessian()(0, 1);
66 const auto // Not supported in C:
67 //
68 helper_10 = helper_5.getHessian()(1, 2);
69 const auto // Not supported in C:
70 //
71 helper_11 = helper_5.getHessian()(2, 2);
72 const auto // Not supported in C:
73 //
74 helper_12 = helper_0.getHessian()(0, 2);
75 const auto // Not supported in C:
76 //
77 helper_13 = helper_3.getHessian()(1, 2);
78 // Not supported in C:
79 //
80 //
81 //
82 //
83 //
84 //
85 res(0) = helper_1 * helper_2 + helper_7 * (helper_1 + helper_4 + helper_6) + mu * (helper_4 + helper_0.getHessian()(1, 1)) + mu * (helper_6 + helper_0.getHessian()(2, 2));
86 res(1) = helper_2 * helper_8 + helper_7 * (helper_10 + helper_8 + helper_9) + mu * (helper_10 + helper_3.getHessian()(2, 2)) + mu * (helper_9 + helper_3.getHessian()(0, 0));
87 res(2) = helper_11 * helper_2 + helper_7 * (helper_11 + helper_12 + helper_13) + mu * (helper_12 + helper_5.getHessian()(0, 0)) + mu * (helper_13 + helper_5.getHessian()(1, 1));
88 }
89
90 void hooke_2d_function(const AutodiffHessianPt &pt, const assembler::ElasticityTensor &C, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> &res)
91 {
92 res.resize(2);
93 const auto // Not supported in C:
94 // f0
95 helper_0 = pt(0);
96 const auto // Not supported in C:
97 //
98 helper_1 = 1.0 * helper_0.getHessian()(0, 0);
99 const auto // Not supported in C:
100 // C
101 helper_2 = C(2, 1);
102 const auto // Not supported in C:
103 // f1
104 helper_3 = pt(1);
105 const auto // Not supported in C:
106 //
107 helper_4 = 1.0 * helper_3.getHessian()(1, 1);
108 const auto // Not supported in C:
109 //
110 helper_5 = helper_3.getHessian()(0, 1);
111 const auto helper_6 = 1.0 * helper_5;
112 const auto // Not supported in C:
113 // C
114 helper_7 = C(2, 0);
115 const auto // Not supported in C:
116 //
117 helper_8 = helper_0.getHessian()(0, 1);
118 const auto helper_9 = 1.0 * helper_8;
119 const auto // Not supported in C:
120 // C
121 helper_10 = C(2, 2);
122 const auto // Not supported in C:
123 //
124 helper_11 = helper_5 + helper_0.getHessian()(1, 1);
125 const auto // Not supported in C:
126 //
127 helper_12 = helper_8 + helper_3.getHessian()(0, 0);
128 // Not supported in C:
129 // C
130 // C
131 // C
132 // C
133 // C
134 // C
135 res(0) = helper_1 * C(0, 0) + helper_10 * helper_11 + helper_12 * C(0, 2) + helper_2 * helper_4 + helper_6 * C(0, 1) + helper_7 * helper_9;
136 res(1) = helper_1 * helper_7 + helper_10 * helper_12 + helper_11 * C(1, 2) + helper_2 * helper_6 + helper_4 * C(1, 1) + helper_9 * C(1, 0);
137 }
138
139 void hooke_3d_function(const AutodiffHessianPt &pt, const assembler::ElasticityTensor &C, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> &res)
140 {
141 res.resize(3);
142 const auto // Not supported in C:
143 // f0
144 helper_0 = pt(0);
145 const auto // Not supported in C:
146 //
147 helper_1 = 1.0 * helper_0.getHessian()(0, 0);
148 const auto // Not supported in C:
149 // C
150 helper_2 = C(4, 2);
151 const auto // Not supported in C:
152 // f2
153 helper_3 = pt(2);
154 const auto // Not supported in C:
155 //
156 helper_4 = 1.0 * helper_3.getHessian()(2, 2);
157 const auto // Not supported in C:
158 // C
159 helper_5 = C(5, 1);
160 const auto // Not supported in C:
161 // f1
162 helper_6 = pt(1);
163 const auto // Not supported in C:
164 //
165 helper_7 = 1.0 * helper_6.getHessian()(1, 1);
166 const auto // Not supported in C:
167 //
168 helper_8 = helper_6.getHessian()(0, 1);
169 const auto helper_9 = 1.0 * helper_8;
170 const auto // Not supported in C:
171 //
172 helper_10 = helper_3.getHessian()(0, 2);
173 const auto helper_11 = 1.0 * helper_10;
174 const auto // Not supported in C:
175 // C
176 helper_12 = C(4, 0);
177 const auto // Not supported in C:
178 //
179 helper_13 = helper_0.getHessian()(0, 2);
180 const auto helper_14 = 1.0 * helper_13;
181 const auto // Not supported in C:
182 // C
183 helper_15 = C(4, 1);
184 const auto // Not supported in C:
185 //
186 helper_16 = helper_6.getHessian()(1, 2);
187 const auto helper_17 = 1.0 * helper_16;
188 const auto // Not supported in C:
189 // C
190 helper_18 = C(5, 0);
191 const auto // Not supported in C:
192 //
193 helper_19 = helper_0.getHessian()(0, 1);
194 const auto helper_20 = 1.0 * helper_19;
195 const auto // Not supported in C:
196 // C
197 helper_21 = C(5, 2);
198 const auto // Not supported in C:
199 //
200 helper_22 = helper_3.getHessian()(1, 2);
201 const auto helper_23 = 1.0 * helper_22;
202 const auto // Not supported in C:
203 // C
204 helper_24 = C(5, 5);
205 const auto // Not supported in C:
206 //
207 helper_25 = helper_8 + helper_0.getHessian()(1, 1);
208 const auto // Not supported in C:
209 // C
210 helper_26 = C(4, 4);
211 const auto // Not supported in C:
212 //
213 helper_27 = helper_10 + helper_0.getHessian()(2, 2);
214 const auto // Not supported in C:
215 //
216 helper_28 = helper_19 + helper_6.getHessian()(0, 0);
217 const auto // Not supported in C:
218 // C
219 helper_29 = C(4, 3);
220 const auto // Not supported in C:
221 //
222 helper_30 = helper_22 + helper_6.getHessian()(2, 2);
223 const auto // Not supported in C:
224 //
225 helper_31 = helper_13 + helper_3.getHessian()(0, 0);
226 const auto // Not supported in C:
227 // C
228 helper_32 = C(5, 3);
229 const auto // Not supported in C:
230 //
231 helper_33 = helper_16 + helper_3.getHessian()(1, 1);
232 const auto // Not supported in C:
233 // C
234 helper_34 = C(4, 5);
235 const auto // Not supported in C:
236 //
237 helper_35 = helper_0.getHessian()(1, 2);
238 const auto // Not supported in C:
239 //
240 helper_36 = helper_6.getHessian()(0, 2);
241 const auto helper_37 = helper_35 + helper_36;
242 const auto // Not supported in C:
243 // C
244 helper_38 = C(5, 4);
245 const auto // Not supported in C:
246 //
247 helper_39 = helper_3.getHessian()(0, 1);
248 const auto helper_40 = helper_35 + helper_39;
249 const auto helper_41 = helper_36 + helper_39;
250 const auto // Not supported in C:
251 // C
252 helper_42 = C(3, 2);
253 const auto // Not supported in C:
254 // C
255 helper_43 = C(3, 0);
256 const auto // Not supported in C:
257 // C
258 helper_44 = C(3, 1);
259 const auto // Not supported in C:
260 // C
261 helper_45 = C(3, 4);
262 const auto // Not supported in C:
263 // C
264 helper_46 = C(3, 3);
265 const auto // Not supported in C:
266 // C
267 helper_47 = C(3, 5);
268 // Not supported in C:
269 // C
270 // C
271 // C
272 // C
273 // C
274 // C
275 // C
276 // C
277 // C
278 // C
279 // C
280 // C
281 // C
282 // C
283 // C
284 // C
285 // C
286 // C
287 res(0) = helper_1 * C(0, 0) + helper_11 * C(0, 2) + helper_12 * helper_14 + helper_15 * helper_17 + helper_18 * helper_20 + helper_2 * helper_4 + helper_21 * helper_23 + helper_24 * helper_25 + helper_26 * helper_27 + helper_28 * C(0, 5) + helper_29 * helper_30 + helper_31 * C(0, 4) + helper_32 * helper_33 + helper_34 * helper_37 + helper_38 * helper_40 + helper_41 * C(0, 3) + helper_5 * helper_7 + helper_9 * C(0, 1);
288 res(1) = helper_1 * helper_18 + helper_11 * helper_21 + helper_14 * helper_43 + helper_17 * helper_44 + helper_20 * C(1, 0) + helper_23 * C(1, 2) + helper_24 * helper_28 + helper_25 * C(1, 5) + helper_27 * helper_45 + helper_30 * helper_46 + helper_31 * helper_38 + helper_32 * helper_41 + helper_33 * C(1, 3) + helper_37 * helper_47 + helper_4 * helper_42 + helper_40 * C(1, 4) + helper_5 * helper_9 + helper_7 * C(1, 1);
289 res(2) = helper_1 * helper_12 + helper_11 * helper_2 + helper_14 * C(2, 0) + helper_15 * helper_9 + helper_17 * C(2, 1) + helper_20 * helper_43 + helper_23 * helper_42 + helper_25 * helper_47 + helper_26 * helper_31 + helper_27 * C(2, 4) + helper_28 * helper_34 + helper_29 * helper_41 + helper_30 * C(2, 3) + helper_33 * helper_46 + helper_37 * C(2, 5) + helper_4 * C(2, 2) + helper_40 * helper_45 + helper_44 * helper_7;
290 }
291
292 void saint_venant_2d_function(const AutodiffHessianPt &pt, const assembler::ElasticityTensor &C, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> &res)
293 {
294 res.resize(2);
295 const auto // Not supported in C:
296 // f0
297 helper_0 = pt(0);
298 const auto // Not supported in C:
299 //
300 helper_1 = helper_0.getHessian()(0, 0);
301 const auto // Not supported in C:
302 // C
303 helper_2 = C(0, 0);
304 const auto // Not supported in C:
305 //
306 helper_3 = helper_0.getGradient()(0);
307 const auto // Not supported in C:
308 // f1
309 helper_4 = pt(1);
310 const auto // Not supported in C:
311 //
312 helper_5 = helper_4.getGradient()(0);
313 const auto helper_6 = 0.5 * pow(helper_3, 2) + 1.0 * helper_3 + 0.5 * pow(helper_5, 2);
314 const auto // Not supported in C:
315 // C
316 helper_7 = C(0, 1);
317 const auto // Not supported in C:
318 //
319 helper_8 = helper_4.getGradient()(1);
320 const auto // Not supported in C:
321 //
322 helper_9 = helper_0.getGradient()(1);
323 const auto helper_10 = 0.5 * pow(helper_8, 2) + 1.0 * helper_8 + 0.5 * pow(helper_9, 2);
324 const auto // Not supported in C:
325 // C
326 helper_11 = C(0, 2);
327 const auto helper_12 = helper_3 * helper_9 + helper_5 * helper_8 + helper_5 + helper_9;
328 const auto helper_13 = helper_10 * helper_7 + helper_11 * helper_12 + helper_2 * helper_6;
329 const auto // Not supported in C:
330 //
331 helper_14 = helper_0.getHessian()(1, 1);
332 const auto // Not supported in C:
333 // C
334 helper_15 = C(1, 0);
335 const auto // Not supported in C:
336 // C
337 helper_16 = C(1, 1);
338 const auto // Not supported in C:
339 // C
340 helper_17 = C(1, 2);
341 const auto helper_18 = helper_10 * helper_16 + helper_12 * helper_17 + helper_15 * helper_6;
342 const auto // Not supported in C:
343 //
344 helper_19 = helper_0.getHessian()(0, 1);
345 const auto // Not supported in C:
346 // C
347 helper_20 = C(2, 0);
348 const auto // Not supported in C:
349 // C
350 helper_21 = C(2, 1);
351 const auto // Not supported in C:
352 // C
353 helper_22 = C(2, 2);
354 const auto helper_23 = 2 * helper_10 * helper_21 + 2 * helper_12 * helper_22 + 2 * helper_20 * helper_6;
355 const auto // Not supported in C:
356 //
357 helper_24 = helper_4.getHessian()(0, 0);
358 const auto helper_25 = 1.0 * helper_1 * helper_3 + 1.0 * helper_1 + 1.0 * helper_24 * helper_5;
359 const auto // Not supported in C:
360 //
361 helper_26 = helper_4.getHessian()(0, 1);
362 const auto helper_27 = helper_19 * helper_9 + helper_26 * helper_8 + helper_26;
363 const auto helper_28 = 1.0 * helper_27;
364 const auto helper_29 = helper_19 * helper_3 + helper_19 + helper_26 * helper_5;
365 const auto helper_30 = helper_1 * helper_9 + helper_24 * helper_8 + helper_24 + helper_29;
366 const auto helper_31 = helper_20 * helper_25 + helper_21 * helper_28 + helper_22 * helper_30;
367 const auto // Not supported in C:
368 //
369 helper_32 = helper_4.getHessian()(1, 1);
370 const auto helper_33 = 1.0 * helper_14 * helper_9 + 1.0 * helper_32 * helper_8 + 1.0 * helper_32;
371 const auto helper_34 = 1.0 * helper_29;
372 const auto helper_35 = helper_14 * helper_3 + helper_14 + helper_27 + helper_32 * helper_5;
373 const auto helper_36 = helper_15 * helper_34 + helper_16 * helper_33 + helper_17 * helper_35;
374 const auto helper_37 = helper_3 + 1;
375 const auto helper_38 = helper_11 * helper_30 + helper_2 * helper_25 + helper_28 * helper_7;
376 const auto helper_39 = helper_20 * helper_34 + helper_21 * helper_33 + helper_22 * helper_35;
377 const auto helper_40 = helper_8 + 1;
378 res(0) = helper_1 * helper_13 + helper_14 * helper_18 + helper_19 * helper_23 + helper_31 * helper_9 + helper_36 * helper_9 + helper_37 * helper_38 + helper_37 * helper_39;
379 res(1) = helper_13 * helper_24 + helper_18 * helper_32 + helper_23 * helper_26 + helper_31 * helper_40 + helper_36 * helper_40 + helper_38 * helper_5 + helper_39 * helper_5;
380 }
381
382 void saint_venant_3d_function(const AutodiffHessianPt &pt, const assembler::ElasticityTensor &C, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> &res)
383 {
384 res.resize(3);
385 const auto // Not supported in C:
386 // f0
387 helper_0 = pt(0);
388 const auto // Not supported in C:
389 //
390 helper_1 = helper_0.getHessian()(0, 0);
391 const auto // Not supported in C:
392 // C
393 helper_2 = C(0, 0);
394 const auto // Not supported in C:
395 //
396 helper_3 = helper_0.getGradient()(0);
397 const auto // Not supported in C:
398 // f1
399 helper_4 = pt(1);
400 const auto // Not supported in C:
401 //
402 helper_5 = helper_4.getGradient()(0);
403 const auto // Not supported in C:
404 // f2
405 helper_6 = pt(2);
406 const auto // Not supported in C:
407 //
408 helper_7 = helper_6.getGradient()(0);
409 const auto helper_8 = 0.5 * pow(helper_3, 2) + 1.0 * helper_3 + 0.5 * pow(helper_5, 2) + 0.5 * pow(helper_7, 2);
410 const auto // Not supported in C:
411 // C
412 helper_9 = C(0, 1);
413 const auto // Not supported in C:
414 //
415 helper_10 = helper_4.getGradient()(1);
416 const auto // Not supported in C:
417 //
418 helper_11 = helper_0.getGradient()(1);
419 const auto // Not supported in C:
420 //
421 helper_12 = helper_6.getGradient()(1);
422 const auto helper_13 = 0.5 * pow(helper_10, 2) + 1.0 * helper_10 + 0.5 * pow(helper_11, 2) + 0.5 * pow(helper_12, 2);
423 const auto // Not supported in C:
424 // C
425 helper_14 = C(0, 2);
426 const auto // Not supported in C:
427 //
428 helper_15 = helper_6.getGradient()(2);
429 const auto // Not supported in C:
430 //
431 helper_16 = helper_0.getGradient()(2);
432 const auto // Not supported in C:
433 //
434 helper_17 = helper_4.getGradient()(2);
435 const auto helper_18 = 0.5 * pow(helper_15, 2) + 1.0 * helper_15 + 0.5 * pow(helper_16, 2) + 0.5 * pow(helper_17, 2);
436 const auto // Not supported in C:
437 // C
438 helper_19 = C(0, 5);
439 const auto helper_20 = helper_10 * helper_5 + helper_11 * helper_3 + helper_11 + helper_12 * helper_7 + helper_5;
440 const auto // Not supported in C:
441 // C
442 helper_21 = C(0, 4);
443 const auto helper_22 = helper_15 * helper_7 + helper_16 * helper_3 + helper_16 + helper_17 * helper_5 + helper_7;
444 const auto // Not supported in C:
445 // C
446 helper_23 = C(0, 3);
447 const auto helper_24 = helper_10 * helper_17 + helper_11 * helper_16 + helper_12 * helper_15 + helper_12 + helper_17;
448 const auto helper_25 = helper_13 * helper_9 + helper_14 * helper_18 + helper_19 * helper_20 + helper_2 * helper_8 + helper_21 * helper_22 + helper_23 * helper_24;
449 const auto // Not supported in C:
450 //
451 helper_26 = helper_0.getHessian()(1, 1);
452 const auto // Not supported in C:
453 // C
454 helper_27 = C(1, 0);
455 const auto // Not supported in C:
456 // C
457 helper_28 = C(1, 1);
458 const auto // Not supported in C:
459 // C
460 helper_29 = C(1, 2);
461 const auto // Not supported in C:
462 // C
463 helper_30 = C(1, 5);
464 const auto // Not supported in C:
465 // C
466 helper_31 = C(1, 4);
467 const auto // Not supported in C:
468 // C
469 helper_32 = C(1, 3);
470 const auto helper_33 = helper_13 * helper_28 + helper_18 * helper_29 + helper_20 * helper_30 + helper_22 * helper_31 + helper_24 * helper_32 + helper_27 * helper_8;
471 const auto // Not supported in C:
472 //
473 helper_34 = helper_0.getHessian()(2, 2);
474 const auto // Not supported in C:
475 // C
476 helper_35 = C(2, 0);
477 const auto // Not supported in C:
478 // C
479 helper_36 = C(2, 1);
480 const auto // Not supported in C:
481 // C
482 helper_37 = C(2, 2);
483 const auto // Not supported in C:
484 // C
485 helper_38 = C(2, 5);
486 const auto // Not supported in C:
487 // C
488 helper_39 = C(2, 4);
489 const auto // Not supported in C:
490 // C
491 helper_40 = C(2, 3);
492 const auto helper_41 = helper_13 * helper_36 + helper_18 * helper_37 + helper_20 * helper_38 + helper_22 * helper_39 + helper_24 * helper_40 + helper_35 * helper_8;
493 const auto // Not supported in C:
494 //
495 helper_42 = helper_0.getHessian()(1, 2);
496 const auto // Not supported in C:
497 // C
498 helper_43 = C(3, 0);
499 const auto // Not supported in C:
500 // C
501 helper_44 = C(3, 1);
502 const auto // Not supported in C:
503 // C
504 helper_45 = C(3, 2);
505 const auto // Not supported in C:
506 // C
507 helper_46 = C(3, 5);
508 const auto // Not supported in C:
509 // C
510 helper_47 = C(3, 4);
511 const auto // Not supported in C:
512 // C
513 helper_48 = C(3, 3);
514 const auto helper_49 = 2 * helper_13 * helper_44 + 2 * helper_18 * helper_45 + 2 * helper_20 * helper_46 + 2 * helper_22 * helper_47 + 2 * helper_24 * helper_48 + 2 * helper_43 * helper_8;
515 const auto // Not supported in C:
516 //
517 helper_50 = helper_0.getHessian()(0, 2);
518 const auto // Not supported in C:
519 // C
520 helper_51 = C(4, 0);
521 const auto // Not supported in C:
522 // C
523 helper_52 = C(4, 1);
524 const auto // Not supported in C:
525 // C
526 helper_53 = C(4, 2);
527 const auto // Not supported in C:
528 // C
529 helper_54 = C(4, 5);
530 const auto // Not supported in C:
531 // C
532 helper_55 = C(4, 4);
533 const auto // Not supported in C:
534 // C
535 helper_56 = C(4, 3);
536 const auto helper_57 = 2 * helper_13 * helper_52 + 2 * helper_18 * helper_53 + 2 * helper_20 * helper_54 + 2 * helper_22 * helper_55 + 2 * helper_24 * helper_56 + 2 * helper_51 * helper_8;
537 const auto // Not supported in C:
538 //
539 helper_58 = helper_0.getHessian()(0, 1);
540 const auto // Not supported in C:
541 // C
542 helper_59 = C(5, 0);
543 const auto // Not supported in C:
544 // C
545 helper_60 = C(5, 1);
546 const auto // Not supported in C:
547 // C
548 helper_61 = C(5, 2);
549 const auto // Not supported in C:
550 // C
551 helper_62 = C(5, 5);
552 const auto // Not supported in C:
553 // C
554 helper_63 = C(5, 4);
555 const auto // Not supported in C:
556 // C
557 helper_64 = C(5, 3);
558 const auto helper_65 = 2 * helper_13 * helper_60 + 2 * helper_18 * helper_61 + 2 * helper_20 * helper_62 + 2 * helper_22 * helper_63 + 2 * helper_24 * helper_64 + 2 * helper_59 * helper_8;
559 const auto // Not supported in C:
560 //
561 helper_66 = helper_4.getHessian()(0, 0);
562 const auto // Not supported in C:
563 //
564 helper_67 = helper_6.getHessian()(0, 0);
565 const auto helper_68 = 1.0 * helper_1 * helper_3 + 1.0 * helper_1 + 1.0 * helper_5 * helper_66 + 1.0 * helper_67 * helper_7;
566 const auto // Not supported in C:
567 //
568 helper_69 = helper_4.getHessian()(0, 1);
569 const auto // Not supported in C:
570 //
571 helper_70 = helper_6.getHessian()(0, 1);
572 const auto helper_71 = helper_10 * helper_69 + helper_11 * helper_58 + helper_12 * helper_70 + helper_69;
573 const auto helper_72 = 1.0 * helper_71;
574 const auto // Not supported in C:
575 //
576 helper_73 = helper_6.getHessian()(0, 2);
577 const auto // Not supported in C:
578 //
579 helper_74 = helper_4.getHessian()(0, 2);
580 const auto helper_75 = helper_15 * helper_73 + helper_16 * helper_50 + helper_17 * helper_74 + helper_73;
581 const auto helper_76 = 1.0 * helper_75;
582 const auto helper_77 = helper_3 * helper_58 + helper_5 * helper_69 + helper_58 + helper_7 * helper_70;
583 const auto helper_78 = helper_1 * helper_11 + helper_10 * helper_66 + helper_12 * helper_67 + helper_66 + helper_77;
584 const auto helper_79 = helper_3 * helper_50 + helper_5 * helper_74 + helper_50 + helper_7 * helper_73;
585 const auto helper_80 = helper_1 * helper_16 + helper_15 * helper_67 + helper_17 * helper_66 + helper_67 + helper_79;
586 const auto helper_81 = helper_15 * helper_70 + helper_16 * helper_58 + helper_17 * helper_69 + helper_70;
587 const auto helper_82 = helper_10 * helper_74 + helper_11 * helper_50 + helper_12 * helper_73 + helper_74;
588 const auto helper_83 = helper_81 + helper_82;
589 const auto helper_84 = helper_51 * helper_68 + helper_52 * helper_72 + helper_53 * helper_76 + helper_54 * helper_78 + helper_55 * helper_80 + helper_56 * helper_83;
590 const auto helper_85 = helper_59 * helper_68 + helper_60 * helper_72 + helper_61 * helper_76 + helper_62 * helper_78 + helper_63 * helper_80 + helper_64 * helper_83;
591 const auto // Not supported in C:
592 //
593 helper_86 = helper_4.getHessian()(1, 1);
594 const auto // Not supported in C:
595 //
596 helper_87 = helper_6.getHessian()(1, 1);
597 const auto helper_88 = 1.0 * helper_10 * helper_86 + 1.0 * helper_11 * helper_26 + 1.0 * helper_12 * helper_87 + 1.0 * helper_86;
598 const auto helper_89 = 1.0 * helper_77;
599 const auto // Not supported in C:
600 //
601 helper_90 = helper_6.getHessian()(1, 2);
602 const auto // Not supported in C:
603 //
604 helper_91 = helper_4.getHessian()(1, 2);
605 const auto helper_92 = helper_15 * helper_90 + helper_16 * helper_42 + helper_17 * helper_91 + helper_90;
606 const auto helper_93 = 1.0 * helper_92;
607 const auto helper_94 = helper_26 * helper_3 + helper_26 + helper_5 * helper_86 + helper_7 * helper_87 + helper_71;
608 const auto helper_95 = helper_10 * helper_91 + helper_11 * helper_42 + helper_12 * helper_90 + helper_91;
609 const auto helper_96 = helper_15 * helper_87 + helper_16 * helper_26 + helper_17 * helper_86 + helper_87 + helper_95;
610 const auto helper_97 = helper_3 * helper_42 + helper_42 + helper_5 * helper_91 + helper_7 * helper_90;
611 const auto helper_98 = helper_81 + helper_97;
612 const auto helper_99 = helper_27 * helper_89 + helper_28 * helper_88 + helper_29 * helper_93 + helper_30 * helper_94 + helper_31 * helper_98 + helper_32 * helper_96;
613 const auto helper_100 = helper_43 * helper_89 + helper_44 * helper_88 + helper_45 * helper_93 + helper_46 * helper_94 + helper_47 * helper_98 + helper_48 * helper_96;
614 const auto // Not supported in C:
615 //
616 helper_101 = helper_6.getHessian()(2, 2);
617 const auto // Not supported in C:
618 //
619 helper_102 = helper_4.getHessian()(2, 2);
620 const auto helper_103 = 1.0 * helper_101 * helper_15 + 1.0 * helper_101 + 1.0 * helper_102 * helper_17 + 1.0 * helper_16 * helper_34;
621 const auto helper_104 = 1.0 * helper_79;
622 const auto helper_105 = 1.0 * helper_95;
623 const auto helper_106 = helper_101 * helper_7 + helper_102 * helper_5 + helper_3 * helper_34 + helper_34 + helper_75;
624 const auto helper_107 = helper_10 * helper_102 + helper_101 * helper_12 + helper_102 + helper_11 * helper_34 + helper_92;
625 const auto helper_108 = helper_82 + helper_97;
626 const auto helper_109 = helper_103 * helper_37 + helper_104 * helper_35 + helper_105 * helper_36 + helper_106 * helper_39 + helper_107 * helper_40 + helper_108 * helper_38;
627 const auto helper_110 = helper_103 * helper_45 + helper_104 * helper_43 + helper_105 * helper_44 + helper_106 * helper_47 + helper_107 * helper_48 + helper_108 * helper_46;
628 const auto helper_111 = helper_3 + 1;
629 const auto helper_112 = helper_14 * helper_76 + helper_19 * helper_78 + helper_2 * helper_68 + helper_21 * helper_80 + helper_23 * helper_83 + helper_72 * helper_9;
630 const auto helper_113 = helper_59 * helper_89 + helper_60 * helper_88 + helper_61 * helper_93 + helper_62 * helper_94 + helper_63 * helper_98 + helper_64 * helper_96;
631 const auto helper_114 = helper_103 * helper_53 + helper_104 * helper_51 + helper_105 * helper_52 + helper_106 * helper_55 + helper_107 * helper_56 + helper_108 * helper_54;
632 const auto helper_115 = helper_10 + 1;
633 const auto helper_116 = helper_15 + 1;
634 res(0) = helper_1 * helper_25 + helper_100 * helper_16 + helper_109 * helper_16 + helper_11 * helper_110 + helper_11 * helper_85 + helper_11 * helper_99 + helper_111 * helper_112 + helper_111 * helper_113 + helper_111 * helper_114 + helper_16 * helper_84 + helper_26 * helper_33 + helper_34 * helper_41 + helper_42 * helper_49 + helper_50 * helper_57 + helper_58 * helper_65;
635 res(1) = helper_100 * helper_17 + helper_102 * helper_41 + helper_109 * helper_17 + helper_110 * helper_115 + helper_112 * helper_5 + helper_113 * helper_5 + helper_114 * helper_5 + helper_115 * helper_85 + helper_115 * helper_99 + helper_17 * helper_84 + helper_25 * helper_66 + helper_33 * helper_86 + helper_49 * helper_91 + helper_57 * helper_74 + helper_65 * helper_69;
636 res(2) = helper_100 * helper_116 + helper_101 * helper_41 + helper_109 * helper_116 + helper_110 * helper_12 + helper_112 * helper_7 + helper_113 * helper_7 + helper_114 * helper_7 + helper_116 * helper_84 + helper_12 * helper_85 + helper_12 * helper_99 + helper_25 * helper_67 + helper_33 * helper_87 + helper_49 * helper_90 + helper_57 * helper_73 + helper_65 * helper_70;
637 }
638
639 void neo_hookean_2d_function(const AutodiffHessianPt &pt, const double lambda, const double mu, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> &res)
640 {
641 res.resize(2);
642 const auto // Not supported in C:
643 // f1
644 helper_0 = pt(1);
645 const auto // Not supported in C:
646 //
647 helper_1 = helper_0.getGradient()(0);
648 const auto // Not supported in C:
649 // f0
650 helper_2 = pt(0);
651 const auto // Not supported in C:
652 //
653 helper_3 = helper_2.getGradient()(1);
654 const auto // Not supported in C:
655 //
656 helper_4 = helper_2.getGradient()(0) + 1;
657 const auto // Not supported in C:
658 //
659 helper_5 = helper_0.getGradient()(1) + 1;
660 const auto helper_6 = -helper_1 * helper_3 + helper_4 * helper_5;
661 const auto helper_7 = pow(helper_6, -2);
662 const auto // Not supported in C:
663 //
664 helper_8 = helper_2.getHessian()(1, 1);
665 const auto helper_9 = helper_1 * helper_8;
666 const auto // Not supported in C:
667 //
668 helper_10 = helper_0.getHessian()(1, 1);
669 const auto helper_11 = helper_10 * helper_4;
670 const auto // Not supported in C:
671 //
672 helper_12 = helper_0.getHessian()(0, 1);
673 const auto helper_13 = helper_12 * helper_3;
674 const auto // Not supported in C:
675 //
676 helper_14 = helper_2.getHessian()(0, 1);
677 const auto helper_15 = helper_14 * helper_5;
678 const auto helper_16 = helper_7 * (helper_11 - helper_13 + helper_15 - helper_9);
679 const auto helper_17 = helper_1 * helper_16;
680 const auto helper_18 = helper_17 * lambda;
681 const auto // Not supported in C:
682 //
683 helper_19 = helper_0.getHessian()(0, 0);
684 const auto helper_20 = helper_19 * helper_3;
685 const auto // Not supported in C:
686 //
687 helper_21 = helper_2.getHessian()(0, 0);
688 const auto helper_22 = helper_21 * helper_5;
689 const auto helper_23 = helper_1 * helper_14;
690 const auto helper_24 = helper_12 * helper_4;
691 const auto helper_25 = -helper_20 + helper_22 - helper_23 + helper_24;
692 const auto helper_26 = helper_5 * helper_7;
693 const auto helper_27 = helper_25 * helper_26 * lambda;
694 const auto helper_28 = log(helper_6);
695 const auto helper_29 = 1.0 / helper_6;
696 const auto helper_30 = helper_12 * helper_29;
697 const auto helper_31 = helper_25 * helper_3 * helper_7;
698 const auto helper_32 = helper_31 * lambda;
699 const auto helper_33 = helper_16 * helper_4 * lambda;
700 const auto helper_34 = helper_14 * helper_29;
701 res(0) = helper_18 * helper_28 - helper_18 - helper_27 * helper_28 + helper_27 + mu * (-helper_17 + helper_30 + helper_8) - mu * (-helper_21 + helper_26 * (helper_20 - helper_22 + helper_23 - helper_24) + helper_30);
702 res(1) = helper_28 * helper_32 - helper_28 * helper_33 - helper_32 + helper_33 - mu * (-helper_10 + helper_34 + helper_4 * helper_7 * (-helper_11 + helper_13 - helper_15 + helper_9)) + mu * (helper_19 - helper_31 + helper_34);
703 }
704
705 void neo_hookean_3d_function(const AutodiffHessianPt &pt, const double lambda, const double mu, Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> &res)
706 {
707 res.resize(3);
708 const auto // Not supported in C:
709 // f0
710 helper_0 = pt(0);
711 const auto // Not supported in C:
712 //
713 helper_1 = helper_0.getGradient()(2);
714 const auto // Not supported in C:
715 // f1
716 helper_2 = pt(1);
717 const auto // Not supported in C:
718 //
719 helper_3 = helper_2.getGradient()(0);
720 const auto helper_4 = helper_1 * helper_3;
721 const auto // Not supported in C:
722 //
723 helper_5 = helper_2.getGradient()(2);
724 const auto // Not supported in C:
725 //
726 helper_6 = helper_0.getGradient()(0) + 1;
727 const auto helper_7 = helper_5 * helper_6;
728 const auto helper_8 = -helper_4 + helper_7;
729 const auto // Not supported in C:
730 //
731 helper_9 = helper_0.getGradient()(1);
732 const auto // Not supported in C:
733 // f2
734 helper_10 = pt(2);
735 const auto // Not supported in C:
736 //
737 helper_11 = helper_10.getGradient()(0);
738 const auto helper_12 = helper_11 * helper_9;
739 const auto // Not supported in C:
740 //
741 helper_13 = helper_10.getGradient()(1);
742 const auto helper_14 = helper_13 * helper_6;
743 const auto helper_15 = -helper_12 + helper_14;
744 const auto helper_16 = helper_15 * helper_8;
745 const auto helper_17 = helper_3 * helper_9;
746 const auto // Not supported in C:
747 //
748 helper_18 = helper_2.getGradient()(1) + 1;
749 const auto helper_19 = helper_18 * helper_6;
750 const auto helper_20 = -helper_17 + helper_19;
751 const auto helper_21 = helper_1 * helper_11;
752 const auto // Not supported in C:
753 //
754 helper_22 = helper_10.getGradient()(2) + 1;
755 const auto helper_23 = helper_22 * helper_6;
756 const auto helper_24 = -helper_21 + helper_23;
757 const auto helper_25 = helper_20 * helper_24;
758 const auto helper_26 = -helper_16 + helper_25;
759 const auto helper_27 = 1.0 / helper_26;
760 const auto // Not supported in C:
761 //
762 helper_28 = helper_2.getHessian()(0, 2);
763 const auto // Not supported in C:
764 //
765 helper_29 = helper_10.getHessian()(0, 2);
766 const auto // Not supported in C:
767 //
768 helper_30 = helper_0.getHessian()(0, 2);
769 const auto helper_31 = helper_13 * helper_30;
770 const auto helper_32 = helper_29 * helper_9;
771 const auto // Not supported in C:
772 //
773 helper_33 = helper_10.getHessian()(1, 2);
774 const auto // Not supported in C:
775 //
776 helper_34 = helper_0.getHessian()(1, 2);
777 const auto helper_35 = helper_11 * helper_34;
778 const auto helper_36 = helper_33 * helper_6 - helper_35;
779 const auto helper_37 = helper_31 - helper_32 + helper_36;
780 const auto helper_38 = helper_18 * helper_30;
781 const auto helper_39 = helper_28 * helper_9;
782 const auto // Not supported in C:
783 //
784 helper_40 = helper_2.getHessian()(1, 2);
785 const auto helper_41 = helper_40 * helper_6;
786 const auto helper_42 = helper_3 * helper_34;
787 const auto helper_43 = helper_41 - helper_42;
788 const auto helper_44 = helper_38 - helper_39 + helper_43;
789 const auto helper_45 = helper_27 * (helper_11 * helper_44 - helper_15 * helper_28 + helper_20 * helper_29 - helper_3 * helper_37);
790 const auto helper_46 = helper_12 * helper_5 + helper_13 * helper_4 - helper_13 * helper_7 - helper_17 * helper_22 - helper_18 * helper_21 + helper_19 * helper_22;
791 const auto helper_47 = lambda * log(helper_46);
792 const auto // Not supported in C:
793 //
794 helper_48 = helper_0.getHessian()(0, 1);
795 const auto helper_49 = helper_11 * helper_20 - helper_15 * helper_3;
796 const auto helper_50 = helper_26 * helper_3 - helper_49 * helper_8;
797 const auto helper_51 = 1.0 / helper_6;
798 const auto helper_52 = 1.0 / helper_20;
799 const auto helper_53 = helper_27 * helper_52;
800 const auto helper_54 = helper_51 * helper_53;
801 const auto helper_55 = helper_48 * helper_50 * helper_54;
802 const auto // Not supported in C:
803 //
804 helper_56 = helper_0.getHessian()(1, 1);
805 const auto helper_57 = helper_3 * helper_56;
806 const auto // Not supported in C:
807 //
808 helper_58 = helper_2.getHessian()(1, 1);
809 const auto helper_59 = helper_58 * helper_6;
810 const auto // Not supported in C:
811 //
812 helper_60 = helper_2.getHessian()(0, 1);
813 const auto helper_61 = helper_60 * helper_9;
814 const auto helper_62 = helper_18 * helper_48;
815 const auto helper_63 = -helper_57 + helper_59 - helper_61 + helper_62;
816 const auto helper_64 = helper_27 / pow(helper_20, 2);
817 const auto helper_65 = helper_50 * helper_63 * helper_64;
818 const auto // Not supported in C:
819 //
820 helper_66 = helper_0.getHessian()(0, 0);
821 const auto helper_67 = helper_8 * helper_9;
822 const auto helper_68 = helper_1 * helper_20;
823 const auto helper_69 = -helper_67 + helper_68;
824 const auto helper_70 = helper_19 * helper_26 + helper_49 * helper_69;
825 const auto helper_71 = helper_53 * helper_66 * helper_70 / pow(helper_6, 2);
826 const auto // Not supported in C:
827 //
828 helper_72 = helper_2.getHessian()(0, 0);
829 const auto helper_73 = helper_72 * helper_9;
830 const auto helper_74 = helper_18 * helper_66;
831 const auto helper_75 = helper_3 * helper_48;
832 const auto helper_76 = helper_6 * helper_60;
833 const auto helper_77 = -helper_73 + helper_74 - helper_75 + helper_76;
834 const auto helper_78 = helper_51 * helper_70;
835 const auto helper_79 = helper_64 * helper_77 * helper_78;
836 const auto helper_80 = pow(helper_26, -2);
837 const auto // Not supported in C:
838 //
839 helper_81 = helper_0.getHessian()(2, 2);
840 const auto helper_82 = helper_3 * helper_81;
841 const auto // Not supported in C:
842 //
843 helper_83 = helper_2.getHessian()(2, 2);
844 const auto helper_84 = helper_6 * helper_83;
845 const auto helper_85 = helper_30 * helper_5;
846 const auto helper_86 = helper_1 * helper_28;
847 const auto helper_87 = helper_11 * helper_81;
848 const auto // Not supported in C:
849 //
850 helper_88 = helper_10.getHessian()(2, 2);
851 const auto helper_89 = helper_1 * helper_29;
852 const auto helper_90 = helper_20 * (helper_22 * helper_30 + helper_6 * helper_88 - helper_87 - helper_89) + helper_24 * helper_44;
853 const auto helper_91 = helper_80 * (-helper_15 * (-helper_82 + helper_84 + helper_85 - helper_86) - helper_37 * helper_8 + helper_90);
854 const auto helper_92 = helper_49 * helper_91;
855 const auto helper_93 = helper_12 * helper_83 + helper_13 * helper_82 + helper_13 * helper_86 - helper_14 * helper_83 - helper_17 * helper_88 - helper_18 * helper_87 - helper_18 * helper_89 + helper_19 * helper_88 - helper_21 * helper_40 + helper_22 * helper_38 - helper_22 * helper_39 - helper_22 * helper_42 + helper_23 * helper_40 - helper_31 * helper_5 + helper_32 * helper_5 + helper_33 * helper_4 - helper_33 * helper_7 + helper_35 * helper_5;
856 const auto helper_94 = lambda / helper_46;
857 const auto helper_95 = helper_27 * helper_94;
858 const auto helper_96 = helper_11 * helper_56;
859 const auto // Not supported in C:
860 //
861 helper_97 = helper_10.getHessian()(1, 1);
862 const auto helper_98 = helper_13 * helper_48;
863 const auto // Not supported in C:
864 //
865 helper_99 = helper_10.getHessian()(0, 1);
866 const auto helper_100 = helper_9 * helper_99;
867 const auto helper_101 = -helper_100 + helper_6 * helper_97 - helper_96 + helper_98;
868 const auto helper_102 = helper_101 * helper_8;
869 const auto helper_103 = helper_48 * helper_5;
870 const auto helper_104 = helper_1 * helper_60;
871 const auto helper_105 = helper_103 - helper_104 + helper_43;
872 const auto helper_106 = helper_105 * helper_15;
873 const auto helper_107 = helper_1 * helper_99;
874 const auto helper_108 = helper_24 * helper_63;
875 const auto helper_109 = helper_108 + helper_20 * (-helper_107 + helper_22 * helper_48 + helper_36);
876 const auto helper_110 = -helper_102 - helper_106 + helper_109;
877 const auto helper_111 = helper_52 * helper_80;
878 const auto helper_112 = helper_111 * helper_50;
879 const auto helper_113 = helper_100 * helper_5 + helper_104 * helper_13 - helper_107 * helper_18 + helper_12 * helper_40 + helper_13 * helper_42 - helper_14 * helper_40 - helper_17 * helper_33 - helper_18 * helper_35 + helper_19 * helper_33 - helper_21 * helper_58 - helper_22 * helper_57 - helper_22 * helper_61 + helper_22 * helper_62 + helper_23 * helper_58 + helper_4 * helper_97 + helper_5 * helper_96 - helper_5 * helper_98 - helper_7 * helper_97;
880 const auto helper_114 = helper_113 * helper_94;
881 const auto helper_115 = helper_13 * helper_66;
882 const auto // Not supported in C:
883 //
884 helper_116 = helper_10.getHessian()(0, 0);
885 const auto helper_117 = helper_116 * helper_9;
886 const auto helper_118 = helper_11 * helper_48;
887 const auto helper_119 = helper_6 * helper_99;
888 const auto helper_120 = helper_115 - helper_117 - helper_118 + helper_119;
889 const auto helper_121 = helper_5 * helper_66;
890 const auto helper_122 = helper_1 * helper_72;
891 const auto helper_123 = helper_3 * helper_30;
892 const auto helper_124 = helper_28 * helper_6;
893 const auto helper_125 = helper_121 - helper_122 - helper_123 + helper_124;
894 const auto helper_126 = helper_1 * helper_116;
895 const auto helper_127 = helper_20 * (-helper_11 * helper_30 - helper_126 + helper_22 * helper_66 + helper_29 * helper_6) + helper_24 * helper_77;
896 const auto helper_128 = -helper_120 * helper_8 - helper_125 * helper_15 + helper_127;
897 const auto helper_129 = helper_111 * helper_128 * helper_78;
898 const auto helper_130 = -helper_11 * helper_38 - helper_115 * helper_5 + helper_117 * helper_5 + helper_118 * helper_5 + helper_12 * helper_28 + helper_122 * helper_13 - helper_126 * helper_18 - helper_14 * helper_28 - helper_17 * helper_29 + helper_19 * helper_29 - helper_21 * helper_60 - helper_22 * helper_73 + helper_22 * helper_74 - helper_22 * helper_75 + helper_23 * helper_60 + helper_3 * helper_31 + helper_4 * helper_99 - helper_7 * helper_99;
899 const auto helper_131 = helper_130 * helper_94;
900 const auto helper_132 = helper_48 * helper_8;
901 const auto helper_133 = helper_132 * helper_49;
902 const auto helper_134 = helper_26 * helper_75;
903 const auto helper_135 = helper_26 * helper_76;
904 const auto helper_136 = helper_105 * helper_6;
905 const auto helper_137 = helper_136 * helper_49;
906 const auto helper_138 = helper_6 * helper_8;
907 const auto helper_139 = helper_138 * (-helper_101 * helper_3 + helper_11 * helper_63 - helper_15 * helper_60 + helper_20 * helper_99);
908 const auto helper_140 = helper_110 * helper_6;
909 const auto helper_141 = helper_140 * helper_3;
910 const auto helper_142 = helper_20 * helper_30;
911 const auto helper_143 = helper_125 * helper_9;
912 const auto helper_144 = helper_1 * helper_77;
913 const auto helper_145 = -helper_132 + helper_142 - helper_143 + helper_144;
914 const auto helper_146 = helper_54 * (helper_128 * helper_19 + helper_135 + helper_145 * helper_49 + helper_26 * helper_74 + helper_69 * (helper_11 * helper_77 + helper_116 * helper_20 - helper_120 * helper_3 - helper_15 * helper_72));
915 const auto helper_147 = helper_4 - helper_7;
916 const auto helper_148 = helper_101 * helper_147 + helper_109 + helper_15 * (-helper_103 + helper_104 - helper_41 + helper_42);
917 const auto helper_149 = helper_15 * helper_27 * helper_30;
918 const auto helper_150 = helper_27 * helper_6;
919 const auto helper_151 = helper_150 * helper_37;
920 const auto helper_152 = helper_67 - helper_68;
921 const auto helper_153 = helper_15 * helper_152 + helper_26 * helper_9;
922 const auto helper_154 = helper_153 * helper_64;
923 const auto helper_155 = helper_15 * helper_6 * helper_80 * (helper_147 * helper_37 + helper_15 * (helper_82 - helper_84 - helper_85 + helper_86) + helper_90);
924 const auto helper_156 = helper_148 * helper_6;
925 const auto helper_157 = helper_156 * helper_24 * helper_80;
926 const auto helper_158 = helper_150 * helper_93 * helper_94;
927 const auto helper_159 = helper_150 * helper_24;
928 const auto helper_160 = helper_120 * helper_147 + helper_127 + helper_15 * (-helper_121 + helper_122 + helper_123 - helper_124);
929 const auto helper_161 = helper_160 * helper_80;
930 const auto helper_162 = helper_153 * helper_161 * helper_52;
931 const auto helper_163 = helper_26 * helper_48;
932 const auto helper_164 = helper_102 * helper_6 + helper_106 * helper_6 + helper_16 * helper_48 + helper_163;
933 const auto helper_165 = helper_47 * helper_53;
934 const auto helper_166 = helper_132 + helper_143;
935 const auto helper_167 = -helper_142 - helper_144 + helper_166;
936 const auto helper_168 = -helper_160 * helper_9;
937 const auto helper_169 = helper_73 - helper_74 + helper_75 - helper_76;
938 const auto helper_170 = helper_132 * helper_27;
939 const auto helper_171 = helper_142 * helper_27;
940 const auto helper_172 = helper_136 * helper_27;
941 const auto helper_173 = helper_150 * helper_44;
942 const auto helper_174 = helper_140 * helper_8 * helper_80;
943 const auto helper_175 = helper_20 * helper_6 * helper_91;
944 res(0) = helper_110 * helper_112 * helper_47 - helper_114 * helper_50 * helper_53 - helper_129 * helper_47 + helper_131 * helper_54 * helper_70 + helper_146 * helper_47 - helper_45 * helper_47 - helper_47 * helper_54 * (-helper_133 + helper_134 + helper_135 - helper_137 - helper_139 + helper_141) + helper_47 * helper_55 + helper_47 * helper_65 - helper_47 * helper_71 - helper_47 * helper_79 + helper_47 * helper_92 - helper_49 * helper_93 * helper_95 + mu * (helper_45 + helper_81 - helper_92) + mu * (helper_129 - helper_146 + helper_66 + helper_71 + helper_79) - mu * (helper_112 * helper_148 + helper_54 * (helper_133 - helper_134 - helper_135 + helper_137 + helper_139 - helper_141) + helper_55 - helper_56 + helper_65);
945 res(1) = -helper_108 * helper_150 * helper_47 * helper_52 + helper_114 * helper_159 - helper_131 * helper_153 * helper_53 - helper_149 * helper_47 - helper_15 * helper_158 - helper_151 * helper_47 + helper_154 * helper_47 * helper_77 + helper_155 * helper_47 - helper_157 * helper_47 + helper_162 * helper_47 + helper_165 * (helper_140 + helper_164) + helper_165 * (helper_120 * helper_69 - helper_15 * helper_167 - helper_163 + helper_168) + mu * (helper_149 + helper_151 - helper_155 + helper_83) - mu * (-helper_157 + helper_159 * helper_52 * (helper_57 - helper_59 + helper_61 - helper_62) + helper_53 * (helper_156 + helper_164) - helper_58) - mu * (-helper_154 * helper_169 + helper_162 + helper_53 * (helper_152 * (-helper_115 + helper_117 + helper_118 - helper_119) + helper_168 + helper_48 * (helper_16 - helper_25) + (helper_12 - helper_14) * (helper_1 * helper_169 + helper_166 + helper_30 * (helper_17 - helper_19))) - helper_72);
946 res(2) = -helper_113 * helper_138 * helper_95 + helper_128 * helper_47 * helper_69 * helper_80 - helper_130 * helper_69 * helper_95 - helper_145 * helper_27 * helper_47 + helper_158 * helper_20 - helper_170 * helper_47 + helper_171 * helper_47 - helper_172 * helper_47 + helper_173 * helper_47 + helper_174 * helper_47 - helper_175 * helper_47 - mu * (-helper_116 + helper_161 * helper_69 + helper_167 * helper_27) + mu * (helper_170 + helper_172 - helper_174 + helper_97) + mu * (-helper_171 - helper_173 + helper_175 + helper_88);
947 }
948
949 } // namespace autogen
950} // namespace polyfem
void neo_hookean_3d_function(const AutodiffHessianPt &pt, const double lambda, const double mu, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > &res)
void hooke_3d_function(const AutodiffHessianPt &pt, const assembler::ElasticityTensor &C, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > &res)
void saint_venant_3d_function(const AutodiffHessianPt &pt, const assembler::ElasticityTensor &C, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > &res)
void hooke_2d_function(const AutodiffHessianPt &pt, const assembler::ElasticityTensor &C, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > &res)
void neo_hookean_2d_function(const AutodiffHessianPt &pt, const double lambda, const double mu, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > &res)
void linear_elasticity_3d_function(const AutodiffHessianPt &pt, const double lambda, const double mu, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > &res)
void saint_venant_2d_function(const AutodiffHessianPt &pt, const assembler::ElasticityTensor &C, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > &res)
void linear_elasticity_2d_function(const AutodiffHessianPt &pt, const double lambda, const double mu, Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > &res)
Eigen::Matrix< AutodiffScalarHessian, Eigen::Dynamic, 1, 0, 3, 1 > AutodiffHessianPt