On 8/24/22 07:56, jhchen via SfePy wrote:
Thanks for your patient instructions, and I have solved the former problems under your help. But I’m sorry to have to bother you again. I could get the stiffness matrix with expected shape now, but the matrix elements are all zeros! I guess it’s most likely to go wrong in the material definition and term selection as well as term implementation steps. I have attached my code snippet together with the mesh used and a description file. Could you please help me check what’s wrong with my code snippet, especially my material definition part, and see if I have chosen the right terms to build equations?
You did not assemble the matrix by calling pb.equations.eval_tangent_matrices().
See the attached script. I changed dw_diffusion to dw_laplace, as D is isotropic. I also had to split the material, because the per-region definition seems not to work with the surface integrals.
r.