Theory and simulations of ionic conductors