GemaCoreLib
The GeMA Core library
gmNumSolver.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
24 #ifndef _GEMA_NUMSOLVER_H_
25 #define _GEMA_NUMSOLVER_H_
26 
27 #include "gmPluginObject.h"
28 #include "gmPluginCategory.h"
29 #include "gmVector.h"
30 
31 class GmSolverMatrix;
32 
35 {
36 public:
37  GmNumSolver(GmSimulationData* simulation, QString id, QString description, const GmLogCategory& logger);
38  virtual ~GmNumSolver();
39 
40  // Comments on the base class
41  virtual const char* pluginCategory() const { return GM_PLUGIN_NUMSOLVER; }
42 
53  virtual GmSolverMatrix* newMatrix(int nlin, int ncol, const GmSolverMatrix* sharedLayout,
54  int numThreads = -1) const = 0;
55 
74  virtual bool solve(GmSolverMatrix* A, const GmVector& b, GmVector& x, bool xIsGuess = false) const = 0;
75 
76  virtual void printParameters(const GmLogCategory& logger);
77 };
78 
79 #endif
80 
Declaration of the GmPluginObject base class.
Base interface class for Solver Matrix objects.
Definition: gmSolverMatrix.h:97
#define GM_PLUGIN_NUMSOLVER
Plugin implements numerical solvers.
Definition: gmPluginCategory.h:30
Auxiliar class used to store the complete set of simulation data.
Definition: gmSimulationData.h:51
virtual void printParameters(const GmLogCategory &logger)=0
Asks the object to print all of its parameters using the provided logger.
Definition: gmPluginObject.cpp:62
Base interface class for NumSolver type plugins.
Definition: gmNumSolver.h:34
Declaration of macros for standard plugin categories.
Base interface class for all object plugins.
Definition: gmPluginObject.h:36
Declaration of the GmVector class.
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
Class representing a category with multiple logging levels.
Definition: gmLog.h:58
virtual const char * pluginCategory() const
Returns the plugin category.
Definition: gmNumSolver.h:41
arma::vec GmVector
The basic type for a GeMA vector object. Currently based on an Armadillo vector.
Definition: gmVector.h:34