SuiteSparseSolver
The GeMA Suite Sparse Numeric Solver Plugin
Loading...
Searching...
No Matches
suiteSparseSolverFactory.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_SUITESPARSE_SOLVER_FACTORY_H_
25#define _GEMA_SUITESPARSE_SOLVER_FACTORY_H_
26
27#include <QObject>
28
30#include "cholmodSolver.h"
31#include "umfpackSolver.h"
32#include "spqrSolver.h"
33#include "paruSolver.h"
34#include "suiteSparseSolverVersion.h"
35
36
39{
41 Q_PLUGIN_METADATA(IID GmPluginObjectFactoryInterfaceIID)
43
44public:
47
50
51 // See comments on the base class method declaration
52 virtual GmPluginObject* instance(QString category, QString objType, GmSimulationData* simulation,
53 QString id, QString description)
54 {
55 assert(category == GM_PLUGIN_NUMSOLVER);
56
57 if(objType == "cholmod")
58 return new CholmodSolver(simulation, id, description, logger());
59 else if(objType == "umfpack")
60 return new UmfpackSolver(simulation, id, description, logger());
61 else if(objType == "spqr")
62 return new SpqrSolver(simulation, id, description, logger());
63 else if(objType == "paru")
64 return new ParuSolver(simulation, id, description, logger());
65 else
66 return NULL;
67 }
68
70 virtual const QMap<QString, QString>& versionInfo() const { return SuiteSparseSolverVersionInfo(); }
71
73 virtual const QStringList& depVersionInfo() const { return SuiteSparseSolverRevisionDependencies(); }
74};
75
76#endif
77
Declaration of the CholmodSolver class.
A class for creating a GeMA solver based on the CHOLMOD solver from the SuiteSparse library.
Definition cholmodSolver.h:45
const GmLogCategory & logger()
A class for creating a GeMA solver based on the ParU solver from the SuiteSparse library.
Definition paruSolver.h:33
A class for creating a GeMA solver based on the SPQR solver from the SuiteSparse library.
Definition spqrSolver.h:31
Implementation of the SuiteSparseSolver factory plugin.
Definition suiteSparseSolverFactory.h:39
virtual ~SuiteSparseSolverFactory()
Destructor.
Definition suiteSparseSolverFactory.h:49
virtual const QMap< QString, QString > & versionInfo() const
Retuns version information for the plugin. See comments on the base class.
Definition suiteSparseSolverFactory.h:70
SuiteSparseSolverFactory()
Default constructor.
Definition suiteSparseSolverFactory.h:46
virtual const QStringList & depVersionInfo() const
Retuns dependency version information for the plugin. See comments on the base class.
Definition suiteSparseSolverFactory.h:73
A class for creating a GeMA solver based on the UMFPACK solver from the SuiteSparse library.
Definition umfpackSolver.h:33
#define GmPluginObjectFactoryInterfaceIID
Declaration of the ParuSolver class.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
Declaration of the SpqrSolver class.
Declaration of the UmfpackSolver class.