Expand description
Finite-difference (PDE) solvers for 1-D, 2-D and 3-D problems, one scheme per file — numerical kernels only, independent of any payoff or grid, so they are usable as a standalone FD toolkit.
Linear kernels (consumed by the equity FD engine,
equity::finite_difference):
tridiagonal: the Thomas algorithm forA x = dwith a tridiagonalA— the workhorse of every implicit 1-D step;- [
brennan_schwartz]: the Brennan-Schwartz sweep for the linear complementarity problemA x = d, x >= exerciseof American exercise (one-sided obstacle, exact, O(n)); - [
psor]: projected SOR for the general LCP — two-sided obstacles (callable/putable structures) and the smoother inside splitting schemes.
Multi-dimensional machinery (for two/three-factor models such as Heston or hybrid equity-rates):
axis_operator:TensorGrid+AxisOperator— per-axis tridiagonal operators with node-varying coefficients, with explicit application and line-by-line implicit solves;adi: the Douglas and Hundsdorfer-Verwer ADI time steppers over those operators, with mixed-derivative terms (correlation) handled explicitly. One axis with no mixed term reduces exactly to the 1-D theta scheme.
Craig-Sneyd / Modified Craig-Sneyd steppers would slot into adi
alongside the existing two if ever needed.
Re-exports§
pub use adi::douglas_step;pub use adi::hundsdorfer_verwer_step;pub use axis_operator::AxisOperator;pub use axis_operator::TensorGrid;pub use brennan_schwartz::brennan_schwartz;pub use psor::psor;pub use psor::PsorResult;pub use tridiagonal::thomas_algorithm;
Modules§
- adi
- 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 eachA_kis a per-axis tridiagonalAxisOperatorandA_0is an optional explicitly-treated part (typically the mixed derivatives of correlated factors, e.g. therho S v u_Svterm of Heston). - axis_
operator - Per-axis tridiagonal operators on tensor-product grids — the building block for 1-D, 2-D and 3-D finite-difference schemes.
- brennan_
schwartz - Brennan-Schwartz solve of the American-exercise linear complementarity problem on a tridiagonal system.
- psor
- Projected SOR (PSOR): iterative solve of the tridiagonal linear complementarity problem with one- or two-sided obstacles.
- tridiagonal
- The Thomas algorithm: direct O(n) solve of a tridiagonal system.