![]() |
GemaCoreLib
The GeMA Core library
|
Auxiliar class used to store the definition of a state variable. More...
#include <gmStateVar.h>
Public Member Functions | |
GmStateVar (GmValueInfo *info) | |
Constructor. The state var takes ownership of the info object. | |
~GmStateVar () | |
Destructor. | |
const GmValueInfo * | info () const |
Returns the info object associated to this state variable. | |
GmValueInfo * | info () |
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. | |
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.
|
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