24#ifndef _GEMA_ELEMENT_DOF_H_
25#define _GEMA_ELEMENT_DOF_H_
40#define GM_MAX_DOF (8*sizeof(GmElementDofMap))
53 virtual int dof(
int columnIndex)
const = 0;
69 virtual int numDof()
const {
return _ndof; }
72 int numNodes()
const {
return _nodeMaps.size(); }
80 int node(
int columnIndex)
const {
return _columnNodeList.at(columnIndex); }
88 virtual int dof(
int columnIndex)
const {
return _columnDofList.at(columnIndex); }
93 assert(node >= 0 && node < numNodes());
94 return _nodeMaps[node];
101 void setNodeDofUnsafe(
int node,
const QVector<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()];
An interface for a simple class returning the dof number associated to a local matrix column.
Definition gmElementDof.h:47
virtual int numDof() const =0
Returns the total number of dfs (matrix columns)
virtual int dof(int columnIndex) const =0
Given a 'matrix column' index, returns the associated dof.
A class to represent the degrees of freedom associated with each node of an element as seen by a phys...
Definition gmElementDof.h:61
QVector< int > _columnDofList
Vector indexed by 'matrix column' storing the column respective dof number. Size equal to numDof().
Definition gmElementDof.h:115
GmElementDofMap nodeDofMap(int node) const
Returns the dof map for the requested element local node.
Definition gmElementDof.h:91
virtual int dof(int columnIndex) const
Given a 'matrix column' index, returns the associated dof.
Definition gmElementDof.h:88
QVector< int > _columnNodeList
Vector indexed by 'matrix column' storing the column respective node number. Size equal to numDof().
Definition gmElementDof.h:114
int node(int columnIndex) const
Given a 'matrix column' index, returns the associated node.
Definition gmElementDof.h:80
int _ndof
The total number of dof for this element type.
Definition gmElementDof.h:112
virtual int numDof() const
Returns the total number of dofs for this element.
Definition gmElementDof.h:69
int numNodes() const
Returns the number of nodes in the element (which can contain ghost nodes)
Definition gmElementDof.h:72
QVector< GmElementDofMap > _nodeMaps
Vector storing the dof map for each element node.
Definition gmElementDof.h:113
A class to represent the degrees of freedom associated with the set of matrix columns,...
Definition gmElementDof.h:133
void setDofList(const QVector< int > &dofList)
Sets the list with dof numbers associated with each node.
Definition gmElementDof.h:142
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
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
GmMatrixDof()
Default connstructor.
Definition gmElementDof.h:136
virtual int numDof() const
Returns the total number of dofs (the number of matrix columns)
Definition gmElementDof.h:148
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 clear()
Clears the information stored in the object.
Definition gmElementDof.h:139
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.
GmCellType
Mesh Cell types. Don't change type orders or add types without reading comments below.
Definition gmCellType.h:31
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
quint64 GmElementDofMap
An integer type representing the degrees of freedom associated to an element node....
Definition gmElementDof.h:35