HypreSolver
The GeMA Hypre Numeric Solver Plugin
Loading...
Searching...
No Matches
hypreSolverFactory.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_HYPRE_SOLVER_FACTORY_H_
25#define _GEMA_HYPRE_SOLVER_FACTORY_H_
26
27#include <QObject>
28
30#include "hypreSolver.h"
31#include "hypreSolverVersion.h"
32
33#include <HYPRE.h>
34
35
38{
40 Q_PLUGIN_METADATA(IID GmPluginObjectFactoryInterfaceIID)
42
43public:
49
54
55 // See comments on the base class method declaration
56 virtual GmPluginObject* instance(QString category, QString objType, GmSimulationData* simulation,
57 QString id, QString description)
58 {
59 assert(category == GM_PLUGIN_NUMSOLVER);
60
61 if(objType != "hypre")
62 return NULL;
63
64 return new HypreSolver(simulation, id, description, logger());
65 }
66
68 virtual const QMap<QString, QString>& versionInfo() const { return HypreSolverVersionInfo(); }
69
71 virtual const QStringList& depVersionInfo() const { return HypreSolverRevisionDependencies(); }
72};
73
74#endif
75
const GmLogCategory & logger()
Implementation of the HypreSolver factory plugin.
Definition hypreSolverFactory.h:38
virtual ~HypreSolverFactory()
Destructor.
Definition hypreSolverFactory.h:51
HypreSolverFactory()
Default constructor.
Definition hypreSolverFactory.h:45
virtual const QMap< QString, QString > & versionInfo() const
Retuns version information for the plugin. See comments on the base class.
Definition hypreSolverFactory.h:68
virtual const QStringList & depVersionInfo() const
Retuns dependency version information for the plugin. See comments on the base class.
Definition hypreSolverFactory.h:71
A class for creating a GeMA solver based on the HYPRE library.
Definition hypreSolver.h:67
static void libraryFinalize()
Closes the Hypre library on plugin destruction.
Definition hypreSolver.cpp:110
static void libraryInit(const GmLogCategory &logger)
Initializes the Hypre library on plugin loading.
Definition hypreSolver.cpp:92
#define GmPluginObjectFactoryInterfaceIID
Declaration of the Hypre classes.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT