An energy-conservative DG-FEM approach for solid–liquid phase change