INLA_DIST
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
EigenSolver Class Reference

creates solver class using pardiso for factorising, solving and selectively inverting linear system. More...

#include <EigenSolver.h>

Inheritance diagram for EigenSolver:
Solver

Public Member Functions

 EigenSolver (int &MPI_rank)
 constructor. initialises parameters, check pardiso license.
 
void symbolic_factorization (SpMat &Q, int &init)
 performs the symbolic factorisation.
 
void factorize (SpMat &Q, double &log_det, double &t_priorLatChol)
 numerical factorisation.
 
void factorize_w_constr (SpMat &Q, const MatrixXd &D, double &log_det, MatrixXd &V)
 
void factorize_solve (SpMat &Q, Vect &rhs, Vect &sol, double &log_det, double &t_condLatChol, double &t_condLatSolve)
 factorises and solves matrix in one call (to reuse pardiso objects)
 
void factorize_solve_w_constr (SpMat &Q, Vect &rhs, const MatrixXd &Dxy, double &log_det, Vect &sol, MatrixXd &V)
 
void selected_inversion (SpMat &Q, Vect &inv_diag)
 selected inversion of the diagonal elements of Q.
 
void selected_inversion_w_constr (SpMat &Q, const MatrixXd &D, Vect &inv_diag, MatrixXd &V)
 
void compute_full_inverse (MatrixXd &H, MatrixXd &C)
 inversion of the entire matrix (only meant for small matrices) by means of using identity right-hand side.
 
 ~EigenSolver ()
 class destructor. Frees memory allocated by pardiso.
 

Private Attributes

int MPI_rank
 
int init = 0
 
int n
 
long unsigned int nnz
 
SpMat Q
 
int * ia
 
int * ja
 
double * a
 
double * b
 
double * x
 
SimplicialLLT< SpMat > solverEigenQ
 

Additional Inherited Members

- Protected Attributes inherited from Solver
int init
 
double log_det
 
SpMat Q
 
Vect rhs
 
Vect sol
 

Detailed Description

creates solver class using pardiso for factorising, solving and selectively inverting linear system.

divided into set up, symbolic factorisation, numerical factorisation, numerical factorisation & solve and selected inversion (of the diagonal elements)

Member Function Documentation

◆ compute_full_inverse()

void EigenSolver::compute_full_inverse ( MatrixXd &  H,
MatrixXd &  C 
)

inversion of the entire matrix (only meant for small matrices) by means of using identity right-hand side.

Parameters
[in]Hdense matrix.
[in,out]Cinverse of H.

◆ factorize()

void EigenSolver::factorize ( SpMat &  Q,
double &  log_det,
double &  t_priorLatChol 
)
virtual

numerical factorisation.

Parameters
[in]Qprecision matrix to be factorised.
[in,out]log_detcomputes log determinant of Q.

Implements Solver.

◆ factorize_solve()

void EigenSolver::factorize_solve ( SpMat &  Q,
Vect &  rhs,
Vect &  sol,
double &  log_det,
double &  t_condLatChol,
double &  t_condLatSolve 
)
virtual

factorises and solves matrix in one call (to reuse pardiso objects)

Parameters
[in]Qprecision matrix.
[in]rhsright-hand side of the system.
[in,out]solsolution of the system.
[in,out]log_detlog determinant of Q.

Implements Solver.

◆ factorize_solve_w_constr()

void EigenSolver::factorize_solve_w_constr ( SpMat &  Q,
Vect &  rhs,
const MatrixXd &  Dxy,
double &  log_det,
Vect &  sol,
MatrixXd &  V 
)
virtual

Implements Solver.

◆ factorize_w_constr()

void EigenSolver::factorize_w_constr ( SpMat &  Q,
const MatrixXd &  D,
double &  log_det,
MatrixXd &  V 
)
virtual

Implements Solver.

◆ selected_inversion()

void EigenSolver::selected_inversion ( SpMat &  Q,
Vect &  inv_diag 
)
virtual

selected inversion of the diagonal elements of Q.

Parameters
[in]Qprecision matrix.
[in,out]inv_diaginverse diagonal to hold the solution vector.

Implements Solver.

◆ selected_inversion_w_constr()

void EigenSolver::selected_inversion_w_constr ( SpMat &  Q,
const MatrixXd &  D,
Vect &  inv_diag,
MatrixXd &  V 
)
virtual

Implements Solver.

◆ symbolic_factorization()

void EigenSolver::symbolic_factorization ( SpMat &  Q,
int &  init 
)
virtual

performs the symbolic factorisation.

Parameters
[in]Qprecision matrix to be factorised.
[in,out]initinteger value indicating status of symbolic factorisation. Changed to one at the end of the function.

For each PardisoSolver object symbolic factorisation only needs to be performed once as sparsity patters if assumed to remain the same.

Implements Solver.

Member Data Documentation

◆ a

double* EigenSolver::a
private

CSR format. values.

◆ b

double* EigenSolver::b
private

right-hand side.

◆ ia

int* EigenSolver::ia
private

CSR format. row indices.

◆ ja

int* EigenSolver::ja
private

CSR format. col pointers.

◆ MPI_rank

int EigenSolver::MPI_rank
private

pass on current MPI rank

◆ n

int EigenSolver::n
private

size of the matrix

◆ nnz

long unsigned int EigenSolver::nnz
private

number of nonzeros

◆ Q

SpMat EigenSolver::Q
private

sparse precision matrix Q. Eigen format.

◆ x

double* EigenSolver::x
private

placeholder for solution.


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