Closed kejacobson closed 2 years ago
Check partials:
commit 9295e92, examples/funtofem_and_tacs/openmdao_fixed_load.py
in complex mode
After adding applyBCs
to the rev mode linearizations and switching to complex mode, FD and reverse mode match to machine precision.
'output' wrt 'variable' | fwd mag. | rev mag. | check mag. | a(fwd-chk) | a(rev-chk) | a(fwd-rev) | r(fwd-chk) | r(rev-chk) | r(fwd-rev) |
---|---|---|---|---|---|---|---|---|---|
'u_s' wrt 'dv_struct' | 0.0000e+00 | 4.2756e+07 | 4.2756e+07 | 4.2756e+07 | 1.8096e-08 | 4.2756e+07 | 1.0000e+00 | 4.2323e-16 | 1.0000e+00 |
'u_s' wrt 'f_s' | 0.0000e+00 | 6.0000e+00 | 6.0000e+00 | 6.0000e+00 | 0.0000e+00 | 6.0000e+00 | 1.0000e+00 | 0.0000e+00 | 1.0000e+00 |
'u_s' wrt 'u_s' | 0.0000e+00 | 2.4104e+12 | 2.4104e+12 | 2.4104e+12 | 3.5972e-04 | 2.4104e+12 | 1.0000e+00 | 1.4924e-16 | 1.0000e+00 |
'u_s' wrt 'x_s0' | 0.0000e+00 | 1.4869e+11 | 1.4869e+11 | 1.4869e+11 | 3.7798e-05 | 1.4869e+11 | 1.0000e+00 | 2.5421e-16 | 1.0000e+00 |
'output' wrt 'variable' | fwd mag. | rev mag. | check mag. | a(fwd-chk) | a(rev-chk) | a(fwd-rev) | r(fwd-chk) | r(rev-chk) | r(fwd-rev) |
---|---|---|---|---|---|---|---|---|---|
'f_struct' wrt 'dv_struct' | 0.0000e+00 | 4.2062e+00 | 4.2062e+00 | 4.2062e+00 | 1.7764e-15 | 4.2062e+00 | 1.0000e+00 | 4.2232e-16 | 1.0000e+00 |
'f_struct' wrt 'u_s' | 0.0000e+00 | 9.6475e+00 | 9.6475e+00 | 9.6475e+00 | 3.5870e-15 | 9.6475e+00 | 1.0000e+00 | 3.7181e-16 | 1.0000e+00 |
'f_struct' wrt 'x_s0' | 0.0000e+00 | 4.4197e+00 | 4.4197e+00 | 4.4197e+00 | 1.6506e-15 | 4.4197e+00 | 1.0000e+00 | 3.7345e-16 | 1.0000e+00 |
'mass' wrt 'dv_struct' | 0.0000e+00 | 1.2800e+06 | 1.2800e+06 | 1.2800e+06 | 4.6566e-10 | 1.2800e+06 | 1.0000e+00 | 3.6380e-16 | 1.0000e+00 |
'mass' wrt 'u_s' | 0.0000e+00 | 0.0000e+00 | 0.0000e+00 | 0.0000e+00 | 0.0000e+00 | 0.0000e+00 | nan | nan | nan |
'mass' wrt 'x_s0' | 0.0000e+00 | 7.7460e+03 | 7.7460e+03 | 7.7460e+03 | 1.0779e-12 | 7.7460e+03 | 1.0000e+00 | 1.3915e-16 | 1.0000e+00 |
Transitioned to pytacs interface in #80
f_struct
list