added check to make sure mesh values for p3m are even