From: schrage Date: Fri, 19 Feb 1999 17:27:51 +0000 (+0000) Subject: Fixed HTML errors. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a488bd99960440a33cc4f9da5934b3d6b6fe47d;p=dealii-svn.git Fixed HTML errors. git-svn-id: https://svn.dealii.org/trunk@853 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/tutorial/chapter-3.laplace/assemble.html b/deal.II/doc/tutorial/chapter-3.laplace/assemble.html index 3433378160..31abf12950 100644 --- a/deal.II/doc/tutorial/chapter-3.laplace/assemble.html +++ b/deal.II/doc/tutorial/chapter-3.laplace/assemble.html @@ -12,10 +12,11 @@

Assembling the problem

What's to be done

+

In order to assemble the matrices we basically need to: +

    -
  1. Generate the matrices, i.e. call the DEAL functions that reserve -storage space for us. +
  2. Generate the matrices, i.e. call the DEAL functions that reserve storage space for us.
  3. Calculate the finite element trial functions @@ -39,12 +40,12 @@ appropriate DEAL functions
     
     void
    -Laplace::assemble_primal(const Function<2>& exact, const Function<2>&)
    +Laplace::assemble_primal(const Function<2>&exact, const Function<2>&)
     {
     
     
    -

    Generating the matrix structures

    +

    Generating the matrix structures

    First we generate an n times n square matrix where n is the number @@ -78,16 +79,16 @@ The problem is of the form Au=f: -

    Calculatinginite element trial functions

    +

    Calculatinginite element trial functions

    The two lines below calculate trial functions for the finite elements and for their faces using Gaussian quadrature.

     
    -  FEValues<2> fevalues(fe_primal, qc_primal, UpdateFlags(update_gradients |
    +  FEValues<2> fevalues(fe_primal, qc_primal, UpdateFlags(update_gradients |
     						   update_JxW_values));
    -  FEFaceValues<2> ffvalues(fe_primal, qf_primal,
    +  FEFaceValues<2> ffvalues(fe_primal, qf_primal,
     			   UpdateFlags(update_JxW_values | update_q_points));
     
     
    @@ -95,6 +96,7 @@ for their faces using Gaussian quadrature.

    Integrating the problem

    Integration is done locally. Therefore we need appropriate definitions for +

    • an index vector that will allow us to reassemble the global matrix later on @@ -102,10 +104,10 @@ an index vector that will allow us to reassemble the global matrix later on
    • a vector of doubles with the dimension of the total number of degrees of freedom
    • and a square matrix of doubles with the same dimension
    -

    +
     
    -  vector indices(fe_primal.total_dofs);
    +  vector<int> indices(fe_primal.total_dofs);
       dVector elvec(fe_primal.total_dofs);
       
       dFMatrix elmat(fe_primal.total_dofs);
    @@ -117,7 +119,7 @@ discretized Laplace operator. qc_primal is a Gaussian quadrature.
     

     
    -  for (DoFHandler<2>::active_cell_iterator c = dof_primal.begin_active()
    +  for (DoFHandler<2>::active_cell_iterator c = dof_primal.begin_active()
     					; c != dof_primal.end() ; ++c)
       {
         fevalues.reinit(c, stb);
    @@ -125,15 +127,15 @@ discretized Laplace operator. qc_primal is a Gaussian quadrature.
         elvec.clear();
         c->get_dof_indices(indices);
         
    -    for (unsigned k=0;k dv = fevalues.shape_grad(i,k);
    +	const Point<2> dv = fevalues.shape_grad(i,k);
     	
    -	for (unsigned j=0;j du = fevalues.shape_grad(j,k);
    +	  const Point<2> du = fevalues.shape_grad(j,k);
     	  
     	  elmat(i,j) += fevalues.JxW(k)
     			* du * dv
    @@ -149,45 +151,53 @@ discretized Laplace operator. qc_primal is a Gaussian quadrature.
     
     

    There are two DEAL functions relevant for us at the moment: +

     
     static_void interpolate_boundary_values(...)
     
     
    +

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

    This output is used by +

     
     static void apply_boundary_values(...)
     
     
    +

    that inserts the proper boundary conditions into the equation system:

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

    First, we need a few definitions: +

    • boundary_values maps boundary values computed by interpolate_boundary_values to boundary indicators,i.e. to boundaries.
    • dirichlet_bc maps boundary functions, supplied by us, to boundary indicators. The boundary functions compute the boundary values.
    • -
    • bfkt is a function returning sin(x)*sin(y) +
    • bfkt is a function returning sin(x)*sin(y) , thereby supplying boundary values.
    +

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

    1. interpolate_boundary_values takes the boundary functions bfkt, its relation to boundaries dirichlet_bc and @@ -197,11 +207,11 @@ to our boundaries. The function looks at all the boundaries. All we ever need to do is specify the initial triangulation.
    2. apply_boundary_values subsequently takes that mapping and -our equation system Au=f and inserts the boundary values into +our equation system Au=f and inserts the boundary values into the equation system which can then be solved.
    -

    +

    diff --git a/deal.II/doc/tutorial/chapter-3.laplace/index.html b/deal.II/doc/tutorial/chapter-3.laplace/index.html index f977f4cff8..da40543860 100644 --- a/deal.II/doc/tutorial/chapter-3.laplace/index.html +++ b/deal.II/doc/tutorial/chapter-3.laplace/index.html @@ -73,8 +73,7 @@ and the boundary conditions are set

  4. Solving the problem -

    -where the problem is solved

    +where the problem is solved

@@ -85,9 +84,13 @@ where the problem is solved


Jan Schrage
-

Last modified: Mon 15 Feb 1999

+ + + + + diff --git a/deal.II/doc/tutorial/chapter-3.laplace/main.html b/deal.II/doc/tutorial/chapter-3.laplace/main.html index e6a65ccdd5..8093c61e65 100644 --- a/deal.II/doc/tutorial/chapter-3.laplace/main.html +++ b/deal.II/doc/tutorial/chapter-3.laplace/main.html @@ -72,8 +72,7 @@ Laplace problem:
 
-PureTransportSolution exact;
-Laplace lap(exact);
+Laplace lap;
 
 
@@ -100,7 +99,7 @@ and the right hand side of the equation is zero (as defined above). If the right hand side were not zero we would solve the Poisson equation instead.


-  lap.assemble_primal(exact, zero); 
+  lap.assemble_primal(boundary, zero); 
   lap.solve_primal();          
 
diff --git a/deal.II/doc/tutorial/chapter-3.laplace/solution.html b/deal.II/doc/tutorial/chapter-3.laplace/solution.html index 6be9cb3784..5437cd91a8 100644 --- a/deal.II/doc/tutorial/chapter-3.laplace/solution.html +++ b/deal.II/doc/tutorial/chapter-3.laplace/solution.html @@ -17,9 +17,7 @@


-

Jan Schrage
-

Last modified: Fri Feb 12, 1999 diff --git a/deal.II/doc/tutorial/chapter-3.laplace/triangulation.html b/deal.II/doc/tutorial/chapter-3.laplace/triangulation.html index 6c5d679907..7287c4b7f5 100644 --- a/deal.II/doc/tutorial/chapter-3.laplace/triangulation.html +++ b/deal.II/doc/tutorial/chapter-3.laplace/triangulation.html @@ -11,9 +11,11 @@

Generating a triangulation

+

The initial triangulation is generated by the constructor of the class Laplace. It is a hypercube with the coordinates along each axis ranging from -1 to 1. This first triangulation consists of only one finite element. +

 
 Laplace::Laplace(Function<2>& solution)		
@@ -21,20 +23,8 @@ Laplace::Laplace(Function<2>& solution)
   tr.create_hypercube(-1.,1.);
 
 
-

-Right afterwards an iterator for the cells is defined (in effect a pointer to the first cell -in this case) and all the cell's faces are numbered. -

-
-
-  Triangulation<2>::cell_iterator c = tr.begin();
-  for (unsigned int i=0;i::faces_per_cell;++i)
-  {
-    Triangulation<2>::face_iterator f = c->face(i);
-    f->set_boundary_indicator(i+1);
-  }
-
-
+ +

Afterwards all the degrees of freedom, i.e. all the cell vertices, are renumbered. This step is necessary whenever the triangulation has changed, e.g. after each refinement. @@ -52,9 +42,8 @@ This step is necessary whenever the triangulation has changed, e.g. after each r


-

+

Jan Schrage
-

Last modified: Fri Feb 12, 1999