GooseFEM 1.4.1.dev2+g78f16df
Loading...
Searching...
No Matches
GooseFEM::Mesh::Renumber Class Reference

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.:
 

Detailed Description

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))
Note
One can use the wrapper function renumber(). This class gives more advanced features.

Definition at line 114 of file Mesh.h.

Constructor & Destructor Documentation

◆ Renumber()

template<class T >
GooseFEM::Mesh::Renumber::Renumber ( const T & dofs)
inline
Parameters
dofsDOF-numbers.

Definition at line 122 of file Mesh.h.

Member Function Documentation

◆ apply()

template<class T >
T GooseFEM::Mesh::Renumber::apply ( const T & list) const
inline

Apply renumbering to other set.

Parameters
listList of (DOF-)numbers.
Returns
Renumbered list of (DOF-)numbers.

Definition at line 144 of file Mesh.h.

◆ index()

const array_type::tensor< size_t, 1 > & GooseFEM::Mesh::Renumber::index ( ) const
inline

Get the list needed to renumber, e.g.:

 dofs_renumbered(i, j) = index(dofs(i, j))
Returns
Renumber-index.

Definition at line 156 of file Mesh.h.


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