68 assert(category == GM_PLUGIN_MESH || category == GM_PLUGIN_PHYSICS || category == GM_PLUGIN_PROCESS);
70 if(category == GM_PLUGIN_MESH)
77 else if(category == GM_PLUGIN_PROCESS)
84 else if (category == GM_PLUGIN_PHYSICS)
87 static GmpFemPhysicsCommonMaterialFactory matFactory;
88 if (matFactory.numMaterialTypes() == 0)
92 const QVariantMap& map = ourInfo->
attributes().value(
"constants").value<QVariantMap>().value(
"materialModels").value<QVariantMap>();
99 matFactory.registerMaterial(map.value(
"modifiedMohrCoulomb").toInt(),
"modifiedMohrCoulomb",
XfemMaterial::instance);
102 matFactory.registerMaterial(map.value(
"saturated").toInt(),
"saturated", GmpHydraulicMaterialSaturated::instance);
103 matFactory.registerMaterial(map.value(
"cubicLaw").toInt(),
"cubicLaw", GmpMaterialCubicLaw::instance);
109 assert(matFactory.checkTypeMap());
113 if (objType ==
"PlaneStrain")
115 return new GmpMechanic<XfemMechanic>(
"PlaneStrain", simulation,
id, description, &matFactory,
logger());
117 else if (objType ==
"PlaneStress")
119 return new GmpMechanic<XfemMechanic>(
"PlaneStress", simulation,
id, description, &matFactory,
logger());
121 else if (objType ==
"3D")
123 return new GmpMechanic<XfemMechanic>(
"3D", simulation,
id, description, &matFactory,
logger());
125 else if (objType ==
"HydroMechanic")
127 return new GmpMechanic<XfemHMCoupled>(
"HydroMechanic", simulation,
id, description, &matFactory,
logger());
129 else if (objType ==
"HydroMechanic3D")
131 return new GmpMechanic<XfemHMCoupled>(
"HydroMechanic3D", simulation,
id, description, &matFactory,
logger());
133 else if (objType ==
"embeddedPE")
135 return new GmpMechanic<XfemMechanicEmbeddedFracture>(
"embeddedPE", simulation,
id, description, &matFactory,
logger());
137 else if (objType ==
"embeddedPS")
139 return new GmpMechanic<XfemMechanicEmbeddedFracture>(
"embeddedPS", simulation,
id, description, &matFactory,
logger());
141 else if (objType ==
"embedded3D")
143 return new GmpMechanic<XfemMechanicEmbeddedFracture>(
"embedded3D", simulation,
id, description, &matFactory,
logger());
virtual const QMap< QString, QString > & versionInfo() const
Retuns version information for the plugin. See comments on the base class.
Definition xfemFactory.h:154
virtual const QStringList & depVersionInfo() const
Retuns dependency version information for the plugin. See comments on the base class.
Definition xfemFactory.h:157
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
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