Forward Electrophysiological Modeling and Inverse Problem for Uterine Contractions during Pregnancy