Well-posedness and approximation for a one-dimensional model for shape memory alloys