move dist_sq to MaterialPoint class