Grid orthogonalization for curvilinear alternating-direction techniques