#include <SparseSubstitutionSolver.h>
◆ SparseSubstitutionSolver()
SparseSubstitutionSolver::SparseSubstitutionSolver |
( |
| ) |
|
◆ ~SparseSubstitutionSolver()
SparseSubstitutionSolver::~SparseSubstitutionSolver |
( |
| ) |
|
◆ apply_matrix()
void SparseSubstitutionSolver::apply_matrix |
( |
scalar * |
in, |
|
|
scalar * |
result |
|
) |
| |
|
virtual |
◆ init()
int SparseSubstitutionSolver::init |
( |
int |
num_nodes, |
|
|
int |
num_elements, |
|
|
mesh_node * |
node, |
|
|
tetra_element_linear * |
elem, |
|
|
SimulationParams * |
params, |
|
|
int |
num_pinned_nodes, |
|
|
int * |
pinned_nodes_list, |
|
|
set< int > |
bsite_pinned_node_list |
|
) |
| |
|
virtual |
Builds the lower triangular Cholesky decomposed mass matrix
Implements Solver.
◆ solve()
int SparseSubstitutionSolver::solve |
( |
vector3 * |
x | ) |
|
|
virtual |
Solves the equation Ax = b for the unknown vector x, for 3 right-hand-sides (b vectors) at once, using forward and backward substitution. This function considers the case where A is sparse symmetric positive-definite and therefore the solver must have constructed a variable band matrix containing the result of a Cholesky decomposition on the original matrix A.
This implementation is memory efficient as it modifies the vector x in place (no temporary vectors are needed).
Implements Solver.
◆ inverse_diag
scalar* SparseSubstitutionSolver::inverse_diag |
|
private |
scalar* SparseSubstitutionSolver::L |
|
private |
Stores all the data from the bands of the band matrix (note that this may contain some zeroes, but if it is a proper sparse band matrix there should be very few of these) NOT INCLUDING THE DIAGONAL: only the inverse of the diagonal.
The off-diagonal data for the lower and upper triangles are stored in L and U respectively.
Referenced by init(), solve(), SparseSubstitutionSolver(), and ~SparseSubstitutionSolver().
◆ L_key
int* SparseSubstitutionSolver::L_key |
|
private |
Array of size num_rows. Each element contains the index of the last non-zero entry in the corresponding column. This is the end of the "band" of entries stored in that column, that starts from the diagonal (travelling downwards or upwards for the L and U matrices respectively).
Referenced by init(), solve(), SparseSubstitutionSolver(), and ~SparseSubstitutionSolver().
◆ num_rows
int SparseSubstitutionSolver::num_rows |
|
private |
◆ total_entries_in_U
int SparseSubstitutionSolver::total_entries_in_U |
|
private |
Stores the number of entries stored in the upper triangle
Referenced by init(), and solve().
scalar * SparseSubstitutionSolver::U |
|
private |
◆ U_key
int * SparseSubstitutionSolver::U_key |
|
private |
The documentation for this class was generated from the following files: