Expand description
ADI (alternating direction implicit) time steppers for 1-D, 2-D and
3-D parabolic PDEs u_t = sum_k A_k u + A_0 u, where each A_k is a
per-axis tridiagonal AxisOperator and A_0 is an optional
explicitly-treated part (typically the mixed derivatives of correlated
factors, e.g. the rho S v u_Sv term of Heston).
Two schemes, the standard choices in finance:
douglas_step(Do): one explicit predictor plus one implicit correction per axis. First-order in time when a mixed term is present, second-order (Crank-Nicolson-like attheta = 1/2) without one. With a single axis and no mixed term it reduces exactly to the 1-D theta scheme.hundsdorfer_verwer_step(HV): Douglas plus a corrector sweep; second-order in time including the mixed term, at roughly twice the cost. The scheme of choice for Heston-type problems.
Every stage’s implicit solve is a line-by-line Thomas pass, so a step is O(nodes) regardless of dimension. Boundary rows of the operators encode the boundary conditions (all-zero row = value held fixed).
Functions§
- douglas_
step - One Douglas ADI step of size
dtfromu;thetais the implicit weight (1/2 is standard, 1 fully implicit stages). - hundsdorfer_
verwer_ step - One Hundsdorfer-Verwer ADI step of size
dtfromu: a Douglas predictor followed by a corrector sweep with weightmu(1/2 is the standard choice giving second order with mixed terms).