Modeling and numerical solutions for shape-memory materials