functions
Usefull calculation functions.
Thefunctions in this module are supposed to be used in various other modules.
They can be called by the prefix tunax.functions. or directly by
tunax..
- tridiag_solve(a, b, c, f)[source]
Solve a trigiagonal problem.
The tridiagonal problem can be written \(\mathbb MX = F\) where \(\mathbb M = \begin{pmatrix} b_1 & c_1 & & \\ a_2 & \ddots & \ddots & \\ & \ddots & \ddots & c_{n-1} \\ & & a_n & b_n \end{pmatrix}\) and \(F = \begin{pmatrix} f_1 \\ \vdots \\ f_n \end{pmatrix}\). The problem is solved by recurrence using
jax.lax- Parameters:
- Returns:
x – Solution \(X\) of tridiagonal problem.
- Return type:
Float[Array, ‘nz’]