yuanming-hu / taichi_mpm

High-performance moving least squares material point method (MLS-MPM) solver. (ACM Transactions on Graphics, SIGGRAPH 2018)
MIT License
2.38k stars 315 forks source link

Correct implementation of C #45

Open FantasyVR opened 4 years ago

FantasyVR commented 4 years ago

This computation of C as following is not consistent with this line. https://github.com/yuanming-hu/taichi_mpm/blob/3bb90fbe4c901aafc048dbb2d8d8aa388226d011/mls-mpm88-explained.cpp#L171 The above line is lack of one 1/dx according to the last page of this slide. 图片

RobertBiehl commented 4 years ago

@FantasyVR I think the reason is, that dos is already divided by dx. Bit hard to read, but it seems to be correct.

FantasyVR commented 4 years ago

I think it should be p.C += 4 * inv_dx * inv_dx * Mat::outer_product(weight * grid_v, dpos);

@FantasyVR I think the reason is, that dos is already divided by dx. Bit hard to read, but it seems to be correct.