]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move definition of the Rayleigh number into the EquationData namespace as well.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 20 Sep 2008 03:24:05 +0000 (03:24 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 20 Sep 2008 03:24:05 +0000 (03:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@16872 0785d39b-7218-0410-832d-ea1e28bc413d

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

index e550f9b7c30f0f8ff4de78e48abb909bb2a54413..46821aaa831cbac8dcf4e9264079d51762f50c7d 100644 (file)
@@ -107,6 +107,8 @@ namespace EquationData
                                   // define viscosity
   const double eta = 1;
   const double kappa = 1e-6;
+  const double Rayleigh_number = 10;
+
 
   template <int dim>
   class PressureBoundaryValues : public Function<dim>
@@ -1277,10 +1279,6 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
                                   // Stokes system as a source
                                   // term in the momentum equation.
                                   // 
-                                  // Then, we create a variable
-                                  // to hold the Rayleigh number,
-                                  // the measure of buoyancy.
-                                  // 
                                   // The set of vectors we create
                                   // next hold the evaluations of
                                   // the basis functions that will
@@ -1301,8 +1299,6 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
 
   std::vector<double>               old_temperature_values(n_q_points);
 
-  const double Rayleigh_number = 10;
-
   std::vector<Tensor<1,dim> >          phi_u       (dofs_per_cell);
   std::vector<SymmetricTensor<2,dim> > grads_phi_u (dofs_per_cell);
   std::vector<double>                  div_phi_u   (dofs_per_cell);
@@ -1392,7 +1388,7 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
          const Point<dim> gravity = ( (dim == 2) ? (Point<dim> (0,1)) : 
                                       (Point<dim> (0,0,1)) );
          for (unsigned int i=0; i<dofs_per_cell; ++i)
-           local_rhs(i) += (Rayleigh_number *
+           local_rhs(i) += (EquationData::Rayleigh_number *
                             gravity * phi_u[i] * old_temperature)*
                            stokes_fe_values.JxW(q);
        }
index d760a01758d9371ba3dca95afc5a7eb053d0f9f6..1fd4eeada78d4a90bcd8203fb59de71d4207e7f5 100644 (file)
@@ -82,6 +82,8 @@ namespace EquationData
                                   // define viscosity
   const double eta = 1;
   const double kappa = 1e-6;
+  const double Rayleigh_number = 10;
+
 
   template <int dim>
   class PressureBoundaryValues : public Function<dim>
@@ -859,8 +861,6 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
 
   std::vector<double>               old_temperature_values(n_q_points);
 
-  const double Rayleigh_number = 10;
-
   std::vector<Tensor<1,dim> >          phi_u       (dofs_per_cell);
   std::vector<SymmetricTensor<2,dim> > grads_phi_u (dofs_per_cell);
   std::vector<double>                  div_phi_u   (dofs_per_cell);
@@ -915,7 +915,7 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
            const Point<dim> gravity = stokes_fe_values.quadrature_point(q) /
                                       stokes_fe_values.quadrature_point(q).norm();
            for (unsigned int i=0; i<dofs_per_cell; ++i)
-             local_rhs(i) += (Rayleigh_number *
+             local_rhs(i) += (EquationData::Rayleigh_number *
                              gravity * phi_u[i] * old_temperature)*
                              stokes_fe_values.JxW(q);
          }

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.