kernel, mesh calculation