]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Started to write the first few comments.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 31 Jul 2009 15:25:17 +0000 (15:25 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 31 Jul 2009 15:25:17 +0000 (15:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@19146 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-22/step-22.cc
deal.II/examples/step-32/step-32.cc

index dcc21a0fbfacc2ad2ba9ec04531e91f0ce4bed62..bc2d96437711cf35f449ccb8b52504f640731c29 100644 (file)
@@ -64,7 +64,7 @@
 #include <sstream>
 
                                 // As in all programs, the namespace dealii
-                                // in included:
+                                // is included:
 using namespace dealii;
 
                                 // @sect3{Defining the inner preconditioner type}
@@ -72,10 +72,10 @@ using namespace dealii;
                                 // As explained in the introduction, we are
                                 // going to use different preconditioners for
                                 // two and three space dimensions,
-                                // respectively. We differentiate between
+                                // respectively. We distinguish between
                                 // them by the use of the spatial dimension
                                 // as a template parameter. See step-4 for
-                                // details on templates.  We are not going to
+                                // details on templates. We are not going to
                                 // create any preconditioner object here, all
                                 // we do is to create class that holds a
                                 // local typedef determining the
index 1d233ad94bb82d3bead4cbb8733e7b01b828a792..3f2672822c3af22675427dad0bd0e43070adfe31 100644 (file)
@@ -21,6 +21,7 @@
 #include <base/utilities.h>
 #include <base/conditional_ostream.h>
 #include <base/work_stream.h>
+#include <base/timer.h>
 
 #include <lac/full_matrix.h>
 #include <lac/solver_bicgstab.h>
 #include <numerics/error_estimator.h>
 #include <numerics/solution_transfer.h>
 
-#include <Epetra_Map.h>
-
-                                // Time measurements. 
-#include <base/timer.h>
-
 #include <fstream>
 #include <iostream>
 #include <sstream>
 
+                                  // This is the only include file that is
+                                  // new: We use Trilinos for defining the
+                                  // parallel partitioning of the matrices
+                                  // and vectors, and an Epetra_Map is the
+                                  // Trilinos data structure for the
+                                  // definition of which part of a
+                                  // distributed vector is stored locally.
+#include <Epetra_Map.h>
+
 
                                 // Next, we import all deal.II
                                 // names into global namespace
@@ -73,17 +78,17 @@ using namespace dealii;
 
                                 // @sect3{Equation data}
 
-
-                                // @sect4{Boundary values}
+                                  // This program is mainly an extension of
+                                  // step-31 to operate in parallel, so the
+                                  // equation data remains the same.
 namespace EquationData
 {
-                                  // define viscosity
   const double eta = 1;
   const double kappa = 1e-6;
   const double Rayleigh_number = 10;
 
 
-                                  // @sect4{Initial values}
+
   template <int dim>
   class TemperatureInitialValues : public Function<dim>
   {
@@ -98,12 +103,16 @@ namespace EquationData
   };
 
 
+
   template <int dim>
   double
   TemperatureInitialValues<dim>::value (const Point<dim>  &,
                                        const unsigned int) const
   {
-    //return (p.norm() < 0.55+0.02*std::sin(p[0]*20) ? 1 : 0);
+                                  // Data for shell problem
+    /*return (p.norm() < 0.55+0.02*std::sin(p[0]*20) ? 1 : 0);*/
+
+                                  // Data for cube problem
     return 0.;
   }
 
@@ -119,7 +128,6 @@ namespace EquationData
 
 
 
-                                  // @sect4{Right hand side}
   template <int dim>
   class TemperatureRightHandSide : public Function<dim>
   {
@@ -134,12 +142,16 @@ namespace EquationData
   };
 
 
+
   template <int dim>
   double
   TemperatureRightHandSide<dim>::value (const Point<dim>  &p,
                                        const unsigned int component) const
   {
-    //    return 0;
+                                  // Data for shell problem.
+    /*    return 0; */
+
+                                  // Data for cube problem.
     Assert (component == 0,
            ExcMessage ("Invalid operation for a scalar function."));
     
@@ -161,7 +173,6 @@ namespace EquationData
            1
            :
            0);
-
   }
 
 
@@ -179,6 +190,26 @@ namespace EquationData
 
                                   // @sect3{Linear solvers and preconditioners}
 
+                                  // In comparison to step-31, we did one
+                                  // change in the linear algebra of the
+                                  // problem: We exchange the InverseMatrix
+                                  // that previously held the approximation
+                                  // of the Schur complement by a
+                                  // preconditioner only (we will choose
+                                  // ILU in the application code
+                                  // below). This is the same trick we
+                                  // already did for the velocity block -
+                                  // the idea of this is that the outer
+                                  // iterations will eventually also make
+                                  // the inner approximation for the Schur
+                                  // complement good. If the preconditioner
+                                  // we're using is good enough, there will
+                                  // be no increase in the iteration
+                                  // count. All we need to do for
+                                  // implementing this change here is to
+                                  // give the respective variable in the
+                                  // BlockSchurPreconditioner class another
+                                  // name.
 namespace LinearSolvers
 {
   template <class PreconditionerA, class PreconditionerMp>

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.