GemaCoreLib
The GeMA Core library
Public Member Functions | Private Attributes | List of all members
GmStateVar Class Reference

Auxiliar class used to store the definition of a state variable. More...

#include <gmStateVar.h>

Collaboration diagram for GmStateVar:
Collaboration graph
[legend]

Public Member Functions

 GmStateVar (GmValueInfo *info)
 Constructor. The state var takes ownership of the info object.
 
 ~GmStateVar ()
 Destructor.
 
const GmValueInfoinfo () const
 Returns the info object associated to this state variable.
 
GmValueInfoinfo ()
 Returns the info object associated to this state variable.
 
QString id () const
 Returns the state variable id.
 
QString description () const
 Returns the state variable description.
 
Unit unit () const
 Returns the unit in which values of the state variable are expressed.
 
int dim () const
 Returns the number of dimensions for the state var. More...
 
int isScalar () const
 Returns true if the state var is scalar. Notice that being a scalar cant be inferred by dim() == 1 since it's legal to have vectors with one value and 1x1 matrices.
 
int baseDof () const
 Returns the base degree of freedom associated to this state variable.
 
int groupId () const
 Returns the state variable group id.
 
QString groupName () const
 Returns the state variable group name.
 
void setBaseDof (int dof)
 Sets the base degree of freedom associated with this state variable.
 
void setGroupId (QString name, int groupId)
 Sets the state var group name and id.
 
void setGroupId (int groupId)
 Sets the state var group id. Should not be used by general code, only by the ModelData class.
 
void setGroupName (QString name)
 Sets the state var group name. Should be used only before the state var has been added to the model. Afterwards, use the GmModelData::setStateVarGroupName() function instead, since it will adjust the group id.
 

Private Attributes

GmValueInfo_info
 State var information.
 
int _dof
 The base degree of freedom (dof) number associated to this state variable.
 
int _groupId
 Group identifier allowing several state vars to be treated equally, for example, when applying calculation tolerances.
 
QString _groupName
 Group name.
 

Detailed Description

Auxiliar class used to store the definition of a state variable.

It also binds a state variable to a degree of freedom base number. This will be the dof number of the first dimension of this state variable. For vectorial values, subsequent dimensions have sequential dof numbers.

Member Function Documentation

◆ dim()

int GmStateVar::dim ( ) const
inline

Returns the number of dimensions for the state var.

This should be one for scalar values. For vectorial values, it should be the number of components in the vector


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