add grid-based weight functions
Merge branch 'master' of https://github.com/FeiZhu/Physika