Computational model of three-dimensional cardiac electromechanics