Computation of the phase fraction in a discrete model for a pseudoelastic material