1#ifndef EIGEN_CHOL_SOLVER_H
14#include <Eigen/SparseCore>
15#include <Eigen/SparseCholesky>
16#include <Eigen/CholmodSupport>
26typedef Eigen::VectorXd Vect;
27typedef Eigen::SparseMatrix<double> SpMat;
47 long unsigned int nnz;
58 SimplicialLLT<SpMat> solverEigenQ;
86 void factorize_w_constr(SpMat&
Q,
const MatrixXd& D,
double&
log_det, MatrixXd& V);
97 void factorize_solve_w_constr(SpMat&
Q, Vect&
rhs,
const MatrixXd& Dxy,
double &
log_det, Vect&
sol, MatrixXd& V);
106 void selected_inversion_w_constr(SpMat&
Q,
const MatrixXd& D, Vect& inv_diag, MatrixXd& V);
creates solver class using pardiso for factorising, solving and selectively inverting linear system.
Definition EigenSolver.h:36
EigenSolver(int &MPI_rank)
constructor. initialises parameters, check pardiso license.
Definition EigenSolver.cpp:4
double * a
Definition EigenSolver.h:53
SpMat Q
Definition EigenSolver.h:49
int n
Definition EigenSolver.h:46
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 symbolic_factorization(SpMat &Q, int &init)
performs the symbolic factorisation.
int * ja
Definition EigenSolver.h:52
double * x
Definition EigenSolver.h:56
~EigenSolver()
class destructor. Frees memory allocated by pardiso.
void selected_inversion(SpMat &Q, Vect &inv_diag)
selected inversion of the diagonal elements of Q.
int * ia
Definition EigenSolver.h:51
long unsigned int nnz
Definition EigenSolver.h:47
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 ...
void factorize(SpMat &Q, double &log_det, double &t_priorLatChol)
numerical factorisation.
Definition EigenSolver.cpp:22
int MPI_rank
Definition EigenSolver.h:41
double * b
Definition EigenSolver.h:55
abstract base solver class to enable to be able two switch between solvers (current options: PARDISO ...
Definition Solver.h:27
double log_det
Definition Solver.h:47
Vect rhs
Definition Solver.h:50
Vect sol
Definition Solver.h:51