Discrete Free Energy Functionals for Elastic Materials with Phase Change