24#ifndef _GEMA_LIS_SOLVER_H_
25#define _GEMA_LIS_SOLVER_H_
31struct LIS_SOLVER_STRUCT;
32typedef struct LIS_SOLVER_STRUCT* LIS_SOLVER;
53 virtual const char* pluginName()
const {
return "LisSolver"; }
56 virtual const char* pluginType()
const {
return "lis"; }
58 virtual bool loadPrivateData(
LuaTable& table);
61 int numThreads = -1)
const;
69 virtual QString quickDescription()
const;
72 virtual int trackItemId()
const {
return _trackSolveItem; }
95 int _trackSolveItem = -1;
96 int _trackSolveIterAttr = -1;
97 int _trackSolveResidualAttr = -1;
98 int _trackSolveInternalTimeAttr = -1;
100 int _trackDetailedVectorMatrixSetupItem = -1;
101 int _trackDetailedVectorMatrixSolveItem = -1;
virtual const GmLogCategory & logger() const
QString description() const
A class for creating a GeMA solver based on th Lis library.
Definition lisSolver.h:43
LisSolver(GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
Constructor. Will be called by the plugin loading code.
Definition lisSolver.cpp:109
static void libraryInit(const GmLogCategory &logger)
Initializes the Lis library on plugin loading.
Definition lisSolver.cpp:65
static void libraryFinalize()
Closes the Lis library on plugin destruction.
Definition lisSolver.cpp:99
static int _numSolvers
The number of instanced solvers.
Definition lisSolver.h:82
GmSparseMatrixOptions _lisMatrixOptions
The set of options used for building the sparse matrix.
Definition lisSolver.h:84
static int _maxThreads
The maximum number of threads used to configure the Lis library.
Definition lisSolver.h:81
bool loadLisParameters(LuaTable &table)
Loads LIS options from the given Lua table, filling _solverOptions with the set of options that shoul...
Definition lisSolver.cpp:175
bool _printIterations
Should the solver print, after solving, the number of iterations used by the numeric solver?
Definition lisSolver.h:89
int _nthreads
The configured number of threads for the Lis solver.
Definition lisSolver.h:87
bool _printLisMsgs
Enable or disable LIS messages to the CONSOLE only.
Definition lisSolver.h:92
LIS_SOLVER _solver
The solver.
Definition lisSolver.h:86
void fetchSolveMetrics(GmRunProgress *ps) const
Get (and possibly print) iterations, residual and time statistics.
Definition lisSolver.cpp:679
virtual bool setSolverTolerance(double tol)
Updates the current solver tolerance. Will be used by any successive calls to solve()
Definition lisSolver.cpp:428
QStringList _solverOptions
List with the set of options to be configured on the solver.
Definition lisSolver.h:88
virtual ~LisSolver()
Destructor.
Definition lisSolver.cpp:160
bool armadilloSolve(GmRunProgress *ps, GmSolverMatrix *A, const GmVector &b, GmVector &x, bool xIsGuess=false) const
Solve implementation.
Definition lisSolver.cpp:545
bool _printResidual
Should the solver print, after solving, the residual?
Definition lisSolver.h:90
bool _lisAlwaysInitx
If set to true, the initial guess will always be zero, independently of the value of the xIsGuess par...
Definition lisSolver.h:93
bool _printTimes
Should the solver print, after solving, a breakdown of solving and preconditioning times?
Definition lisSolver.h:91