@@ -33,7 +33,7 @@ HyperElasticIsotropic::HyperElasticIsotropic(const InputParameters & parameters)
3333 _tI4s ((_tI4 + _tI4rt ) / 2.0 ),
3434 _tII (MooseTensor ::dyad22 (_tI , _tI )),
3535 _tF (getInputBuffer ("F" )),
36- _pFstar (isParamValid ("Fstar" ) ? & getInputBuffer ("F " ) : nullptr ),
36+ _pFstar (isParamValid ("Fstar" ) ? & getInputBuffer ("Fstar " ) : nullptr ),
3737 _tmu (getInputBuffer ("mu" )),
3838 _tK (getInputBuffer ("K" )),
3939 _tK4 (getOutputBuffer ("tangent_operator" ))
@@ -60,8 +60,10 @@ HyperElasticIsotropic::computeBuffer()
6060 // First Piola-Kirchhoff stress: P = F_e * S
6161 _u = dot22 (F_e , S );
6262
63+ _tK4 = dot24 (S , _tI4 ) + ddot44 (ddot44 (_tI4rt , dot42 (dot24 (F_e , C4 ), trans2 (F_e ))), _tI4rt );
64+
6365 // Consistent tangent: K_ijkl = F^e_{im} C_{jlmn} F^e_{kn} + delta_{ik} S_{jl}
64- const auto K_geo = torch ::einsum ("...im,...jlmn,...kn->...ijkl" , F_e , C4 , F_e );
65- const auto K_stress = torch ::einsum ("ik,jl,...jl->...ijkl" , _ti , _ti , S );
66- _tK4 = K_geo + K_stress ;
66+ // const auto K_geo = torch::einsum("...im,...jlmn,...kn->...ijkl", { F_e, C4, F_e} );
67+ // const auto K_stress = torch::einsum("ik,jl,...jl->...ijkl", { _ti, _ti, S} );
68+ // _tK4 = K_geo + K_stress;
6769}
0 commit comments