From: wolf Date: Mon, 29 Nov 1999 23:48:01 +0000 (+0000) Subject: Various more updates. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3964965af83fd0bb031ba724db3ea4dbd1bb5c4;p=dealii-svn.git Various more updates. git-svn-id: https://svn.dealii.org/trunk@1958 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/tutorial/chapter-1.elements/boundary.html b/deal.II/doc/tutorial/chapter-1.elements/boundary.html index abd69dfe62..21ba9640e8 100644 --- a/deal.II/doc/tutorial/chapter-1.elements/boundary.html +++ b/deal.II/doc/tutorial/chapter-1.elements/boundary.html @@ -30,8 +30,10 @@ 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 +which does exactly what it says. This function accepts a number +describing which part of the boundary we want to consider +and the according function which shall be interpolated on that portion +of the boundary. It returns a list of pairs of degrees of freedom numbers and values denoting the respective Dirichlet boundary values.

@@ -55,45 +57,44 @@ the handler for the degrees of freedom dof and the corresponding fi element fe.


+                      // this will hold the boundary value for
+                      // the degrees of freedom on the boundary
+                      // part with number '0'
 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.size());
-MatrixTools<2>::apply_boundary_values(boundary_values,A,u,f);  
+                      // and this is some user-defined function
+                      // describing the boundary values
+BoundaryFunction<dim> boundary_function;
+                      // interpolate the DoFs on boundary
+                      // portion '0':
+VectorTools<dim>::interpolate_boundary_values 
+               (dof_handler,
+                0, boundary_function, 
+                boundary_values);
+
+                      // set solution vector to the right size
+u.reinit(dof_handler.n_dofs());
+                      // we assume that the global matrix and
+                      // right hand side have already been
+                      // assembled.
+
+                      // now insert the boundary values into
+                      // the linear system of equations:
+MatrixTools<dim>::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 the index -of which is listed in dirichlet_bc (in this example, all -the boundaries with indicator 0). 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. -
+You may have several different parts of the boundary which are +identified by different boundary indicators. For example, this is +commonly the case if you have inflow and outflow boundaries, or if +your domain has inner boundaries, such as obstacles inside your +domain. You may then want to associate different boundary functions +with the different parts of the boundary, and you can do so by +multiply calling interpolate_boundary_values with +different boundary indicators (the '0' above) and +respective functions. Since the function does not clear the contents +of the map, you may use it for each of this successive calls and pass +only the final object to apply_boundary_values. diff --git a/deal.II/doc/tutorial/chapter-1.elements/matrix_generation.html b/deal.II/doc/tutorial/chapter-1.elements/matrix_generation.html index a5814d232c..d76fd45fd4 100644 --- a/deal.II/doc/tutorial/chapter-1.elements/matrix_generation.html +++ b/deal.II/doc/tutorial/chapter-1.elements/matrix_generation.html @@ -21,12 +21,12 @@

Different kinds of matrices

-There are several kinds of matrices we will deal with: +There are several kinds of matrices which we will deal with: