GooseFEM 1.4.1.dev2+g78f16df
|
Renumber indices to lowest possible index. More...
#include <GooseFEM/Mesh.h>
Public Member Functions | |
template<class T > | |
Renumber (const T &dofs) | |
template<class T > | |
T | apply (const T &list) const |
Apply renumbering to other set. | |
const array_type::tensor< size_t, 1 > & | index () const |
Get the list needed to renumber, e.g.: | |
Renumber indices to lowest possible index.
For example:
\( \begin{bmatrix} 0 & 1 \\ 5 & 4 \end{bmatrix} \)
is renumbered to
\( \begin{bmatrix} 0 & 1 \\ 3 & 2 \end{bmatrix} \)
Or, in pseudo-code, the result of this function is that:
dofs = renumber(dofs) sort(unique(dofs[:])) == range(max(dofs+1))
|
inline |