Reorder (DOF) indices such to the lowest possible indices, such that some items are at the beginning or the end. For example:
.. math::
\mathrm{dofs} =
\begin{bmatrix}
0 & 1 \\
2 & 3 \\
4 & 5
\end{bmatrix}
with
.. math::
\mathrm{idx} =
\begin{bmatrix}
0 & 1
\end{bmatrix}
Implies that ``dofs`` is renumbered such that 0 becomes the one-before-last index (:math:`0 \rightarrow 4`), and the 1 becomes the last index (:math:`1 \rightarrow 5`). The remaining items are renumbered to the lowest index while keeping the same order. The result:
.. math::
\begin{bmatrix}
4 & 5 \\
0 & 1 \\
2 & 3
\end{bmatrix}
.. tip::
A generic interface using iterator is available if you do not which to use the default Eigen interface.
Return a sparse matrix which contains the element numbers (columns) that are connected to each node (rows).
.. warning::
One should not confuse the element ``0`` when this matrix is converted to a dense matrix. When this is done all the 'missing' items are filled in as zero, which does have a meaning here.
Regular mesh of linear quadrilaterals in two-dimensions. The element edges are all of the same size :math:`h` (by default equal to one), optional scaling can be applied afterwards. For example the mesh shown below that consists of 21 x 11 elements. In that image the element numbers are indicated with a color, and likewise for the boundary nodes.
.. image:: figures/MeshQuad4/Regular/example.svg
:width: 500px
:align: center
Methods:
.. code-block:: cpp
// A matrix with on each row a nodal coordinate:
// [ x , y ]
MatD = GooseFEM::Mesh::Quad4::Regular.coor();
// A matrix with the connectivity, with on each row to the nodes of each element