FemProcess
The GeMA Fem Process Plugin
Loading...
Searching...
No Matches
GmpFemPhysicsCommonMaterial Class Referenceabstract

A class that implements a common behaviour for physics materials. More...

#include <gmpFemPhysicsCommonMaterial.h>

Collaboration diagram for GmpFemPhysicsCommonMaterial:

Public Member Functions

 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 handle multiple types.
 
virtual ~GmpFemPhysicsCommonMaterial ()
 Virtual destructor.
 
int typeIndex () const
 Returns the material type index.
 
QString typeName () const
 Returns the material type name.
 
const GmLogCategorylogger () const
 Returns the material logger.
 
virtual const QVariantMap * materialMetaDataMap ()=0
 Virtual function responsible for returning material associated properties.

 
virtual bool vectorPropertyValue (const GmElement *e, GmCellAccessor *propAcc, GmVector &data, const GmVector *coord, int ip) const
 Returns the vector values of material properties.
 
virtual bool checkLoadedData (const GmElement *e) const
 Additional checking function, called after all attributes and accessors from physicsMetaDataMap() have already been loaded and validated. Should be implemented in derived classes for conducting additional checks that can't be expressed by the options on the tables in physicsMetaDataMap().
 
virtual bool addStateItemsToGroup (GmStateDump *state, GmElementMesh *mesh, bool fixedHint, int groupId)
 Initialization method, called once, allowing the object to add material state items to the given group of the sate dump object.
 
GmValueAccessornodeAc () const
 Returns the accessor for retrieving node coordinates.
 
int nodeDim () const
 Returns the node dimension (number of node coordinates)
 
GmCellAccessorpropertyAc (int id) const
 Returns the accessor for the given cell property.
 
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 does not need to be evaluated for each Gauss point)
 
GmValueAccessornodeAttrAc (int id) const
 Returns the accessor for the given node attribute.
 
GmCellAccessorcellAttrAc (int id) const
 Returns the accessor for the given cell attribute.
 
GmGaussAccessorgaussAttrAc (int id) const
 Returns the accessor for the given Gauss attribute.
 
bool constModelEvalErrorWarnEnabled () const
 Is the warning on constitutive model evaluation errors enabled?
 
void setConstModelEvalErrorWarnEnabled (bool enabled)
 Turns on or of the warning returned by constModelEvalErrorWarnEnabled()
 

Protected Attributes

int _typeIndex
 The material type index, used for indexing into the materials vector inside the physics.
 
int _nodeDim
 Node dimension.
 
QString _typeName
 The material type name.
 
const GmLogCategory_logger
 The material logger.
 
bool _constModelEvalErrorWarnEnabled
 Flag set to false if the user disabled warnings due to errors when evaluating constitutive models.
 
QVector< GmCellAccessor * > _propertyAccessors
 List with property accessors.
 
QVector< bool > _constantProperties
 List with flags defining if the properties in _propertyAccessors can have functions or not.
 
QVector< GmValueAccessor * > _nodeAttrAccessors
 List with node attribute accessors.
 
QVector< GmCellAccessor * > _cellAttrAccessors
 List with cell attribute accessors.
 
QVector< GmGaussAccessor * > _gaussAttrAccessors
 List with Gauss attribute accessors.
 
GmValueAccessor_nodeAccessor
 An accessor for retrieving node coordinate values.
 
QVector< int > _savedGaussAccessorIds
 The list with gauss accessor ids that need to be saved on addStateItemsToGroup()
 

Friends

class GmpFemPhysicsCommon
 

Detailed Description

A class that implements a common behaviour for physics materials.

Member Function Documentation

◆ addStateItemsToGroup()

bool GmpFemPhysicsCommonMaterial::addStateItemsToGroup ( GmStateDump * state,
GmElementMesh * mesh,
bool fixedHint,
int groupId )
virtual

Initialization method, called once, allowing the object to add material state items to the given group of the sate dump object.

This function can be reimplemented on derived classes. By default, it adds to the group the set of accessors described by the "savedGaussAttributes" entry on the material metadata map, using the prefix defined by "savedGaussAttributesPrefix".

Should return false on error, using the state logger to explain it.

◆ checkLoadedData()

virtual bool GmpFemPhysicsCommonMaterial::checkLoadedData ( const GmElement * e) const
inlinevirtual

Additional checking function, called after all attributes and accessors from physicsMetaDataMap() have already been loaded and validated. Should be implemented in derived classes for conducting additional checks that can't be expressed by the options on the tables in physicsMetaDataMap().

TODO: The current implementation works by element, but the checks should really be done for the property lines...

◆ materialMetaDataMap()

virtual const QVariantMap * GmpFemPhysicsCommonMaterial::materialMetaDataMap ( )
pure virtual

Virtual function responsible for returning material associated properties.

Analog to GmFemPhysicsCommon::physicsMetaDataMap(), the map returned by this function will complement the map returned by the physics object. It should consist of a "properties" entry and optional nodeAttributes, cellAttributes and gaussAttributes entries, as described in the GmFemPhysicsCommon class documentation.

Returned properties/attributes required conditions can depend on attributes declared on the physics.

When building the map, please keep in mind that property ids (enums) are private for the material since their accessors are stored inside the material.

◆ vectorPropertyValue()

bool GmpFemPhysicsCommonMaterial::vectorPropertyValue ( const GmElement * e,
GmCellAccessor * propAcc,
GmVector & data,
const GmVector * coord,
int ip ) const
virtual

Returns the vector values of material properties.

Returns vector values of material properties.


The documentation for this class was generated from the following files: