![]() |
Project
|
#include <BandMatrixSolver.h>
Public Member Functions | |
BandMatrixSolver (int32_t N, int32_t Bdim) | |
Consructor. | |
void | initWithNaN () |
debug tool: init arrays with NaN's | |
double & | A (int32_t i, int32_t j) |
access to A elements | |
double & | B (int32_t i, int32_t j) |
access to B elements | |
void | solve () |
solve the equation | |
void | solveType1 () |
solve an equation of a special type | |
int32_t | test (bool prn) |
Static Public Member Functions | |
static int32_t | test (bool prn=0) |
Test the class functionality. Returns 1 when ok, 0 when not ok. | |
Linear Equation Solver for a symmetric positive-definite band matrix A[n x n].
The matrix has a pattern of BandWidthT adjacent non-zero entries right to the diagonal in each row Here is an example with n==10, BandWidthT==4. (*) means non-zero element, (+) means symmetric element): (**** ) (+**** ) (++**** ) (+++**** ) A = ( +++**** ) ( +++**** ) ( +++****) ( +++***) ( +++**) ( +++*)
The non-zero matrix elements are stored in [n x BandWidthT] array mA
The equation to sove is A[n][n] x X[n][Bdim] = B[n][Bdim]. During calculations, the initial values of mA and mB get lost, so one can call solve() only once. The solution X is stored in mB.
Definition at line 55 of file BandMatrixSolver.h.
|
inline |
Consructor.
Definition at line 59 of file BandMatrixSolver.h.
|
inline |
access to A elements
Definition at line 75 of file BandMatrixSolver.h.
|
inline |
access to B elements
Definition at line 85 of file BandMatrixSolver.h.
|
inline |
debug tool: init arrays with NaN's
Definition at line 67 of file BandMatrixSolver.h.
|
inline |
|
inline |
solve an equation of a special type
A special solver for a band matrix were every second row has 0 at the end of the band. An example with n==10, BandWidthT==4:
(**** ) (+***0 ) (++**** ) (+++***0 )
A = ( 0++**** ) ( +++***0 ) ( 0++****) ( +++***) ( 0++**) ( +++*)
Definition at line 216 of file BandMatrixSolver.h.
int32_t o2::gpu::BandMatrixSolver< 0 >::test | ( | bool | prn | ) |
|
inlinestatic |
Test the class functionality. Returns 1 when ok, 0 when not ok.
Definition at line 98 of file BandMatrixSolver.h.