A method of assisting the function of a heart, the method including calculating heart stroke blood volume and cardiac output blood volume in real-time using crystals attached to or placed about the heart, wherein at least one of the crystals is embedded in at least one cardiac assist device which is attached to or placed about the surface of the heart, the heart stroke blood volume and cardiac output blood volume being calculated based on measured distances between selected crystals and the shape of the at least one cardiac assist device, which is known when distance measurements are obtained, and operation of the cardiac assist device being controlled as a function of the calculated heart stroke blood volume and cardiac output blood volume.