minor correction
Added pos2Idx() method to PeriodicGrid