From 59151968f7cad88f49b4ab8b948a4f652c87a745 Mon Sep 17 00:00:00 2001 From: schrage Date: Wed, 28 Apr 1999 14:00:48 +0000 Subject: [PATCH] First check-in git-svn-id: https://svn.dealii.org/trunk@1217 0785d39b-7218-0410-832d-ea1e28bc413d --- .../tutorial/chapter-1.elements/boundary.html | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 deal.II/doc/tutorial/chapter-1.elements/boundary.html diff --git a/deal.II/doc/tutorial/chapter-1.elements/boundary.html b/deal.II/doc/tutorial/chapter-1.elements/boundary.html new file mode 100644 index 0000000000..9d19bc392f --- /dev/null +++ b/deal.II/doc/tutorial/chapter-1.elements/boundary.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + +

Boundary Conditions

+ +

Setting boundary conditions

+ +

+There are two deal.II functions relevant for us at the moment: +

+
+
+void VectorTools::interpolate_boundary_values(...)
+
+
+

+which does exactly what it says. This function accepts a list of pairs +of boundary indicators and the according functions and returns a list of +pairs of degrees of freedom numbers and values denoting the respective +Dirichlet boundary values. +

+

+This output is used by +

+
+
+void MatrixTools::apply_boundary_values(...)
+
+
+

+that inserts the proper boundary conditions into the system of equations. +

+ +

+Example: We insert Dirichlet boundary conditions into +a system of equations of the form Au=f. The vectors u and +f and the matrix A have already been initialized, likewise +the handler for the degrees of freedom dof and the corresponding finite +element fe. +

+

+map<int,double> boundary_values;
+DoFHandler<2>::FunctionMap dirichlet_bc;
+BoundaryFct bfct;
+dirichlet_bc[0]=&bfct;
+VectorTools<2>::interpolate_boundary_values(dof,dirichlet_bc,fe,boundary,boundary_values);
+u.reinit(f);
+MatrixTools<2>::apply_boundary_values(boundary_values,A,u,f);  
+
+

+First, we need a few definitions: +

+ +

+This may seem a bit confusing. What actually happens is the following: +

+
    +
  1. interpolate_boundary_values takes the boundary functions +bfct, its relation to boundaries dirichlet_bc and +the triangulation dof, fe and returns a +mapping boundary_values that maps values instead of functions +to our boundaries. The function looks at all the boundaries. All we +ever need to do is specify the initial triangulation. +
  2. +
  3. apply_boundary_values subsequently takes that mapping and +our system of equations Au=f and inserts the boundary values into +the system of equations which can then be solved. +
  4. +
+ + + +
+ + + + + + + +
+
+Jan Schrage
+

+Last modified: $Date$ +

+ + -- 2.39.5