Celeritas 0.7.0-dev.127+develop.e63889793
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::TridiagonalSolver Class Reference

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.
 

Detailed Description

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.


The documentation for this class was generated from the following files: