Mesh

Mesh::dofs

Get a sequential list of DOF-numbers for each vector-component of each node. For example for 3 nodes in 2 dimensions the output is

\begin{bmatrix}
  0 & 1 \\
  2 & 3 \\
  4 & 5
\end{bmatrix}

Mesh::Renumber

Renumber (DOF) indices to lowest possible indices. 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))

Tip

One can use the wrapper function “GooseFEM::reorder” or the class “Mesh::Reorder” to get more advanced features.

Mesh::Reorder

Reorder (DOF) indices such to the lowest possible indices, such that some items are at the beginning or the end. For example:

\mathrm{dofs} =
\begin{bmatrix}
  0 & 1 \\
  2 & 3 \\
  4 & 5
\end{bmatrix}

with

\mathrm{idx} =
\begin{bmatrix}
  0 & 1
\end{bmatrix}

Implies that dofs is renumbered such that 0 becomes the one-before-last index (0 \rightarrow 4), and the 1 becomes the last index (1 \rightarrow 5). The remaining items are renumbered to the lowest index while keeping the same order. The result:

\begin{bmatrix}
  4 & 5 \\
  0 & 1 \\
  2 & 3
\end{bmatrix}

Tip

One can use the wrapper function “GooseFEM::reorder” or the class “Mesh::Reorder” to get more advanced features.

Mesh::coordination

Get the number of elements connected to each node.

Mesh::elem2node

Get the element numbers (columns) that are connected to each node (rows).