Dear GetFEM-users,
As Grad(expression) is available in the new version of GetFEM++, I
compute the divergence of the first Piola-Kirchhoff stress tensor as
(python code):
/div_sigma = "( Trace(Grad(first_Piola_Kirchhoff_stress)(1,:,:)) +
Trace(Grad(first_Piola_Kirchhoff_stress)(2,:,:)) +
Trace(Grad(first_Piola_Kirchhoff_stress)(3,:,:)) )"/
in which first_Piola_Kirchhoff_stress is a macro of a model /md/, which
is defined as:
/md.add_macro("second_Piola_Kirchhoff_stress",
"Compressible_Mooney_Rivlin_sigma(Grad_u, [c1;c2;d1])")//
//md.add_macro("first_Piola_Kirchhoff_stress",
"(Id(meshdim)+Grad_u)*second_Piola_Kirchhoff_stress")/
Then I use generic assembly to assembly this quantity as:
/eta_L_1_tmp = gf.asm_generic(mim,1,"(("+div_sigma+").delta)*Test_t",-1//
// ,md//
// ,"delta", False, mfz, delta//
// ,"t", True,mfrj,np.zeros(mfrj.nbdof()) )/
with /delta/ a given vector on a meshfem /mfz/.
When executing the code, GetFEM++ only gives the error as
/segmentation fault (core dumped)/
If you see any problem in my code, please let me know. Thank you in advance.
Best regards,
Phuoc