|
Celeritas 0.7.0-dev.194+develop.0df4cab59
|
Solve a tridiagonal system of equations using the Thomas algorithm. More...
#include <TridiagonalSolver.hh>
Public Types | |
Type aliases | |
| using | Real3 = Array< real_type, 3 > |
| using | Coeffs = std::vector< Real3 > |
| using | SpanConstReal = Span< real_type const > |
| using | SpanReal = Span< real_type > |
Public Member Functions | |
| TridiagonalSolver (Coeffs &&tridiag) | |
| Construct with the tridiagonal matrix coefficients. | |
| void | operator() (SpanConstReal rhs, SpanReal x) const |
| Solve the tridiagonal system. | |
Solve a tridiagonal system of equations using the Thomas algorithm.
This is a simplified form of Gaussian elimination that can solve a tridiagonal system \( \mathbf{T} \mathbf{x} = \mathbf{b} \) in O(n) time.
The class is meant for use during setup (originally for the calculation of spline coefficients) and cannot be used on device.