geoelements / diffmpm

Differentiable Material Point Method
25 stars 6 forks source link

Code not working for multiple particle objects #31

Open SachinJalan opened 1 year ago

SachinJalan commented 1 year ago

Steps to generate the issue.

  1. Generate an example with a single cell and a single particle object and run the solver.
  2. Generate an example with exactly same configuration except have 2 particle objects having same material properties and element_ids. The results does not match. Issue in the code:- In this line of the code scheme.py , compute_nodal_mass function will be called same number of times as the number of particle objects and in this function this line will set the nodal mass to 0 every time the function is called hence the nodal mass for the last called Particle object would remain. Similar issue with the compute_nodal_momentum function.
chahak13 commented 1 year ago

Thanks for pointing this out. I also realised this and #27 should resolve this too.