From: schrage
The degrees of freedom are distributed on a triangulation using the function
@@ -53,6 +55,26 @@ cell, starting at the coarsest level, and numbers every degree of freedom that i
For non-multigrid algorithms it considers only active cells, i.e. cells
without children.
+Example: We show the include files, definitions +and function calls needed. Be sure to use them in their appropriate places. +This example creates a hypercube and distributes the degrees of freedom. +The finite elements used are bilinear. +
+
+
+#include <grid/tria.h>
+#include <grid/dof.h>
+#include <fe/fe_lib.lagrange.h>
+
+Triangulation<dim> tr;
+DoFHandler<dim> dof;
+FELinear<dim>
+
+tr.create_hypercube(-1,1);
+dof.distribute_dofs(fe);
+
+
For a number of solution algorithms this way of numbering is way below optimal.
@@ -68,6 +90,18 @@ Both algorithms require a good index to start with to achieve good results.
Whenever you know a good set of starting indices you might wish to use the
first way of calling renumber_dofs
,
in every other case the second way is more advisable.
+
+Example: We use the definitions from the
+first example given above. We renumber our
+degrees of freedom with the
+Cuthill_McKey
method.
+
+
+dof.renumber_dofs(Cuthill_McKey);
+
+
+