24 #ifndef _GEMA_ELEMENT_DOF_H_ 25 #define _GEMA_ELEMENT_DOF_H_ 41 #define GM_MAX_DOF (8*sizeof(GmElementDofMap)) 51 virtual int numDof()
const = 0;
54 virtual int dof(
int columnIndex)
const = 0;
70 virtual int numDof()
const {
return _ndof; }
73 int numNodes()
const {
return _nodeMaps.size(); }
81 int node(
int columnIndex)
const {
return _columnNodeList.at(columnIndex); }
89 virtual int dof(
int columnIndex)
const {
return _columnDofList.at(columnIndex); }
94 assert(node >= 0 && node < numNodes());
95 return _nodeMaps[node];
102 void setNodeDof(
int node,
const QList<int>& dofList);
108 void init(
int numNodes,
const QList<int>& dofList);
139 void clear() { _dofList.clear(); _nodeList.clear(); _globalDofMap.clear(); }
145 void addNode(
int node) { _nodeList.append(node); }
148 virtual int numDof()
const {
return _nodeList.size() * _dofList.size(); }
153 int node(
int columnIndex)
const 155 assert(columnIndex >= 0 && columnIndex <
numDof());
156 return _nodeList[columnIndex / _dofList.size()];
162 virtual int dof(
int columnIndex)
const 164 assert(columnIndex >= 0 && columnIndex <
numDof());
165 return _dofList[columnIndex % _dofList.size()];
QVector< GmElementDofMap > _nodeMaps
Vector storing the dof map for each element node.
Definition: gmElementDof.h:113
void clear()
Clears the information stored in the object.
Definition: gmElementDof.h:139
int _ndof
The total number of dof for this element type.
Definition: gmElementDof.h:112
An interface for a simple class returning the dof number associated to a local matrix column.
Definition: gmElementDof.h:47
virtual int numDof() const
Returns the total number of dofs (the number of matrix columns)
Definition: gmElementDof.h:148
virtual int numDof() const
Returns the total number of dofs for this element.
Definition: gmElementDof.h:70
void addNode(int node)
Adds a new node to the matrix. Each node is associated with the dofs given by setDofList()
Definition: gmElementDof.h:145
QVector< int > & globalDofMap()
Returns the global map used to translate local column indices into global dof numbers (indices on a g...
Definition: gmElementDof.h:173
void setDofList(const QVector< int > &dofList)
Sets the list with dof numbers associated with each node.
Definition: gmElementDof.h:142
quint64 GmElementDofMap
An integer type representing the degrees of freedom associated to an element node....
Definition: gmElementDof.h:36
GmElementDofMap nodeDofMap(int node) const
Returns the dof map for the requested element local node.
Definition: gmElementDof.h:92
A class to represent the degrees of freedom associated with the set of matrix columns,...
Definition: gmElementDof.h:132
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
QVector< int > _columnNodeList
Vector indexed by 'matrix column' storing the column respective node number. Size equal to numDof().
Definition: gmElementDof.h:114
GmCellType
Mesh Cell types. Don't change type orders or add types without reading comments below.
Definition: gmCellType.h:30
int node(int columnIndex) const
Given a 'matrix column' index, returns the associated node.
Definition: gmElementDof.h:81
virtual int dof(int columnIndex) const
Given a 'matrix column' index, returns the associated dof.
Definition: gmElementDof.h:89
GmMatrixDof()
Default connstructor.
Definition: gmElementDof.h:136
int node(int columnIndex) const
Given a 'matrix column' index, returns the associated node. columnIndex must be a value less than num...
Definition: gmElementDof.h:153
Declaration of the GmCell class.
QVector< int > _columnDofList
Vector indexed by 'matrix column' storing the column respective dof number. Size equal to numDof().
Definition: gmElementDof.h:115
virtual int dof(int columnIndex) const
Given a 'matrix column' index, returns the associated dof. columnIndex must be a value less than numD...
Definition: gmElementDof.h:162
int numNodes() const
Returns the number of nodes in the element (which can contain ghost nodes)
Definition: gmElementDof.h:73
virtual int numDof() const =0
Returns the total number of dfs (matrix columns)
A class to represent the degrees of freedom associated with each node of an element as seen by a phys...
Definition: gmElementDof.h:61