]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix some typos, add a few explanations. Extent list of ignore files.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 27 Sep 2011 16:31:12 +0000 (16:31 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 27 Sep 2011 16:31:12 +0000 (16:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@24450 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-32/Makefile
deal.II/examples/step-32/doc/intro.dox
deal.II/examples/step-32/step-32.cc

index 6d22d837e27d9df594128cff78fb9cdea18d0206..317538fb0597aec121e99cefb26259b03eff3e96 100644 (file)
@@ -30,7 +30,7 @@ D = ../../
 # shall be deleted when calling `make clean'. Object and backup files,
 # executables and the like are removed anyway. Here, we give a list of
 # files in the various output formats that deal.II supports.
-clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2
+clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *vtu *visit *ucd *.d2
 
 
 
index 78a077717269d6ddf40b87dddf0ff5fce3ee806a..b99428a5d35b552cb642a266ca6afffb2e896c45 100644 (file)
@@ -61,7 +61,7 @@ velocity and pressure field:
   \nabla \cdot {\mathbf u} &=& 0.
 @f}
 The right hand side of the first equation appears a wee bit
-unmotivated. Here's how things should really be. On the right side, we
+unmotivated. Here's how things should really be. We
 need the external forces that act on the fluid, which we assume are
 given by gravity only. In the current case, we assume that the fluid
 does expand slightly for the purposes of this gravity force, but not
@@ -138,14 +138,14 @@ There are several advantages to this:
 
 - A final reason to do this is discussed in the results section and
   concerns possible extensions to the model we use here. It has to do
-  with the fact that while the temperature equation we use here does not
+  with the fact that the temperature equation (see below) we use here does not
   include a term that contains the pressure. It should, however:
   rock, like gas, heats up as you compress it. Consequently,
   material that rises up cools adiabatically, and cold material that
   sinks down heats adiabatically. We discuss this further below.
 
 @note There is, however, a downside to this procedure. In the earth,
-the dynamic pressure is several order of magnitude smaller than the
+the dynamic pressure is several orders of magnitude smaller than the
 total pressure. If we use the equations above and solve all variables
 to, say, 4 digits of accuracy, then we may be able to get the velocity
 and the total pressure right, but we will have no accuracy at all if
@@ -646,7 +646,7 @@ are part of Trilinos' Epetra library of basic linear algebra and tool classes:
   could store all elements with even indices on one processor and all odd ones
   on another. That's not very efficient, of course, but it's
   possible. Furthermore, the elements of these partitionings do not
-  necessarily by mutually exclusive. This is important because when
+  necessarily be mutually exclusive. This is important because when
   postprocessing solutions, we need access to all locally relevant or at least
   the locally active degrees of freedom (see the module on @ref distributed
   for a definition, as well as the discussion in step-40). Which elements the
@@ -864,7 +864,7 @@ the following quantities:
   <li>The right hand side of the temperature equation contains the rate of
   %internal heating $\gamma$. The earth does heat naturally through several mechanisms:
   radioactive decay, chemical separation (heavier elements sink to the bottom,
-  lighter ones rise to the top; the countercurrents dissipate emergy equal to
+  lighter ones rise to the top; the countercurrents dissipate energy equal to
   the loss of potential energy by this separation process); heat release
   by crystallization of liquid metal as the solid inner core of the earth
   grows; and heat dissipation from viscous friction as the fluid moves.
index 6cabd193507d1d00043abe999ec9d30f48400e9b..b7baba4ef6d7dffb1f4c115e05e11f316845654a 100644 (file)
@@ -121,15 +121,6 @@ namespace Step32
 
     const double year_in_seconds  = 60*60*24*365.2425;
 
-//TODO: document in intro.dox
-                                    // scale not by R1-R0, but by a
-                                    // typical length scale, say 10km,
-                                    // of variation ("plume
-                                    // diameter"). this choice also
-                                    // roughly equilibrates the sizes
-                                    // of the velocity and pressure
-                                    // components of the solution
-                                    // vectors
     const double pressure_scaling = eta / 10000;
 
 
@@ -144,7 +135,7 @@ namespace Step32
     template <int dim>
     Tensor<1,dim> gravity_vector (const Point<dim> &p)
     {
-// interpolate the following values with a physically realistic model:
+// Interpolate the following values with a physically realistic model:
 //    const double g0      = 10.7;                  /* m / s^2    */
 //    const double g1      = 9.81;                  /* m / s^2    */
 
@@ -157,17 +148,17 @@ namespace Step32
     template <int dim>
     double adiabatic_pressure (const Point<dim> &p)
     {
-                                      // the static, adiabatic pressure
+                                      // The static, adiabatic pressure
                                       // satisfies
                                       //    dP/dr = -g rho
 
-                                      // assuming a constant density,
+                                      // Assuming a constant density,
                                       // we can integrate the pressure
                                       // equation in depth to get that
                                       // the adiabatic pressure equals
                                       //   $P(r) = rho_0 \int_r^{R_1} g(r) dr$
                                       //
-                                      // using the model for the
+                                      // Using the model for the
                                       // gravity vector above, this
                                       // yields the following formula:
       const double r = p.norm();
@@ -178,11 +169,11 @@ namespace Step32
     template <int dim>
     double adiabatic_temperature (const Point<dim> &p)
     {
-                                      // the static, adiabatic
+                                      // The static, adiabatic
                                       // temperature satisfies
-                                      //    $dT/dr = -T alpha/c_P g$
+                                      //    $dT/dr = -T \alpha/c_P g$
 
-                                      // let's assume constant gravity,
+                                      // Let's assume constant gravity,
                                       // then we get by integration
       const double r = p.norm();
 
@@ -242,6 +233,8 @@ namespace Step32
 
 // @sect3{Linear solvers and preconditioners}
 
+// TODO (MK): update
+
 // In comparison to step-31, we did one
 // change in the linear algebra of the
 // problem: We exchange the
@@ -389,7 +382,9 @@ namespace Step32
 // struct is equipped with a constructor
 // that create an FEValues object for a
 // @ref FiniteElement "finite element", a
-// @ref Quadrature "quadrature formula"
+// @ref Quadrature "quadrature formula", the
+// @ref Mapping "mapping" that describes the
+// interpolation of curved boundaries,
 // and some
 // @ref UpdateFlags "update flags".
 // Moreover, we manually
@@ -844,10 +839,14 @@ namespace Step32
 // frequently have to query velocities and
 // temperatures at arbitrary quadrature
 // points; consequently, rather than
-// "localizing" a vector whenever we need a
-// localized vector, we solve linear
+// importing ghost information of a vector
+// whenever we need access to degrees of freedom
+// that are relevant locally but owned by
+// another processor,
+// we solve linear
 // systems in %parallel but then immediately
-// localize the solution for further
+// initialize a vector including ghost entries
+// the solution for further
 // processing. The various
 // <code>*_solution</code> vectors are
 // therefore filled immediately after
@@ -1287,8 +1286,9 @@ namespace Step32
 
 // @sect4{The BoussinesqFlowProblem helper functions}
 //
-// Except two small details, this
-// function is the very same as in
+// Except two small details, the function
+// to compute the global maximum of
+// the velocity is the very same as in
 // step-31. The first detail is
 // actually common to all functions
 // that implement loop over all cells
@@ -1315,8 +1315,8 @@ namespace Step32
 // each processor calculate the
 // maximum among its cells, and then
 // do a global communication
-// operation called
-// <code>MaxAll</code> that searches
+// operation 
+// <code>Utilities::MPI::max</code> that searches
 // for the maximum value among all
 // the maximum values of the
 // individual processors. MPI
@@ -1327,12 +1327,10 @@ namespace Step32
 // will do the right thing even if we
 // work without MPI and on a single
 // machine only. The call to
-// <code>MaxAll</code> needs three
+// <code>Utilities::MPI::max</code> needs two
 // arguments, namely the local
-// maximum (input), a field for the
-// global maximum (output), and an
-// integer value one that says that
-// we only work on one double.
+// maximum (input) and the MPI communicator,
+// which is MPI_COMM_WORLD in this example.
   template <int dim>
   double BoussinesqFlowProblem<dim>::get_maximal_velocity () const
   {
@@ -1368,9 +1366,13 @@ namespace Step32
 
 
 // Similar function to before, but we now
-// compute the cfl number, i.e., maximal
+// compute the CFL number, i.e., maximal
 // velocity on a cell divided by the cell
-// diameter
+// diameter. This number is necessary to
+// determine the time step size, as we use
+// a semi-explicit time stepping scheme for
+// the temperature equation (see step-31 for
+// a discussion).
   template <int dim>
   double BoussinesqFlowProblem<dim>::get_cfl_number () const
   {
@@ -1408,17 +1410,20 @@ namespace Step32
 
 
 
+  // Next comes the computation of the global entropy variation
+  // $\|E(T)-avg(E)\|_\infty$. This is needed for the evaluation of the
+  // stabilization in the temperature equation as explained in the
+  // introduction. The entropy variation is actually only needed if we use
+  // $\alpha=2$ as a power in the residual computation. The infinity norm is
+  // computed by the maxima over quadrature points, as usual in discrete
+  // computations.
   template <int dim>
   double
   BoussinesqFlowProblem<dim>::get_entropy_variation (const double average_temperature) const
   {
-                                    // only do this if we really need entropy
-                                    // variation
     if (parameters.stabilization_alpha != 2)
       return 1.;
 
-                                    // record maximal entropy on Gauss quadrature
-                                    // points
     const QGauss<dim> quadrature_formula (parameters.temperature_degree+1);
     const unsigned int n_q_points = quadrature_formula.size();
 
@@ -1427,6 +1432,14 @@ namespace Step32
     std::vector<double> old_temperature_values(n_q_points);
     std::vector<double> old_old_temperature_values(n_q_points);
 
+                                    // Note how we preset the data fields for
+                                    // the minimum and maximum values: The
+                                    // minimum is initialized with a bigger
+                                    // and the maximum with a smaller number
+                                    // than one that is going to
+                                    // appear. These numbers will be
+                                    // overwritten in the cell loop or in the
+                                    // communication step at the latest.
     double min_entropy = std::numeric_limits<double>::max(),
           max_entropy = -std::numeric_limits<double>::max(),
                  area = 0,
@@ -1457,11 +1470,11 @@ namespace Step32
            }
        }
 
-                                    // do MPI data exchange: we need to sum over
+                                    // MPI data exchange: we need to sum over
                                     // the two integrals (area,
                                     // entropy_integrated), and get the extrema
                                     // for maximum and minimum. combine
-                                    // MPI_Allreduce for two values since that is
+                                    // MPI_Allreduce for two values since it is
                                     // an expensive operation
     const double local_for_sum[2] = { entropy_integrated, area },
                 local_for_max[2] = { -min_entropy, max_entropy };
@@ -1478,7 +1491,8 @@ namespace Step32
 
 
 
-// Again, this is only a slightly
+// Again, the evaluation of the extrapolated
+// temperature range is only a slightly
 // modified version of the respective
 // function in step-31. What is new is
 // that each processor works on its
@@ -1500,12 +1514,6 @@ namespace Step32
     std::vector<double> old_temperature_values(n_q_points);
     std::vector<double> old_old_temperature_values(n_q_points);
 
-                                    // This presets the minimum with a bigger
-                                    // and the maximum with a smaller number
-                                    // than one that is going to appear. Will
-                                    // be overwritten in the cell loop or in
-                                    // the communication step at the
-                                    // latest.
     double min_local_temperature = std::numeric_limits<double>::max(),
           max_local_temperature = -std::numeric_limits<double>::max();
 

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.