![]() |
GemaCoreLib
The GeMA Core library
|
A class to represent the degrees of freedom associated with the set of matrix columns, as seen by a physics object. More...
#include <gmElementDof.h>
Public Member Functions | |
GmMatrixDof () | |
Default connstructor. | |
void | clear () |
Clears the information stored in the object. | |
void | setDofList (const QVector< int > &dofList) |
Sets the list with dof numbers associated with each node. | |
void | addNode (int node) |
Adds a new node to the matrix. Each node is associated with the dofs given by setDofList() | |
virtual int | numDof () const |
Returns the total number of dofs (the number of matrix columns) | |
int | node (int columnIndex) const |
Given a 'matrix column' index, returns the associated node. columnIndex must be a value less than numDof(). | |
virtual int | dof (int columnIndex) const |
Given a 'matrix column' index, returns the associated dof. columnIndex must be a value less than numDof(). | |
QVector< int > & | globalDofMap () |
Returns the global map used to translate local column indices into global dof numbers (indices on a global matrix). See comments on the class documentation. This vector is intended for use by the assembler and NOT by physics. | |
Private Attributes | |
QVector< int > | _nodeList |
Vector indexed by 'matrix column' storing the column respective node number. Size equal to numDof(). | |
QVector< int > | _dofList |
Vector indexed by 'matrix column' storing the column respective dof number. Size equal to numDof(). | |
QVector< int > | _globalDofMap |
An auxiliar vector that can be used by external classes to store a global (local matrix to global matrix) mapping. | |
A class to represent the degrees of freedom associated with the set of matrix columns, as seen by a physics object.
Assumes that the matrix is organized "per node" and each node has the same list of dofs. Example: Nodes = {456, 213, 87 and 95}. Dofs per node = {1, 5}. Matrix organization = {456:1, 456:5, 213:1, 213:5, 87:1, 87:5, 95-:, 95:5} where in each x:y pair, x is the global mesh node index and y is the global dof number.
This object can also store space for a global map that translate local column indices into global dof numbers (indices on a global matrix). This vector is NOT controlled by the class. The MatrixDof object is only used as a convenient place to store it and clears it on a call to clear().