]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed HTML errors.
authorschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 19 Feb 1999 17:27:51 +0000 (17:27 +0000)
committerschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 19 Feb 1999 17:27:51 +0000 (17:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@853 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/tutorial/chapter-3.laplace/assemble.html
deal.II/doc/tutorial/chapter-3.laplace/index.html
deal.II/doc/tutorial/chapter-3.laplace/main.html
deal.II/doc/tutorial/chapter-3.laplace/solution.html
deal.II/doc/tutorial/chapter-3.laplace/triangulation.html

index 3433378160aca49a769a4e38c1480bb2f9570591..31abf12950050223a20792d6d17225f5bbfdcbe5 100644 (file)
 <h1>Assembling the problem</h1>
 
 <h2>What's to be done</h2>
+<p>
 In order to assemble the matrices we basically need to:
+</p>
 <ol>
-<li><a href=#matrix">Generate the matrices</a>, i.e. call the <em>DEAL</em> functions that reserve 
-storage space for us.
+<li><a href="#matrix">Generate the matrices</a>, i.e. call the <em>DEAL</em> functions that reserve storage space for us.
 </li>
 <li>
 <a href="#calcfe">Calculate the finite element trial functions</a>
@@ -39,12 +40,12 @@ appropriate <em>DEAL</em> functions
 <pre>
 <code>
 void
-Laplace::assemble_primal(const Function<2>& exact, const Function<2>&)
+Laplace::assemble_primal(const Function&lt;2&gt;&amp;exact, const Function&lt;2&gt;&amp;)
 {
 </code>
 </pre>
 
-<h3><a name="matrix">Generating the matrix structures<a></h3>
+<h3><a name="matrix">Generating the matrix structures</a></h3>
 
 <p>
 First we generate an n times n square matrix where n is the number
@@ -78,16 +79,16 @@ The problem is of the form <tt>Au=f</tt>:
 </code>
 </pre>
 
-<h3><a name+"calcfe">Calculatinginite element trial functions</a></h3>
+<h3><a name="calcfe">Calculatinginite element trial functions</a></h3>
 <p>
 The two lines below calculate trial functions for the finite elements and
 for their faces using Gaussian quadrature.
 </p>
 <pre>
 <code>
-  FEValues<2> fevalues(fe_primal, qc_primal, UpdateFlags(update_gradients |
+  FEValues&lt;2&gt; fevalues(fe_primal, qc_primal, UpdateFlags(update_gradients |
                                                   update_JxW_values));
-  FEFaceValues<2> ffvalues(fe_primal, qf_primal,
+  FEFaceValues&lt;2&gt; ffvalues(fe_primal, qf_primal,
                           UpdateFlags(update_JxW_values | update_q_points));
 </code>
 </pre>
@@ -95,6 +96,7 @@ for their faces using Gaussian quadrature.
 <h3><a name="integrate">Integrating the problem</a></h3>
 <p>
 Integration is done locally. Therefore we need appropriate definitions for
+</p>
 <ul>
 <li>
 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
 <li>a vector of doubles with the dimension of the total number of degrees of freedom</li>
 <li>and a square matrix of doubles with the same dimension</li>
 </ul>
-</p>
+
 <pre>
 <code>
-  vector<int> indices(fe_primal.total_dofs);
+  vector&lt;int&gt; indices(fe_primal.total_dofs);
   dVector elvec(fe_primal.total_dofs);
   
   dFMatrix elmat(fe_primal.total_dofs);
@@ -117,7 +119,7 @@ discretized Laplace operator. <tt>qc_primal</tt> is a Gaussian quadrature.
 </p>
 <pre>
 <code>
-  for (DoFHandler<2>::active_cell_iterator c = dof_primal.begin_active()
+  for (DoFHandler&lt;2&gt;::active_cell_iterator c = dof_primal.begin_active()
                                        ; c != dof_primal.end() ; ++c)
   {
     fevalues.reinit(c, stb);
@@ -125,15 +127,15 @@ discretized Laplace operator. <tt>qc_primal</tt> is a Gaussian quadrature.
     elvec.clear();
     c->get_dof_indices(indices);
     
-    for (unsigned k=0;k<qc_primal.n_quadrature_points;++k)
+    for (unsigned k=0;k&lt;qc_primal.n_quadrature_points;++k)
     {
-      for (unsigned i=0;i<fe_primal.total_dofs;++i)
+      for (unsigned i=0;i&lt;fe_primal.total_dofs;++i)
       {
-       const Point<2> dv = fevalues.shape_grad(i,k);
+       const Point&lt;2&gt; dv = fevalues.shape_grad(i,k);
        
-       for (unsigned j=0;j<fe_primal.total_dofs;++j)
+       for (unsigned j=0;j&lt;fe_primal.total_dofs;++j)
        {
-         const Point<2> du = fevalues.shape_grad(j,k);
+         const Point&lt;2&gt; du = fevalues.shape_grad(j,k);
          
          elmat(i,j) += fevalues.JxW(k)
                        * du * dv
@@ -149,45 +151,53 @@ discretized Laplace operator. <tt>qc_primal</tt> is a Gaussian quadrature.
 
 <p>
 There are two <em>DEAL</em> functions relevant for us at the moment:
+</p>
 <pre>
 <code>
 static_void interpolate_boundary_values(...)
 </code>
 </pre>
+<p>
 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.
 </p>
 <p>
 This output is used by
+</p>
 <pre>
 <code>
 static void apply_boundary_values(...)
 </code>
 </pre>
+<p>
 that inserts the proper boundary conditions into the equation system:
 </p>
 <P>
 <pre><code>
-  map<int,double> boundary_values;
-  DoFHandler<2>::FunctionMap dirichlet_bc;
+  map&lt;int,double&gt; boundary_values;
+  DoFHandler&lt;2&gt;::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]=&amp;bfkt;
+  VectorTools&lt;2&gt;::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&lt;2&gt;::apply_boundary_values(boundary_values,A,u,f);  
 </code></pre>
+<p>
 First, we need a few definitions: 
+</p>
 <ul>
 <li>
 <code>boundary_values</code> maps boundary values computed by <code>interpolate_boundary_values</code> to boundary indicators,i.e. to boundaries.
 </li>
 <li><code>dirichlet_bc</code> maps boundary functions, supplied by us, to boundary indicators. The boundary functions compute the boundary values.
 </li>
-<li><code>bfkt</bfkt> is a function returning <code>sin(x)*sin(y)
+<li><code>bfkt</code> is a function returning <code>sin(x)*sin(y)
 </code>, thereby supplying boundary values.
 </ul>
+<p>
 This may seem a bit confusing. What actually happens is the following:
+</p>
 <ol>
 <li><code>interpolate_boundary_values</code> takes the boundary functions
 <code>bfkt</code>, its relation to boundaries <code>dirichlet_bc</code> and
@@ -197,11 +207,11 @@ to our boundaries. The function looks at <em>all</em> the boundaries. All we
 ever need to do is specify the initial triangulation.
 </li>
 <li><code>apply_boundary_values</code> subsequently takes that mapping and
-our equation system <code>Au=f</code> and inserts the boundary values into
+our equation system <tt>Au=f</tt> and inserts the boundary values into
 the equation system which can then be solved.
 </li>
 </ol>
-</p>
+
 
 <hr>
 <p>
index f977f4cff8053fa2949f9eda932aefd58f1a2b45..da405438607731bab8cf1e391c1097404fbbe281 100644 (file)
@@ -73,8 +73,7 @@ and the boundary conditions are set
 </li>
 <li>
 <strong><a href="solution.html">Solving the problem</a></strong>
-<p>
-where the problem is solved</p>
+where the problem is solved
 </li>
 </ol>
 <hr>
@@ -85,9 +84,13 @@ where the problem is solved</p>
 <hr>
 <address>
 <a href="mailto:schrage@gaia.iwr.uni-heidelberg.de">Jan Schrage</a></address>
-<!-- Created: Tue Jan  5 12:50:29 MET 1999 -->
 <p>
 Last modified: Mon 15 Feb 1999 
 </p>
 </body>
 </html>
+
+
+
+
+
index e6a65ccdd55621b7a69a0e9c630d5fe2be2b480d..8093c61e6524a88afe5d6dbc577546ee48aeb706 100644 (file)
@@ -72,8 +72,7 @@ Laplace problem:
 
 <pre>
 <code>
-PureTransportSolution exact;
-Laplace lap(exact);
+Laplace lap;
 </code>
 </pre>
 
@@ -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.
 </p>
 <pre><code>
-  lap.assemble_primal(exact, zero); 
+  lap.assemble_primal(boundary, zero); 
   lap.solve_primal();          
 </code></pre>
 
index 6be9cb37848f7a2266962c9780aa59d94aabceae..5437cd91a844e4b73dff7ab352aebb9520dabb98 100644 (file)
@@ -17,9 +17,7 @@
 </p>
   
 <hr>
-<p>
 <address><a href="mailto:schrage@gaia.iwr.uni-heidelberg.de">Jan Schrage</a></address>
-</p>
 
 <p>
 Last modified: Fri Feb 12, 1999
index 6c5d67990759f5b045487d46334acb58e9ca0ade..7287c4b7f5690966eaf034debc11dcc55cbfb936 100644 (file)
 <body>
 <h1>Generating a triangulation</h1>
 
+<p>
 The initial triangulation is generated by the constructor of the class <em>Laplace</em>.
 It is a hypercube with the coordinates along each axis ranging from -1 to 1. This first
 triangulation consists of only one finite element. 
+</p>
 <pre>
 <code>
 Laplace::Laplace(Function<2>& solution)                
@@ -21,20 +23,8 @@ Laplace::Laplace(Function<2>& solution)
   tr.create_hypercube(-1.,1.);
 </code>
 </pre>
-<p>
-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.
-</p>
-<pre>
-<code>
-  Triangulation<2>::cell_iterator c = tr.begin();
-  for (unsigned int i=0;i<GeometryInfo<2>::faces_per_cell;++i)
-  {
-    Triangulation<2>::face_iterator f = c->face(i);
-    f->set_boundary_indicator(i+1);
-  }
-</code>
-</pre>
+
+
 <p>
 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
 </p>
   
 <hr>
-<p>
+
 <address><a href="mailto:schrage@gaia.iwr.uni-heidelberg.de">Jan Schrage</a></address>
-</p>
 
 <p>
 Last modified: Fri Feb 12, 1999

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.