]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revert accidental check-in.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 21 Sep 2009 09:28:28 +0000 (09:28 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Mon, 21 Sep 2009 09:28:28 +0000 (09:28 +0000)
git-svn-id: https://svn.dealii.org/trunk@19487 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-38/step-38.cc
deal.II/examples/step-5/step-5.cc

index 753f24868eac0021b8683f0cb0bd28ca173d72a1..2e79616d83cdb26ca1d504acab0bc0dde19a6432 100644 (file)
@@ -1541,7 +1541,7 @@ void DGMethod<dim>::run ()
        {
          GridGenerator::hyper_cube (triangulation);
 
-         triangulation.refine_global (5);
+         triangulation.refine_global (3);
        }
       else
        refine_grid ();
@@ -1599,7 +1599,7 @@ void DGMethod<dim>::run ()
                                       // two solutions for equality.
       solution1-=solution2;
       const double difference=solution1.linfty_norm();
-      if (difference>1e-12)
+      if (difference>1e-13)
        std::cout << "solution1 and solution2 differ!!" << std::endl;
       else
        std::cout << "solution1 and solution2 coincide." << std::endl;
index 50ab262717bee60fb6384fbd75aa5f4a2a7cac80..86d3b720c5efa2ba3b80ecbb31440edb19f497d6 100644 (file)
@@ -73,12 +73,12 @@ using namespace dealii;
                                 // <code>setup_system</code>. Apart from this,
                                 // everything is as before.
 template <int dim>
-class LaplaceProblem 
+class LaplaceProblem
 {
   public:
     LaplaceProblem ();
     void run ();
-    
+
   private:
     void setup_system ();
     void assemble_system ();
@@ -125,14 +125,14 @@ class LaplaceProblem
                                 // here just as in the previous
                                 // example.
 template <int dim>
-class Coefficient : public Function<dim> 
+class Coefficient : public Function<dim>
 {
   public:
     Coefficient ()  : Function<dim>() {}
-    
+
     virtual double value (const Point<dim>   &p,
                          const unsigned int  component = 0) const;
-    
+
     virtual void value_list (const std::vector<Point<dim> > &points,
                             std::vector<double>            &values,
                             const unsigned int              component = 0) const;
@@ -154,7 +154,7 @@ class Coefficient : public Function<dim>
                                 // after all):
 template <int dim>
 double Coefficient<dim>::value (const Point<dim> &p,
-                               const unsigned int /*component*/) const 
+                               const unsigned int /*component*/) const
 {
   if (p.square() < 0.5*0.5)
     return 20;
@@ -271,9 +271,9 @@ double Coefficient<dim>::value (const Point<dim> &p,
 template <int dim>
 void Coefficient<dim>::value_list (const std::vector<Point<dim> > &points,
                                   std::vector<double>            &values,
-                                  const unsigned int              component) const 
+                                  const unsigned int              component) const
 {
-  Assert (values.size() == points.size(), 
+  Assert (values.size() == points.size(),
          ExcDimensionMismatch (values.size(), points.size()));
                                   // Since examples are not very good
                                   // if they do not demonstrate their
@@ -295,7 +295,7 @@ void Coefficient<dim>::value_list (const std::vector<Point<dim> > &points,
                                   // call stack to immediately find
                                   // the place where the the array
                                   // with the wrong size was set up.
-  
+
                                   // While we're at it, we can do
                                   // another check: the coefficient
                                   // is a scalar, but the
@@ -331,7 +331,7 @@ void Coefficient<dim>::value_list (const std::vector<Point<dim> > &points,
                                   // of writing <code>v.size()-1</code> in
                                   // many places, the range is
                                   // defined as half-open.)
-  Assert (component == 0, 
+  Assert (component == 0,
          ExcIndexRange (component, 0, 1));
 
                                   // The rest of the function is
@@ -430,11 +430,11 @@ void LaplaceProblem<dim>::setup_system ()
                                 // are completely unchanged from
                                 // before:
 template <int dim>
-void LaplaceProblem<dim>::assemble_system () 
-{  
+void LaplaceProblem<dim>::assemble_system ()
+{
   QGauss<dim>  quadrature_formula(2);
 
-  FEValues<dim> fe_values (fe, quadrature_formula, 
+  FEValues<dim> fe_values (fe, quadrature_formula,
                           update_values    |  update_gradients |
                           update_quadrature_points  |  update_JxW_values);
 
@@ -540,7 +540,7 @@ void LaplaceProblem<dim>::assemble_system ()
 
       coefficient.value_list (fe_values.get_quadrature_points(),
                              coefficient_values);
-      
+
       for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
        for (unsigned int i=0; i<dofs_per_cell; ++i)
          {
@@ -556,9 +556,6 @@ void LaplaceProblem<dim>::assemble_system ()
          }
 
 
-      cell->distribute_local_to_global (cell_rhs, system_rhs);
-      cell->distribute_local_to_global (cell_matrix, system_matrix);
-      /*
       cell->get_dof_indices (local_dof_indices);
       for (unsigned int i=0; i<dofs_per_cell; ++i)
        {
@@ -566,10 +563,9 @@ void LaplaceProblem<dim>::assemble_system ()
            system_matrix.add (local_dof_indices[i],
                               local_dof_indices[j],
                               cell_matrix(i,j));
-         
+
          system_rhs(local_dof_indices[i]) += cell_rhs(i);
        }
-      */
     }
 
                                   // With the matrix so built, we use
@@ -638,7 +634,7 @@ void LaplaceProblem<dim>::assemble_system ()
                                 // declared, and the CG solver will
                                 // do the rest for us:
 template <int dim>
-void LaplaceProblem<dim>::solve () 
+void LaplaceProblem<dim>::solve ()
 {
   SolverControl           solver_control (1000, 1e-12);
   SolverCG<>              cg (solver_control);
@@ -820,7 +816,7 @@ void LaplaceProblem<dim>::output_results (const unsigned int cycle) const
                                 // this is the first cycle, however,
                                 // we first have to generate a mesh:
 template <int dim>
-void LaplaceProblem<dim>::run () 
+void LaplaceProblem<dim>::run ()
 {
   for (unsigned int cycle=0; cycle<6; ++cycle)
     {
@@ -910,7 +906,7 @@ void LaplaceProblem<dim>::run ()
                                           // might be worth to show
                                           // what not to do, after
                                           // all.
-         
+
                                           // So if we got past the
                                           // assertion, we know that
                                           // dim==2, and we can now
@@ -987,7 +983,7 @@ void LaplaceProblem<dim>::run ()
                                 // like the one in the previous
                                 // example, so we won't comment on it
                                 // further:
-int main () 
+int main ()
 {
   deallog.depth_console (0);
 
@@ -1016,12 +1012,12 @@ int main ()
                                   // Results section of the program
                                   // to see what happens when the
                                   // code is actually run:
-/*  
+/*
   Coefficient<2>    coefficient;
   std::vector<Point<2> > points (2);
   std::vector<double>    coefficient_values (1);
   coefficient.value_list (points, coefficient_values);
 */
-  
+
   return 0;
 }

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.