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

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

#include <EigenCholSolver.h>

Inheritance diagram for EigenCholSolver:
Solver

Public Member Functions

 EigenCholSolver (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.
 
 ~EigenCholSolver ()
 class destructor. Frees memory allocated by pardiso.
 

Private Attributes

int MPI_rank
 
int init
 
int n
 
SpMat Q
 
SimplicialLDLT< 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 EigenCholSolver::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 EigenCholSolver::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 EigenCholSolver::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 EigenCholSolver::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 EigenCholSolver::factorize_w_constr ( SpMat &  Q,
const MatrixXd &  D,
double &  log_det,
MatrixXd &  V 
)
virtual

Implements Solver.

◆ selected_inversion()

void EigenCholSolver::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 EigenCholSolver::selected_inversion_w_constr ( SpMat &  Q,
const MatrixXd &  D,
Vect &  inv_diag,
MatrixXd &  V 
)
virtual

Implements Solver.

◆ symbolic_factorization()

void EigenCholSolver::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

◆ MPI_rank

int EigenCholSolver::MPI_rank
private

pass on current MPI rank

◆ n

int EigenCholSolver::n
private

size of the matrix

◆ Q

SpMat EigenCholSolver::Q
private

sparse precision matrix Q. Eigen format.


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