24#ifndef _GEMA_NUMSOLVER_H_
25#define _GEMA_NUMSOLVER_H_
55 int numThreads = -1)
const = 0;
84 if(!checkNanInf(A, b))
86 return solveImpl(A, b, x, xIsGuess);
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for NumSolver type plugins.
Definition gmNumSolver.h:36
virtual const char * pluginCategory() const
Returns the plugin category.
Definition gmNumSolver.h:42
virtual QString quickDescription() const =0
Returns a quick description of the linear solver to be used on the FEM report.
virtual int trackItemId() const
If the solver creates a ProgressStatsItem to track execution time, returns the item id....
Definition gmNumSolver.h:95
bool _checkNanInf
Should we check for NaN or Inf values in the vectors before solving the system?
Definition gmNumSolver.h:106
virtual bool setSolverTolerance(double tol)=0
Updates the desired tolerance before a call to solve(). Returns false if not supported by the solver.
bool solve(GmSolverMatrix *A, const GmVector &b, GmVector &x, bool xIsGuess=false) const
Solves the linear system Ax = b, filling the vector x with the calculated result.
Definition gmNumSolver.h:82
virtual GmSolverMatrix * newMatrix(int nlin, int ncol, const GmSolverMatrix *sharedLayout, int numThreads=-1) const =0
Creates and returns a new matrix with size nlin x ncol, of the appropriate type for use in a later ca...
virtual bool solveImpl(GmSolverMatrix *A, const GmVector &b, GmVector &x, bool xIsGuess) const =0
Actual implementation of the solve function. Should be implemented by derived classes.
A proxy class that can wrap and behave like a GmNumSolver object, adding the possibility for printing...
Definition gmNumSolverPrinter.h:36
Base interface class for all object plugins.
Definition gmPluginObject.h:37
virtual void printParameters(const GmLogCategory &logger)=0
Asks the object to print all of its parameters using the provided logger.
Definition gmPluginObject.cpp:62
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
Base interface class for Solver Matrix objects.
Definition gmSolverMatrix.h:100
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of macros for standard plugin categories.
#define GM_PLUGIN_NUMSOLVER
Plugin implements numerical solvers.
Definition gmPluginCategory.h:30
Declaration of the GmPluginObject base class.
Declaration of the GmSolverMatrix interface classes.
Declaration of the GmVector class.
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition gmVector.h:34