{"push_id":2692100793,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"1ab9b2ba2b33986f4c2af0b45c77ca8ba58c0175","before":"3191d09b891e33df9e6419e45c9caa4e5d9a9246","commits":[{"sha":"1ab9b2ba2b33986f4c2af0b45c77ca8ba58c0175","author":{"name":"punkduckable","email":"bf974c2f0286b1dc4f3d6f2c81b59c6682bc737b@gmail.com"},"message":"Got ripping to work (sorta) + Fixed memory leaks\n\nFirst, I fixed the memory leask that were present in the last commit. In that code, when resetting the particle neighbors, I didn't 'free' the old R, Mag_R, W, grad_W... dynamic arrays. Because of this, when new neighbors were set, the old dynamic arrays were lost. This was causing a memory leak. Freeing these other dynamic arrays fixed the leak (See Particles.c lines 780)\n\nI also fixed the damage. The old damage calculation was based on the current max principle stress, not the historic maximum stretch. Making this one simple change fixed the damage problem.\n\nI also renamed the particle damage members, 'Stretch_H' stores the history maximum stretch, 'Stretch_M' stores the current maximum principle stress (updated each iteration) and 'Strecth_Critical' stores the critical stretch for a given particle (these chnages can be found in Particle.h).\n\nI also made the critical stretch a particle property rather than a class property. Thus, each particle gets its own critical stretch. This stretch is calculated randomly using a normal distribution whenever the default constructor is called (See PArtiicle.C lines 18). I also made a few dyntax changes (Particle.c:225), opting to use P_In.D rather than an alias variable D. This choice was made because I think that using P_In.D better communicates that the 'D' is a particle property, not a material property. I plan on making similar chnages elsewhere in the code.\n\nI also modified the way that the 'particle volume' is defined. Before, the volume was a fixed value regardless of the inter particle spacing. Now, the particle volume is simply the cube of the inter particle spacing (see tests.c:293).\n\nI also reduced the viscosity, this change made the resulting code a little less damped/look more fluid and natural.\n\nIn my next commit, I plan on using aliases more intelligently (using them only for material properties, not particle properties) and re-doing the particle array allocation such that vertical columns have a fixed x,z coordinate (a column will be all the particles with the same x,z coordinate).","distinct":true,"url":"https://api.github.com/repos/punkduckable/SPH/commits/1ab9b2ba2b33986f4c2af0b45c77ca8ba58c0175"}]}
{"actor":{"display_login":"punkduckable"}}