]> https://gitweb.dealii.org/ - dealii.git/commitdiff
remove doxygen complaints and improve documentation of step 38
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 5 Oct 2009 15:48:09 +0000 (15:48 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 5 Oct 2009 15:48:09 +0000 (15:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@19707 0785d39b-7218-0410-832d-ea1e28bc413d

14 files changed:
deal.II/deal.II/include/numerics/mesh_worker.h
deal.II/deal.II/include/numerics/mesh_worker_info.h
deal.II/deal.II/include/numerics/mesh_worker_vector_selector.h
deal.II/examples/step-38/doc/intro.dox
deal.II/examples/step-38/step-38.cc
deal.II/lac/include/lac/constraint_matrix.h
deal.II/lac/include/lac/petsc_block_vector.h
deal.II/lac/include/lac/petsc_parallel_block_vector.h
deal.II/lac/include/lac/petsc_parallel_vector.h
deal.II/lac/include/lac/petsc_vector.h
deal.II/lac/include/lac/petsc_vector_base.h
deal.II/lac/include/lac/trilinos_block_vector.h
deal.II/lac/include/lac/trilinos_vector.h
deal.II/lac/include/lac/trilinos_vector_base.h

index b4bef51b709530c46accd6de4b95ab60284a43cb..4f34fa7573b08a58ce87bc766519285ca528ba5c 100644 (file)
@@ -60,6 +60,50 @@ template<int,int> class MGDoFHandler;
  * class responsible for the local integration:
  *
  * @code
+ * template <int dim>
+ * class LocalIntegrator : public Subscriptor
+ * {
+ *   void cell(typename MeshWorker::IntegrationWorker<dim>::CellInfo& info) const;
+ *   void bdry(typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info) const;
+ *   void face(typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info1,
+ *             typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info2) const;
+ * };
+ * @endcode
+ * The three functions in there must have exactly this signature and
+ * should do the integration on cells, boundary and interior faces,
+ * respectively.
+ *
+ * Then, create the AssemblingIntegrator object, where the second
+ * template argument decides on what kind of global data is
+ * assembled. In the following, we decide to assemble a simple
+ * SparseMatrix with no block structure:
+ *
+ * @code
+ * LocalIntegrator<dim> loc;
+ * MeshWorker::AssemblingIntegrator<dim, MeshWorker::Assembler::MatrixSimple<SparseMatrix<double> >, LocalIntegrator<dim> >
+ *   integrator(loc);
+ * @endcode
+ *
+ * Before we can run the integration loop, we have to initialize
+ * several data structures in our AssemblingIntegrator. For instance,
+ * we have to decide on the quadrature rule or we may need more than
+ * the default update flags.
+ *
+ * @code
+ * integrator.initialize_gauss_quadrature(2,2,2);
+ * integrator.add_update_flags(update_values | update_gradients, true, true, true, true);
+ * integrator.initialize(system_matrix);
+ * @endcode
+ *
+ * Finally, we set up the structures needed by the integration_loop()
+ * and run it.
+ *
+ * @code
+ * MeshWorker::IntegrationInfoBox<dim> info_box(dof_handler);
+ * info_box.initialize(integrator, fe, mapping);
+ *
+ * MeshWorker::integration_loop(dof_handler.begin_active(), dof_handler.end(),
+ *                              info_box, integrator);
  * @endcode
  *
  * @author Guido Kanschat, 2009
index c0e8e5213c9c2123661caa7354fa9a47a76f4600..1c0a1f0bea5875a5666d5ed40ea9e4ba8d986994 100644 (file)
@@ -346,13 +346,6 @@ namespace MeshWorker
                                        * and allocate space for
                                        * data vectors.
                                        *
-                                       * @param fe is only used
-                                       * to determine the type of
-                                       * the element and can be a
-                                       * null pointer to FEValues,
-                                       * FEVaceValues or
-                                       * FESubfaceValues.
-                                       *
                                        * @param el is the finite
                                        * element of the DoFHandler.
                                        *
index 73f5f81092cff19008559f8daaea531dc566a341..c4fadab0cd378becd0d6678c1cee9d66c83f3b39 100644 (file)
@@ -209,9 +209,13 @@ namespace MeshWorker
                                        * the subset of @p indices
                                        * used.
                                        *
-                                       * @param block is the block
-                                       * number processed, or zero if
-                                       * no base elements are used.
+                                       * @param component is the first
+                                       * index in @p values, @p
+                                       * gradients and @p hessians
+                                       * entered in this function.
+                                       *
+                                       * @param n_comp is the number
+                                       * of components to be filled.
                                        *
                                        * @param start is the first
                                        * index of this block in @p
index 2f9248cc02cb06782f8943eaaa76d28bf7740279..edbf0491e601768defc34e438a0c37441e95e39b 100644 (file)
@@ -1,13 +1,20 @@
 <a name="Intro"></a>
-<h1>This will be an example of the new MeshWorker framework and will be available soon</h1>
+<h1>Example of the MeshWorker framework with an advection problem</h1>
 
 <h3>Overview</h3>
 
-This example is devoted to the <em>discontinuous Galerkin method</em>,
-or in short: DG method. It solves the same problem as step-12 (see
-there for a description of the problem and discretization), but here
-we use the MeshWorker framework in order to save reprogramming the
-cell/face loops.
+This example is devoted to the MeshWorker framework and the
+<em>discontinuous Galerkin method</em>, or in short: DG method. It
+solves the same problem as @ref step_12 "step-12" (see there for a description of the
+problem and discretization), but here we use the MeshWorker framework
+in order to save reprogramming the cell/face loops.
+
+In particular the loops of DG methods turn out to be complex, because
+for the face terms, we have to distinguish the cases of boundary,
+regular interior faces and interior faces with hanging nodes,
+respectively. The MeshWorker framework implements the standard loop
+over all cells and faces in MeshWorker::loop() and takes care of
+distinguishing between all the different faces.
 
 <h3>Implementation</h3>
 
index ab36d414dc2620784d9dda42c929b33cccfe8718..8aa23c35af6b2abd9978af25ad0d4f2cc349f7c0 100644 (file)
@@ -181,39 +181,20 @@ void BoundaryValues<dim>::value_list(const std::vector<Point<dim> > &points,
 
                                 // @sect3{Integrating cell and face matrices}
                                 //
-                                // In order to use the MeshWorker
-                                // framework, we need to define a
-                                // worker object, which serves three
-                                // purposes. First, it performs the
-                                // local integration on each mesh
-                                // cell. Second, it controls the loop
-                                // over cells and faces and the data
-                                // being generated. This part is
-                                // easily implemented here, since the
-                                // default structure can be
-                                // used. Finally, through its base
-                                // class from the
-                                // MeshWorker::Assembler namespace,
-                                // this object determines, how locally
-                                // produced data is assembled into
-                                // the global system.
-                                //
-                                // The fist base class is
-                                // MeshWorker::IntegrationWorker. It
-                                // has all the control structures the
-                                // generic loop needs. Fortunately,
-                                // most of them have reasonable
-                                // default values. The others will be
-                                // set below.
-                                //
-                                // The second base class is
-                                // MeshWorker::Assembler::SystemSimple,
-                                // which will assemble the matrices
-                                // and residuals on cells and faces,
-                                // respectively, into the global
-                                // system. The "simple" indicates
-                                // that we do not want to use
-                                // sophisticated block structures.
+                                // We define a class that fits into
+                                // the MeshWorker framework. Since it
+                                // will be used by
+                                // MeshWorker::AssemblingIntegrator,
+                                // it needs the functions for cell,
+                                // boundary and interior face
+                                // integration specified exactly as
+                                // below.
+
+                                // The base class Subscriptor is
+                                // needed so that
+                                // MeshWorker::AssemblingIntegrator
+                                // can store a SmartPointer to an
+                                // object of this class.
 template <int dim>
 class DGIntegrator : public Subscriptor
 {
@@ -236,7 +217,8 @@ class DGIntegrator : public Subscriptor
     void bdry(FaceInfo& info) const;
     void face(FaceInfo& info1, FaceInfo& info2) const;
 
-                                    // Additionally, like in step 12,
+                                    // Additionally, like in @ref
+                                    // step_12 "step-12",
                                     // we have objects of the
                                     // functions used in this class.
   private:
@@ -246,6 +228,7 @@ class DGIntegrator : public Subscriptor
 };
 
                                 // @sect4{The local integrators}
+
                                 // These functions are analogous to
                                 // step 12 and differ only in the
                                 // data structures. Instead of
@@ -573,18 +556,32 @@ void DGMethod<dim>::assemble_system ()
 
                                   // This is the magic object, which
                                   // knows everything about the data
-                                  // structures and local
-                                  // integration (the latter through
-                                  // our object @p dg). This is the
-                                  // object doing the work in the
-                                  // function MeshWorker::loop, which
-                                  // is implicitly called
-                                  // below. After @p dg did the local
+                                  // structures and local integration
+                                  // (the latter through our object
+                                  // @p dg). This is the object doing
+                                  // the work in the function
+                                  // MeshWorker::loop(), which is
+                                  // implicitly called by
+                                  // MeshWorker::integration_loop()
+                                  // below.
+                                  // After @p dg did the local
                                   // integration, the
                                   // MeshWorker::Assembler::SystemSimple
                                   // object distributes these into
                                   // the global sparse matrix and the
                                   // right hand side vector.
+                                  //
+                                  // It turns out,
+                                  // MeshWorker::AssemblingIntegrator
+                                  // itself is not that clever at
+                                  // all, but all its capabilities
+                                  // are provided by the two later
+                                  // template arguments. By
+                                  // exchanging
+                                  // MeshWorker::Assembler::SystemSimple,
+                                  // we could for instance assemble a
+                                  // BlockMatrix or just a Vector
+                                  // instead.
   MeshWorker::AssemblingIntegrator<dim, MeshWorker::Assembler::SystemSimple<SparseMatrix<double>, Vector<double> >, DGIntegrator<dim> >
     integrator(dg);
   
index c98ab653e3f5fac8a19847eb83f72378dc6aa658..998350e4e33eccc63b3811b5bba14dd6138eb7b6 100644 (file)
@@ -1234,8 +1234,9 @@ class ConstraintMatrix : public Subscriptor
                                      * write into a matrix but only allocate
                                      * sparsity pattern entries.
                                      *
-                                     * As explained in the @ref hp_paper "hp
-                                     * paper" and in @ref step_27 "step-27",
+                                     * As explained in the
+                                     * @ref hp_paper "hp paper"
+                                     * and in @ref step_27 "step-27",
                                      * first allocating a sparsity pattern
                                      * and later coming back and allocating
                                      * additional entries for those matrix
index 97224dab6868acb05baaa40c0ca8f609b4555f69..6026ac6c7c1ad7c49fba76b3f08153fb90795b9f 100644 (file)
@@ -469,7 +469,6 @@ namespace PETScWrappers
  * of the C++ standard library which uses a temporary object. The
  * function simply exchanges the data of the two vectors.
  *
- * @ingroup PETScWrappers
  * @relates PETScWrappers::BlockVector
  * @author Wolfgang Bangerth, 2000
  */
index a87b9b7361f8c817cd94c643e7ab3483943b813c..393d2caebdce09e6e539c7448ec22367965905ab 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors
+//    Copyright (C) 2004, 2005, 2006, 2007, 2009 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -459,7 +459,6 @@ namespace PETScWrappers
  * of the C++ standard library which uses a temporary object. The
  * function simply exchanges the data of the two vectors.
  *
- * @ingroup PETScWrappers
  * @relates PETScWrappers::MPI::BlockVector
  * @author Wolfgang Bangerth, 2000
  */
index 004784360b9f075f9bd26aadb284266d1e6e6e4d..440a1b0e776553eb8ffa0ec7e6b9a34ee7dc0903 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors
+//    Copyright (C) 2004, 2005, 2006, 2007, 2009 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -382,7 +382,6 @@ namespace PETScWrappers
  * of the C++ standard library which uses a temporary object. The
  * function simply exchanges the data of the two vectors.
  *
- * @ingroup PETScWrappers
  * @relates PETScWrappers::MPI::Vector
  * @author Wolfgang Bangerth, 2004
  */
index 16721ee3410bb1727ef2b74924745c6b002b99c1..fbe1a67390e5e11cd2f71915cb00bccb92e996b7 100644 (file)
@@ -204,7 +204,6 @@ namespace PETScWrappers
  * of the C++ standard library which uses a temporary object. The
  * function simply exchanges the data of the two vectors.
  *
- * @ingroup PETScWrappers
  * @relates PETScWrappers::Vector
  * @author Wolfgang Bangerth, 2004
  */
index 8762b5f9a677df95d6d5d09b36d9ab97e38f5c75..3f2e79403c2e8c2cc6f16a77eec00b3c732ace0d 100644 (file)
@@ -772,7 +772,6 @@ namespace PETScWrappers
  * of the C++ standard library which uses a temporary object. The
  * function simply exchanges the data of the two vectors.
  *
- * @ingroup PETScWrappers
  * @relates PETScWrappers::VectorBase
  * @author Wolfgang Bangerth, 2004
  */
index 845399c8a0c58d6aaa3827b9b7b67a2c51025871..bc65485c115cc75811abedb0c7056c353ad9ce9b 100644 (file)
@@ -438,7 +438,6 @@ namespace TrilinosWrappers
  * of the C++ standard library which uses a temporary object. The
  * function simply exchanges the data of the two vectors. 
  *
- * @ingroup TrilinosWrappers
  * @relates TrilinosWrappers::MPI::BlockVector
  * @author Martin Kronbichler, Wolfgang Bangerth, 2008
  */
@@ -898,7 +897,6 @@ namespace TrilinosWrappers
  * of the C++ standard library which uses a temporary object. The
  * function simply exchanges the data of the two vectors. 
  *
- * @ingroup TrilinosWrappers
  * @relates TrilinosWrappers::BlockVector
  * @author Martin Kronbichler, 2008
  */
index ba27a9bf4e5606c56a944c7812fee99a730b50db..7838e7691a216ed00c3703b1133959c4222e48dc 100644 (file)
@@ -413,7 +413,6 @@ namespace TrilinosWrappers
  * of the C++ standard library which uses a temporary object. The
  * function simply exchanges the data of the two vectors.
  *
- * @ingroup TrilinosWrappers
  * @relates TrilinosWrappers::MPI::Vector
  * @author Martin Kronbichler, Wolfgang Bangerth, 2008
  */
@@ -646,7 +645,6 @@ namespace TrilinosWrappers
  * of the C++ standard library which uses a temporary object. The
  * function simply exchanges the data of the two vectors.
  *
- * @ingroup TrilinosWrappers
  * @relates TrilinosWrappers::Vector
  * @author Martin Kronbichler, Wolfgang Bangerth, 2008
  */
index 04a35a43ffba61101a87b3e130d0702298bdb62b..85526044cc9ae5029efe8e28f139fb7cbe1095f7 100644 (file)
@@ -963,7 +963,6 @@ namespace TrilinosWrappers
  * the C standard library which uses a temporary object. The function
  * simply exchanges the data of the two vectors.
  *
- * @ingroup TrilinosWrappers
  * @relates TrilinosWrappers::VectorBase
  * @author Martin Kronbichler, Wolfgang Bangerth, 2008
  */

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.