Alternating direction implicit method