1#ifndef EIGEN_CHOL_SOLVER_H
2#define EIGEN_CHOL_SOLVER_H
14#include <Eigen/SparseCore>
15#include <Eigen/SparseCholesky>
28typedef Eigen::VectorXd Vect;
29typedef Eigen::SparseMatrix<double> SpMat;
53 CholmodSupernodalLLT<SpMat> solverEigenQ;
56 SimplicialLDLT<SpMat> solverEigenQ;
85 void factorize_w_constr(SpMat&
Q,
const MatrixXd& D,
double&
log_det, MatrixXd& V);
96 void factorize_solve_w_constr(SpMat&
Q, Vect&
rhs,
const MatrixXd& Dxy,
double &
log_det, Vect&
sol, MatrixXd& V);
105 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 EigenCholSolver.h:38
void factorize(SpMat &Q, double &log_det, double &t_priorLatChol)
numerical factorisation.
Definition EigenCholSolver.cpp:37
int n
Definition EigenCholSolver.h:48
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)
Definition EigenCholSolver.cpp:71
void symbolic_factorization(SpMat &Q, int &init)
performs the symbolic factorisation.
Definition EigenCholSolver.cpp:24
void selected_inversion(SpMat &Q, Vect &inv_diag)
selected inversion of the diagonal elements of Q.
Definition EigenCholSolver.cpp:101
SpMat Q
Definition EigenCholSolver.h:50
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 ...
Definition EigenCholSolver.cpp:118
int MPI_rank
Definition EigenCholSolver.h:43
EigenCholSolver(int &MPI_rank)
constructor. initialises parameters, check pardiso license.
Definition EigenCholSolver.cpp:4
~EigenCholSolver()
class destructor. Frees memory allocated by pardiso.
Definition EigenCholSolver.cpp:125
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