Local density theory of ionic hyperpolarizability