1. update grid-based weight functions 2. fix spiky kernel gradient error