24 #ifndef _GEMA_XFEM_FACTORY_H_ 25 #define _GEMA_XFEM_FACTORY_H_ 29 #include <gmpFemPhysicsCommonMaterial.h> 31 #include <gmpMaterialModifMohrCoulomb.h> 32 #include <gmpMaterialDruckerPrager.h> 33 #include <gmpMaterialElastic.h> 36 #include <gmpMechanic.h> 37 #include <gmpHydraulic.h> 38 #include <gmpHydraulicFlow.h> 39 #include <gmpMaterialSaturated.h> 40 #include <gmpMaterialInterfaceFlow.h> 52 #include "xfemVersion.h" 69 assert(category == GM_PLUGIN_MESH || category == GM_PLUGIN_PHYSICS || category == GM_PLUGIN_PROCESS);
71 if(category == GM_PLUGIN_MESH)
78 else if(category == GM_PLUGIN_PROCESS)
85 else if (category == GM_PLUGIN_PHYSICS)
88 static GmpFemPhysicsCommonMaterialFactory matFactory;
89 if (matFactory.numMaterialTypes() == 0)
93 const QVariantMap& map = ourInfo->
attributes().value(
"constants").value<QVariantMap>().value(
"materialModels").value<QVariantMap>();
100 matFactory.registerMaterial(map.value(
"modifiedMohrCoulomb").toInt(),
"modifiedMohrCoulomb",
XfemMaterial::instance);
103 matFactory.registerMaterial(map.value(
"saturated").toInt(),
"saturated", GmpHydraulicMaterialSaturated::instance);
104 matFactory.registerMaterial(map.value(
"interfaceFlow").toInt(),
"interfaceFlow", GmpMaterialInterfaceFlow::instance);
110 assert(matFactory.checkTypeMap());
114 if (objType ==
"PlaneStrain")
116 return new GmpMechanic<XfemMechanic>(
"PlaneStrain", simulation,
id, description, &matFactory,
logger());
118 else if (objType ==
"PlaneStress")
120 return new GmpMechanic<XfemMechanic>(
"PlaneStress", simulation,
id, description, &matFactory,
logger());
122 else if (objType ==
"3D")
124 return new GmpMechanic<XfemMechanic>(
"3D", simulation,
id, description, &matFactory,
logger());
126 else if (objType ==
"HydroMechanic")
128 return new GmpMechanic<XfemHMCoupled>(
"HydroMechanic", simulation,
id, description, &matFactory,
logger());
130 else if (objType ==
"HydroMechanic3D")
132 return new GmpMechanic<XfemHMCoupled>(
"HydroMechanic3D", simulation,
id, description, &matFactory,
logger());
134 else if (objType ==
"embeddedPE")
136 return new GmpMechanic<XfemMechanicEmbeddedFracture>(
"embeddedPE", simulation,
id, description, &matFactory,
logger());
138 else if (objType ==
"embeddedPS")
140 return new GmpMechanic<XfemMechanicEmbeddedFracture>(
"embeddedPS", simulation,
id, description, &matFactory,
logger());
142 else if (objType ==
"embedded3D")
144 return new GmpMechanic<XfemMechanicEmbeddedFracture>(
"embedded3D", simulation,
id, description, &matFactory,
logger());
146 else if (objType ==
"embeddedHydro")
148 return new GmpHydraulicFlow<XfemHydraulicEmbeddedFracture>(
"embeddedHydro", simulation,
id, description, &matFactory,
logger());
Implementation of the Xfem factory plugin.
Definition: xfemFactory.h:55
const GmLogCategory & logger()
const QVariantMap & attributes() const
Declaration of the xfemMechanic classes.
GmPluginInfo * pluginInfo(QString pluginName) const
Declaration of the xfemMaterial classes.
Declaration of the hydroMechanical coupled xfem class.
Declaration of the XfemMesh class.
GmPluginLoader * loader() const
virtual const QStringList & versionInfo() const
Retuns version information for the plugin. See comments on the base class.
Definition: xfemFactory.h:159
Basic class for the XFEM Process plugin object.
Definition: xfemProcess.h:36
Declaration of the xfemHydraulicEmbedded classes.
XfemFactory()
Default constructor.
Definition: xfemFactory.h:63
virtual const QStringList & depVersionInfo() const
Retuns dependency version information for the plugin. See comments on the base class.
Definition: xfemFactory.h:162
Declaration of the XfemProcess class.
static GmpFemPhysicsCommonMaterial * instance(GmSimulationData *simulation, int typeIndex, QString typeName, const GmLogCategory &logger)
A "factory" function used to register the material with the physics material factory.
Definition: xfemHydroMechanicalMaterial.h:58
#define GmPluginObjectFactoryInterfaceIID
Declaration of the xfemHydroMechanicalMaterial classes.
static GmpFemPhysicsCommonMaterial * instance(GmSimulationData *simulation, int typeIndex, QString typeName, const GmLogCategory &logger)
A "factory" function used to register the material with the physics material factory.
Definition: xfemMaterial.h:53
Implementation of the XfemMesh interface based on the standard GeMA mesh plugin.
Definition: xfemMesh.h:214
Declaration of the xfemHydraulicEmbedded classes.