Basic Geometry, Numerical Algorithms and Interfaces
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
RCIndexMap Class Reference

Detailed Description

Row/column index map.

This class contains index vectors which map node indices to row/column indices. Such a mapping is often needed in numerical algorithms where Dirichlet boundary conditions are associated with some nodes. Eliminating the corresponding indices using such an index map is one option to handle the boundary condition.

See Also

#include <rcindexmap.h>

Public Member Functions

 RCIndexMap ()
 undefined map
 RCIndexMap (uint n)
 default map for n nodes (all map to NotFound)
void identity (uint n, uint shift=0)
 identity map (no constraints)
void indexShift (size_t n)
 change row and column offset
uint indexShift () const
 access present index shift
force_inline uint rowOf (uint k) const
 access row of vertex k
force_inline uint colOf (uint k) const
 access column index for vertex k
uint maxRowIndex () const
 largest row indexed
uint maxColIndex () const
 largest column indexed
force_inline uint nfree () const
 number of free vertices
force_inline uint columnNode (uint j) const
 return index i of vertex associated with column j, colOf(i) == j
const Indices & rowmap () const
 direct access to map
Indices & rowmap ()
 direct access to map
const Indices & colmap () const
 direct access to map
Indices & colmap ()
 direct access to map
void assignRows (const Indices &inodes)
 assign from index set such that rowOf(inodes[i]) == i
void assignCols (const Indices &inodes)
 assign from index set such that colOf(inodes[i]) == i
template<class VectorType >
void xexpand (const VectorType &xcol, VectorType &xnodal) const
 use column index array to expand xcol to xnodal
void constrain (uint n, const Indices &inodes)
 build symmetric row and column map from set of constrained nodes
void expandSparsity (int ne, ConnectMap &spty) const
 expand a nodal sparsity pattern to full global equation sparsity

Protected Member Functions

void assignMap (const Indices &inodes, Indices &map)
 assign from index set such that map[inodes[i]] == i

Private Attributes

Indices m_rowmap
 maps global vertex indices to rows of a linear system
Indices m_colmap
 maps global vertex indices to columns of a linear system
Indices m_colnode
 "inverse" of column map: node associated to column
uint m_shift
 shift value to apply to row and column indices

The documentation for this class was generated from the following files: