A Computer Model of Uterine Contractions Based on Discrete Contractile Elements