From f4ba77a8166369ee5147f76d08db3c5e9d2c88fa Mon Sep 17 00:00:00 2001 From: schrage Date: Thu, 8 Apr 1999 09:58:50 +0000 Subject: [PATCH] Added examples git-svn-id: https://svn.dealii.org/trunk@1090 0785d39b-7218-0410-832d-ea1e28bc413d --- .../doc/tutorial/chapter-1.elements/dofs.html | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/deal.II/doc/tutorial/chapter-1.elements/dofs.html b/deal.II/doc/tutorial/chapter-1.elements/dofs.html index 686643db98..5a6d22c1fc 100644 --- a/deal.II/doc/tutorial/chapter-1.elements/dofs.html +++ b/deal.II/doc/tutorial/chapter-1.elements/dofs.html @@ -42,6 +42,8 @@ construct a sparse matrix structure and renumber your degrees of freedom afterwards the structure will be invalid.

+ +

How to Distribute and Renumber Degrees of Freedom

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);
+
+
+
-- 2.39.5