]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add text. Other small changes.
authorzamni <zamni@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 27 Mar 2000 06:47:55 +0000 (06:47 +0000)
committerzamni <zamni@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 27 Mar 2000 06:47:55 +0000 (06:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@2632 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-3/step-3.cc
deal.II/examples/step-4/step-4.cc
deal.II/examples/step-5/step-5.cc
deal.II/examples/step-6/step-6.cc

index 990d8e46a434e6ca74f1709ea5a265e49ffcf4ba..9f30b5fb1589bca6566ccc5ea26a7892e2410c33 100644 (file)
@@ -118,7 +118,10 @@ class LaplaceProblem
                                     // variables. There are variables
                                     // describing the triangulation
                                     // and the numbering of the
-                                    // degrees of freedom...
+                                    // degrees of freedom...  The
+                                    // FEQ<2> is the space which
+                                    // has the following base
+                                    // functions: {1,x,y,xy}
     Triangulation<2>     triangulation;
     FEQ1<2>              fe;
     DoFHandler<2>        dof_handler;
@@ -352,7 +355,11 @@ void LaplaceProblem::assemble_system ()
                                   // (Jacobians times weights, or
                                   // short JxW) are computed; since
                                   // we also need them, we have to
-                                  // list them as well:
+                                  // list them as well. The advantage
+                                  // of this proceeding is that we
+                                  // calculate only what we
+                                  // need. This optimates the process
+                                  // of solving:
   FEValues<2> fe_values (fe, quadrature_formula, 
                         UpdateFlags(update_values    |
                                     update_gradients |
@@ -403,7 +410,7 @@ void LaplaceProblem::assemble_system ()
                                   // degrees of freedom on the
                                   // present cell, and only transfer
                                   // them to the global matrix when
-                                  // the copmutations are finished
+                                  // the computations are finished
                                   // for this cell. We do the same
                                   // for the right hand side vector,
                                   // although access times are not so
@@ -422,11 +429,11 @@ void LaplaceProblem::assemble_system ()
                                   // global matrix, we have to know
                                   // the global numbers of the
                                   // degrees of freedom. When we get
-                                  // them, we need a scratch array
+                                  // them, we need a scratch (temporal) array
                                   // for these numbers:
   vector<unsigned int> local_dof_indices (dofs_per_cell);
 
-                                  // Now for th loop over all
+                                  // Now for the loop over all
                                   // cells. You have seen before how
                                   // this works, so this should be
                                   // familiar to you:
@@ -614,7 +621,11 @@ void LaplaceProblem::assemble_system ()
                                   // therefore, if we give `0' as the
                                   // desired portion of the boundary,
                                   // this means we get the whole
-                                  // boundary.
+                                  // boundary. If you got different
+                                  // boundaries, you have to number
+                                  // them differently and have to be
+                                  // attentive when using the method
+                                  // above.
                                   //
                                   // The function describing the
                                   // boundary values is an object of
@@ -699,8 +710,8 @@ void LaplaceProblem::solve ()
                                   // PrimitiveVectorMemory class is
                                   // such a helper class which the
                                   // solver can ask for memory. The
-                                  // angle brackets indicate that
-                                  // this class really takes a
+                                  // angle brackets ``<>''indicate
+                                  // that this class really takes a
                                   // template parameter (here the
                                   // data type of the vectors we
                                   // use), which however has a
@@ -766,12 +777,12 @@ void LaplaceProblem::output_results () const
                                   // After the DataOut object knows
                                   // which data it is to work on, we
                                   // have to tell it to process them
-                                  // into something the backends can
+                                  // into something the back ends can
                                   // handle. The reason is that we
                                   // have separated the frontend
                                   // (which knows about how to treat
                                   // DoFHandler objects and data
-                                  // vectors) from the backend (which
+                                  // vectors) from the back end (which
                                   // knows several output formats)
                                   // and use an intermediate data
                                   // format to transfer data from the
index bac38005541d09965e325d5293c681524132e3c7..94d1e2e1ac002dbd77d2ded18811b5bc1e495c0d 100644 (file)
@@ -287,7 +287,7 @@ void LaplaceProblem<dim>::make_grid_and_dofs ()
                                 // assemblage of the matrix and right
                                 // hand side.
                                 //
-                                // More interesting, though, is they
+                                // More interesting, though, is the
                                 // way we assemble matrix and right
                                 // hand side vector dimension
                                 // independently: there is simply no
@@ -489,7 +489,7 @@ void LaplaceProblem<dim>::solve ()
                                 // This function also does what the
                                 // respective one did in the previous
                                 // example. No changes here for
-                                // dimension independentce either.
+                                // dimension independence either.
 template <int dim>
 void LaplaceProblem<dim>::output_results () const
 {
index a131374b8696e255698b3dc862797f40c1f2328f..a0aafa3c3dcd346fbe135ca3a480c4f72d34f845 100644 (file)
@@ -300,8 +300,8 @@ void LaplaceProblem<dim>::setup_system ()
                                 // as the preconditions CG method),
                                 // assembling the matrix and right
                                 // hand side can take a comparable
-                                // time, and it is worth the effort
-                                // to use one or two optimizations at
+                                // time, and you should thing about
+                                // using one or two optimizations at
                                 // some places.
                                 //
                                 // What we will show here is how we
@@ -389,7 +389,7 @@ void LaplaceProblem<dim>::assemble_system ()
                                       // get the address as follows
                                       // (note that this is a
                                       // reference to the matrix,
-                                      // symbolized by the ampersand,
+                                      // symbolized by the ampersand ``&'',
                                       // and that it must be a
                                       // constant reference, since
                                       // only read-only access is
@@ -402,7 +402,7 @@ void LaplaceProblem<dim>::assemble_system ()
                                       // shape_values(j,q), i.e. the
                                       // function call needed
                                       // previously for each access
-                                      // has been otimized away.
+                                      // has been optimized away.
                                       //
                                       // There are alike functions
                                       // for almost all data elements
@@ -788,12 +788,14 @@ void LaplaceProblem<dim>::run ()
                                       // ask it to read the
                                       // file). Then we open the
                                       // respective file and fill the
-                                      // triangulation with it:
+                                      // triangulation with it
+                                      // because you like to work
+                                      // with it:
       if (cycle == 0)
        {
          GridIn<dim> grid_in;
          grid_in.attach_triangulation (triangulation);
-
+         ifstream input_file("circle-grid.inp");
                                           // We would now like to
                                           // read the file. However,
                                           // the input file is only
@@ -845,12 +847,19 @@ void LaplaceProblem<dim>::run ()
                                           // We can now actually read
                                           // the grid. It is in UCD
                                           // (unstructured cell data)
-                                          // format, as supported by
-                                          // AVS Explorer, for
+                                          // format (but the ending
+                                          // of the ``UCD''-file is
+                                          // ``inp''), as supported
+                                          // by AVS Explorer, for
                                           // example:
-         ifstream input_file("circle-grid.inp");
+         
          grid_in.read_ucd (input_file);
 
+                                           // If you like to use other
+                                           // input format, you have
+                                           // to use an other
+                                           // grid_in.read_``blabla''
+                                           // funktion.
                                           // The grid in the file
                                           // describes a
                                           // circle. Therefore we
index 0629bdc820f8e02342080ea36fdba799f555199d..acddb69ea6058bc5dbc88411daa459855eed8cb8 100644 (file)
                                 // which in analogy to ``FEQ1'' for
                                 // the linear element is called
                                 // ``FEQ2''. The Lagrange elements of
-                                // poynomial degrees one through four
+                                // polynomial degrees one through four
                                 // are all declared in this file.
 #include <fe/fe_lib.lagrange.h>
-
                                 // We will not read the grid from a
                                 // file as in the previous example,
                                 // but generate it using a function
@@ -215,7 +214,7 @@ LaplaceProblem<dim>::LaplaceProblem () :
                                 // re-distributed using another
                                 // finite element object or until the
                                 // ``dof_handler'' object is
-                                // detroyed, it would be unwise if we
+                                // destroyed, it would be unwise if we
                                 // would allow the finite element
                                 // object to be deleted before
                                 // ``dof_handler'' object. To
@@ -264,7 +263,7 @@ LaplaceProblem<dim>::LaplaceProblem () :
                                 // situation, if we did not write
                                 // this destructor, the compiler will
                                 // generate code that triggers
-                                // exactly the behavious sketched
+                                // exactly the behaviour sketched
                                 // above. The reason is that member
                                 // variables of the
                                 // ``LaplaceProblem'' class are
@@ -386,7 +385,7 @@ void LaplaceProblem<dim>::setup_system ()
                                   // functions that eliminate them
                                   // are called ``condense'' for both
                                   // the system matrix and right hand
-                                  // side, as well as for teh
+                                  // side, as well as for the
                                   // sparsity pattern.
   hanging_node_constraints.condense (sparsity_pattern);
 
@@ -447,8 +446,9 @@ void LaplaceProblem<dim>::assemble_system ()
                                   // introduced an abbreviation for
                                   // the number of degrees of freedom
                                   // per cell before: the following
-                                  // value will be set to 9 (in 2D)
-                                  // now, where it was 4 before.
+                                  // value will be set to 9 (in 2D
+                                  // because of Q2S) now, where it was
+                                  // 4 before.
   const unsigned int   dofs_per_cell = fe.dofs_per_cell;
   const unsigned int   n_q_points    = quadrature_formula.n_quadrature_points;
 
@@ -655,7 +655,7 @@ void LaplaceProblem<dim>::refine_grid ()
                                   // conditions. For this, it needs
                                   // to know which parts of the
                                   // boundary have Neumann boundary
-                                  // conditions and teh respective
+                                  // conditions and the respective
                                   // boundary values there. This
                                   // information is mediated by a map
                                   // in which the keys are the
@@ -923,7 +923,7 @@ void LaplaceProblem<dim>::run ()
                                 // not constitute programming errors,
                                 // these exceptions also are not
                                 // switched off in optimized mode, in
-                                // constrast to the ``Assert'' macro
+                                // contrast to the ``Assert'' macro
                                 // which we have used to test against
                                 // programming errors. If uncought,
                                 // these exceptions propagate the

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.