24 #ifndef _GEMA_PLUGIN_FEM_PHYSICS_COMMON_MATERIAL_H_ 25 #define _GEMA_PLUGIN_FEM_PHYSICS_COMMON_MATERIAL_H_ 53 _typeIndex = typeIndex;
81 virtual const QVariantMap* materialMetaDataMap() = 0;
95 assert(e); Q_UNUSED(e);
151 void registerMaterial(
int typeIndex,
QString typeName, MaterialObjCreator instanceFunction,
bool defaultMaterial =
false);
163 int typeIndex(
QString typeName)
const;
165 bool checkTypeMap()
const;
virtual bool checkLoadedData(const GmElement *e) const
Additional checking function, called after all attributes and accessors from physicsMetaDataMap() hav...
Definition: gmpFemPhysicsCommonMaterial.h:93
QString _typeName
The material type name.
Definition: gmpFemPhysicsCommonMaterial.h:127
A class that implements several common functions required by GmpFemPhysics.
Definition: gmpFemPhysicsCommon.h:40
int nodeDim() const
Returns the node dimension (number of node coordinates)
Definition: gmpFemPhysicsCommonMaterial.h:106
GmGaussAccessor * gaussAttrAc(int id) const
Returns the accessor for the given Gauss attribute.
Definition: gmpFemPhysicsCommonMaterial.h:120
QVector< bool > _constantProperties
List with flags defining if the properties in _propertyAccessors can have functions or not.
Definition: gmpFemPhysicsCommonMaterial.h:131
GmValueAccessor * nodeAc() const
Returns the accessor for retrieving node coordinates.
Definition: gmpFemPhysicsCommonMaterial.h:103
int _typeIndex
The material type index, used for indexing into the materials vector inside the physics.
Definition: gmpFemPhysicsCommonMaterial.h:125
QString _defTypeName
The default material name.
Definition: gmpFemPhysicsCommonMaterial.h:169
GmValueAccessor * _nodeAccessor
An accessor for retrieving node coordinate values.
Definition: gmpFemPhysicsCommonMaterial.h:134
A simple factory used to register material type names, their numeric indices and their instance funct...
Definition: gmpFemPhysicsCommonMaterial.h:145
QVector< GmCellAccessor * > _propertyAccessors
List with property accessors.
Definition: gmpFemPhysicsCommonMaterial.h:130
int _nodeDim
Node dimension.
Definition: gmpFemPhysicsCommonMaterial.h:126
GmValueAccessor * nodeAttrAc(int id) const
Returns the accessor for the given node attribute.
Definition: gmpFemPhysicsCommonMaterial.h:117
const GmLogCategory & logger() const
Returns the material logger.
Definition: gmpFemPhysicsCommonMaterial.h:66
QString defaultMaterialType() const
Returns the name of the default material type.
Definition: gmpFemPhysicsCommonMaterial.h:161
QVector< GmGaussAccessor * > _gaussAttrAccessors
List with Gauss attribute accessors.
Definition: gmpFemPhysicsCommonMaterial.h:133
QVector< int > _savedGaussAccessorIds
The list with gauss accessor ids that need to be saved on addStateItemsToGroup()
Definition: gmpFemPhysicsCommonMaterial.h:135
const GmLogCategory & _logger
The material logger.
Definition: gmpFemPhysicsCommonMaterial.h:128
bool constantProperty(int id) const
Returns true if the given cell property is not a function (so its value is unique for an element and ...
Definition: gmpFemPhysicsCommonMaterial.h:114
QMap< QString, QPair< int, MaterialObjCreator > > _factoryMap
The map associating material names with their instance functions / index numbers.
Definition: gmpFemPhysicsCommonMaterial.h:168
int typeIndex() const
Returns the material type index.
Definition: gmpFemPhysicsCommonMaterial.h:60
int numMaterialTypes() const
Returns the number of materials registered in the factory. Equal to the greatest index number + 1 if ...
Definition: gmpFemPhysicsCommonMaterial.h:158
GmpFemPhysicsCommonMaterial(int typeIndex, QString typeName, const GmLogCategory &logger)
Common material constructor. Receives its type name and index in order for a class to be able to hand...
Definition: gmpFemPhysicsCommonMaterial.h:50
QString typeName() const
Returns the material type name.
Definition: gmpFemPhysicsCommonMaterial.h:63
A class that implements a common behaviour for physics materials.
Definition: gmpFemPhysicsCommonMaterial.h:44
GmCellAccessor * propertyAc(int id) const
Returns the accessor for the given cell property.
Definition: gmpFemPhysicsCommonMaterial.h:109
Declaration of usefull configuration definitions for the plugin library.
QVector< GmValueAccessor * > _nodeAttrAccessors
List with node attribute accessors.
Definition: gmpFemPhysicsCommonMaterial.h:132