Localize variables in ewald_LRcorrection