#include <DofMap.h>
Public Member Functions | |
DofMap (int nn=0, int maxnl=0) | |
int | GlobalDof (int nid, int localdof) const |
int | NumNodes () const |
int | NumDof () const |
void | Resize (int nn, int nldof=0) |
const iArray & | GlobalDofs (int nid) const |
void | SetScatterVector (const iArray &conn, const Array< Dof > &ldofs, iArray &sctr) const |
void | Gather (const iArray &conn, const Array< Dof > &ldofs, const nArray &d, nArray &de) const |
void | Scatter (const iArray &conn, const Array< Dof > &ldofs, const nMatrix &ke, DynamicCSRMatrix &K) const |
void | Scatter (const iArray &conn, const Dof &ldofs, const nMatrix &ke, DynamicCSRMatrix &K) const |
void | Scatter (const iArray &conn, const Array< Dof > &ldofs, const nArray &fe, nArray &f) const |
bool | ActiveDof (int nid, int localdof) const |
void | AddNodalDof (int nid, int localdof) |
void | RenumberGlobalDofs () |
This class maps a nodal (local) dof and global node id to a global equation number (or global dof) to be used in a system solve.
Definition at line 31 of file DofMap.h.
basso::DofMap::DofMap | ( | int | nn = 0 , |
|
int | maxnl = 0 | |||
) |
Constructs the DofMap
nn | The number of nodes in the system | |
maxnl | The number of maximum number of dofs assigned to each node space will be allocated in the dof map for maxnl dofs for each node. This can be changed later. |
Definition at line 267 of file DofMap.h.
References NumNodes().
int basso::DofMap::GlobalDof | ( | int | nid, | |
int | localdof | |||
) | const [inline] |
Returns the global dof number (gdof) from a global node id number and a local dof id number
nid | global node id number | |
localdof | local node dof id THIS DOES NO ERROR CHECKING to keep it fast but beware. Also, it will return negative global dof ids if the node is inactive. |
Definition at line 49 of file DofMap.h.
Referenced by basso::DirichletBC::AddFixedDofs(), basso::PointLoadBC::ContributeForce(), and basso::operator<<().
int basso::DofMap::NumNodes | ( | ) | const [inline] |
Returns the number of nodes in the dof map
Definition at line 52 of file DofMap.h.
Referenced by ActiveDof(), DofMap(), and basso::operator<<().
int basso::DofMap::NumDof | ( | ) | const [inline] |
Returns the number of active dofs in the map
Definition at line 55 of file DofMap.h.
Referenced by basso::operator<<().
void basso::DofMap::Resize | ( | int | nn, | |
int | nldof = 0 | |||
) |
const iArray& basso::DofMap::GlobalDofs | ( | int | nid | ) | const [inline] |
Returns the global dof ids for a node.
nid | inode id THIS DOES NO ERROR CHECKING to keep it fast but beware. Also, it will return negative global dof ids if the node is inactive. |
Definition at line 65 of file DofMap.h.
Referenced by basso::operator<<().
void basso::DofMap::SetScatterVector | ( | const iArray & | conn, | |
const Array< Dof > & | ldofs, | |||
iArray & | sctr | |||
) | const |
Sets the global dof ids in a scatter vector
conn | array of the element node ids | |
ldofs | an array of the local dofs ids | |
sctr | on return contains the global dofs for each local dof at each node in conn The form of the sctr vector is as follows [ (node1,ldof1), (node1,ldof2), ..., (node2,ldof1), (node2,ldof2), ... ] |
void basso::DofMap::Gather | ( | const iArray & | conn, | |
const Array< Dof > & | ldofs, | |||
const nArray & | d, | |||
nArray & | de | |||
) | const |
Gathers a from a global vector into a local vector.
conn | array of the element node ids | |
ldofs | an array of the local dofs ids | |
de | the local vector | |
d | the global vector The form of the scattering of ke is as follows [ (node1,ldof1), (node1,ldof2), ..., (node2,ldof1), (node2,ldof2), ... ] |
Definition at line 163 of file DofMap.h.
Referenced by basso::StructuralFormulation::NodalAvgStress().
void basso::DofMap::Scatter | ( | const iArray & | conn, | |
const Array< Dof > & | ldofs, | |||
const nMatrix & | ke, | |||
DynamicCSRMatrix & | K | |||
) | const |
Scatters a square local matrix into a global matrix.
conn | array of the element node ids | |
ldofs | an array of the local dofs ids | |
ke | the local matrix | |
K | the global matrix The form of the scattering of ke is as follows [ (node1,ldof1), (node1,ldof2), ..., (node2,ldof1), (node2,ldof2), ... ] |
Definition at line 203 of file DofMap.h.
Referenced by basso::TractionBC::ContributeForce(), basso::Formulation::ContributeMassMatrix(), and basso::Formulation::ContributeStiffnessMatrix().
void basso::DofMap::Scatter | ( | const iArray & | conn, | |
const Dof & | ldofs, | |||
const nMatrix & | ke, | |||
DynamicCSRMatrix & | K | |||
) | const |
Scatters a square local matrix into a global matrix
conn | array of the element node ids | |
ldof | the local dofs id | |
ke | the local matrix | |
K | the global matrix The form of the scattering of ke is as follows [ (node1,ldof1), (node1,ldof2), ..., (node2,ldof1), (node2,ldof2), ... ] |
void basso::DofMap::Scatter | ( | const iArray & | conn, | |
const Array< Dof > & | ldofs, | |||
const nArray & | fe, | |||
nArray & | f | |||
) | const |
Scatters a square local vector into a global vector
conn | array of the element node ids | |
ldofs | an array of the local dofs ids | |
fe | the local vector | |
f | the global vector The form of the scattering of fe is as follows [ (node1,ldof1), (node1,ldof2), ..., (node2,ldof1), (node2,ldof2), ... ] |
bool basso::DofMap::ActiveDof | ( | int | nid, | |
int | localdof | |||
) | const [inline] |
Returns whether the node dof is active
Definition at line 121 of file DofMap.h.
References NumNodes().
Referenced by AddNodalDof(), basso::operator<<(), and RenumberGlobalDofs().
void basso::DofMap::AddNodalDof | ( | int | nid, | |
int | localdof | |||
) |
Activates a global equation number (gdof) from a global node id number and a local dof id number
nid | global node id number | |
localdof | local node dof id |
Definition at line 286 of file DofMap.h.
References ActiveDof().
Referenced by basso::Formulation::ActivateDofs().
void basso::DofMap::RenumberGlobalDofs | ( | ) |
Renumbers the equation numbers to keep all the nodes dofs together
Definition at line 277 of file DofMap.h.
References ActiveDof().
Referenced by basso::Formulation::ActivateDofs().