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

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

#include <PardisoSolver.h>

Inheritance diagram for PardisoSolver:
Solver

Public Member Functions

 PardisoSolver (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_inverse_pardiso (MatrixXd &H, MatrixXd &C)
 inversion of the entire matrix (only meant for small matrices) by means of using identity right-hand side.
 
 ~PardisoSolver ()
 class destructor. Frees memory allocated by pardiso.
 

Private Attributes

int MPI_rank
 
int n
 
long unsigned int nnz
 
SpMat Q
 
int * ia
 
int * ja
 
double * a
 
double * b
 
double * x
 
void * pt [64]
 
int iparm [64]
 
double dparm [64]
 
int maxfct
 
int mnum
 
int phase
 
int error
 
int msglvl
 
int solver
 
int num_procs
 
int i
 
int k
 
long unsigned int l
 
double ddum
 
int idum
 
int mtype
 
int init
 

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_inverse_pardiso()

void PardisoSolver::compute_inverse_pardiso ( 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 PardisoSolver::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 PardisoSolver::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 PardisoSolver::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 PardisoSolver::factorize_w_constr ( SpMat &  Q,
const MatrixXd &  D,
double &  log_det,
MatrixXd &  V 
)
virtual

Implements Solver.

◆ selected_inversion()

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

Implements Solver.

◆ symbolic_factorization()

void PardisoSolver::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* PardisoSolver::a
private

CSR format. values.

◆ b

double* PardisoSolver::b
private

right-hand side.

◆ ddum

double PardisoSolver::ddum
private

Double dummy

◆ ia

int* PardisoSolver::ia
private

CSR format. row indices.

◆ idum

int PardisoSolver::idum
private

Integer dummy.

◆ init

int PardisoSolver::init
private

flag that indicates if symbolic factorisation already performed.

◆ ja

int* PardisoSolver::ja
private

CSR format. col pointers.

◆ MPI_rank

int PardisoSolver::MPI_rank
private

pass on current MPI rank

◆ mtype

int PardisoSolver::mtype
private

matrix type

◆ n

int PardisoSolver::n
private

size of the matrix

◆ nnz

long unsigned int PardisoSolver::nnz
private

number of nonzeros

◆ num_procs

int PardisoSolver::num_procs
private

Number of processors.

◆ pt

void* PardisoSolver::pt[64]
private

Internal solver memory pointer pt

◆ Q

SpMat PardisoSolver::Q
private

sparse precision matrix Q. Eigen format.

◆ x

double* PardisoSolver::x
private

placeholder for solution.


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