ChemicalFemPhysics
The GeMA Standard Chemical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpChemicalFemPhysicsFactory.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_CHEMICALFEM_PHYSICS_FACTORY_H_
25#define _GEMA_CHEMICALFEM_PHYSICS_FACTORY_H_
26
27#include <QObject>
28
30
31#include "gmpFixedReaction.h"
32#include "gmpLinearReaction.h"
33#include "gmpIphreeqcReaction.h"
34#include "gmpIphreeqcBasaltReaction.h"
35#include "gmpIphreeqcProcess.h"
39#include "gmpChemicalReaction.h"
41
42#include "gmpChemicalVersion.h"
43#include <assert.h>
44
47{
49 Q_PLUGIN_METADATA(IID GmPluginObjectFactoryInterfaceIID)
51
52public:
55
56 // See comments on the base class method declaration
57 virtual GmPluginObject* instance(QString category, QString objType, GmSimulationData* simulation,
58 QString id, QString description)
59 {
60 assert(category == GM_PLUGIN_PHYSICS || category == GM_PLUGIN_PROCESS);
61
62 if(category == GM_PLUGIN_PROCESS)
63 {
64 if(objType == "iphreeqc")
65 return new GmpIphreeqcProcess(simulation, id, description, logger());
66 else
67 return NULL;
68 }
69 else if(category == GM_PLUGIN_PHYSICS)
70 {
71 if (objType == "fixed")
72 return new GmpFixedReaction(simulation, id, description, logger());
73 else if (objType == "linear")
74 return new GmpLinearReaction(simulation, id, description, logger());
75 else if (objType == "iphreeqc")
76 return new GmpIphreeqcReaction(simulation, id, description, logger());
77 else if (objType == "iphreeqcBasalt")
78 return new GmpIphreeqcBasaltReaction(simulation, id, description, logger());
79 else if (objType == "neuralNetwork")
80 return new GmpNeuralNetworkReaction(simulation, id, description, logger());
81 else if (objType == "chemicalReaction")
82 return new GmpChemicalReaction(simulation, id, description, logger());
83 else if (objType == "interface")
84 return new GmpChemicalInterface(simulation, id, description, logger());
85 else if (objType == "pipeFixedReaction")
86 return new GmpPipeFixedReaction(simulation, id, description, logger());
87 else if (objType == "pipeNonLinearReaction")
88 return new GmpPipeNonLinearReaction(simulation, id, description, logger());
89 else
90 return NULL;
91 }
92
93 return NULL;
94 }
95
97 virtual const QMap<QString, QString>& versionInfo() const { return GmpChemicalFemPhysicsVersionInfo(); }
98
100 virtual const QStringList& depVersionInfo() const { return GmpChemicalFemPhysicsRevisionDependencies(); }
101};
102
103#endif
const GmLogCategory & logger()
Implementation of the ChemicalFemPhysics factory plugin.
Definition gmpChemicalFemPhysicsFactory.h:47
GmpChemicalFemPhysicsFactory()
Default constructor.
Definition gmpChemicalFemPhysicsFactory.h:54
virtual const QMap< QString, QString > & versionInfo() const
Retuns version information for the plugin. See comments on the base class.
Definition gmpChemicalFemPhysicsFactory.h:97
virtual const QStringList & depVersionInfo() const
Retuns dependency version information for the plugin. See comments on the base class.
Definition gmpChemicalFemPhysicsFactory.h:100
Basic class for the hydraulic interface element plugin object.
Definition gmpChemicalInterface.h:40
Extends the basic chemical physics transport equation by providing reaction rates based on the Iphree...
Definition gmpChemicalReaction.h:37
Extends the basic chemical physics transport equation by providing a fixed reaction rate.
Definition gmpFixedReaction.h:31
Extends the basic chemical physics transport equation by providing reaction rates based on the Iphree...
Definition gmpIphreeqcBasaltReaction.h:39
Basic class for the Iphreeqc Process plugin object.
Definition gmpIphreeqcProcess.h:31
Extends the basic chemical physics transport equation by providing reaction rates based on the Iphree...
Definition gmpIphreeqcReaction.h:39
Extends the basic chemical physics transport equation by providing multi-species, coupled linear reac...
Definition gmpLinearReaction.h:31
Extends the basic chemical physics transport equation by providing reaction rates based on the Iphree...
Definition gmpNeuralNetworkReaction.h:37
Extends the basic chemical physics transport equation by providing a fixed reaction rate.
Definition gmpPipeFixedReaction.h:32
Extends the basic chemical physics transport equation by providing multi-species, coupled linear reac...
Definition gmpPipeNonLinearReaction.h:32
#define GmPluginObjectFactoryInterfaceIID
Declaration of the GmpChemicalInterface classes.
Declaration of the GmpFixedReaction class.
Declaration of the GmpIphreeqcProcess class.
' Declaration of the GmpChemicalReaction class
Declaration of the GmpLinearReaction class.
' Declaration of the GmpNeuralNetworkReaction class
Declaration of the GmpPipeFixedReaction class.
Declaration of the GmpPipeNonLinearReaction class.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT