An efficient algorithm to compute transient pressure responses of slanted wells with arbitrary inclination in reservoirs