gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
6 #ifndef LINEAR_SYSTEM_EIGEN_H
7 #define LINEAR_SYSTEM_EIGEN_H
11 #include "GmshConfig.h"
15 #if defined(HAVE_EIGEN)
17 #include <Eigen/Sparse>
19 template <
class scalar>
class linearSystemEigen :
public linearSystem<scalar> {
23 Msg::Info(
"linearSystemEigen not implemented for this element type");
28 virtual void clear() {}
37 virtual void addToMatrix(
int row,
int col,
const double &val) {}
38 virtual void getFromMatrix(
int row,
int col,
double &val)
const {}
45 enum linearSystemEigenSolver {
57 template <>
class linearSystemEigen<double> :
public linearSystem<double> {
61 Eigen::SparseMatrix<double> A;
62 linearSystemEigenSolver solverType;
67 void setSolverType(linearSystemEigenSolver solverName);
81 virtual void addToMatrix(
int row,
int col,
const double &val);
82 virtual void getFromMatrix(
int row,
int col,
double &val)
const;
static void Info(const char *fmt,...)
virtual int systemSolve()=0
virtual void zeroRightHandSide()=0
virtual void zeroSolution()=0
virtual void zeroMatrix()=0
virtual void getFromRightHandSide(int _row, scalar &val) const =0
virtual void addToRightHandSide(int _row, const scalar &val, int ith=0)=0
virtual void addToSolution(int _row, const scalar &val)=0
virtual bool isAllocated() const =0
virtual double normInfRightHandSide() const =0
virtual void allocate(int nbRows)=0
virtual void insertInSparsityPattern(int _row, int _col)
virtual double normInfSolution() const
virtual void getFromMatrix(int _row, int _col, scalar &val) const =0
virtual void getFromSolution(int _row, scalar &val) const =0
virtual void addToMatrix(int _row, int _col, const scalar &val)=0