45 #ifndef _PETSCSOLVER_HPP_ 46 #define _PETSCSOLVER_HPP_ 48 #include <Eigen/Dense> 49 #include <Eigen/SparseCore> 70 PetscSolver(
unsigned int dnz,
unsigned int onz,
double tol=1E-12,
unsigned int kspnum=0);
81 bool SolveSystem(Eigen::SparseMatrix<double> &A, Eigen::VectorXd &b);
unsigned int o_nz
Number of nonzero in off-diagonal per row.
Definition: PetscSolver.hpp:93
This file contains the abstract "LinearSystem object" declarations, which defines the library to solv...
double Tolerance
Residual tolerance error.
Definition: PetscSolver.hpp:96
PetscSolver(unsigned int dnz, unsigned int onz, double tol=1E-12, unsigned int kspnum=0)
Creates a PetscSolver object.
unsigned int d_nz
Number of nonzero in diagonal per row.
Definition: PetscSolver.hpp:90
bool SolveSystem(Eigen::SparseMatrix< double > &A, Eigen::VectorXd &b)
Solve the linear system.
Class for solving a linear system using an iterative solver assuming the matrix can be symmetric posi...
Definition: PetscSolver.hpp:60
Virtual class for solving a linear system of the form Ax = b.
Definition: LinearSystem.hpp:44
const Eigen::VectorXd & GetSolution()
Gets the soultion vector.
Eigen::VectorXd x
Vector of unknowns.
Definition: PetscSolver.hpp:99
~PetscSolver()
Destroys this PetscSolver object.