]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove the pressure boundary values -- they are only ever zero, and don't provide...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Sep 2008 21:39:19 +0000 (21:39 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Sep 2008 21:39:19 +0000 (21:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@16886 0785d39b-7218-0410-832d-ea1e28bc413d

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

index f0ff402482c3d3580d1e0d230e4ccdb915fb396a..02c1f70567060443d76f41158f6a0b7c72abe898 100644 (file)
@@ -90,13 +90,14 @@ using namespace dealii;
                                 // step-22. Regarding the details, though,
                                 // there are some differences.
 
-                                // The first
-                                // thing is that we don't set any boundary
-                                // conditions on the velocity, as is
-                                // explained in the introduction. So
-                                // what is left are two conditions for
-                                // pressure <i>p</i> and temperature
-                                // <i>T</i>.
+                                // The first thing is that we don't set any
+                                // non-homogenous boundary conditions on the
+                                // velocity, since as is explained in the
+                                // introduction we will use no-flux
+                                // conditions
+                                // $\mathbf{n}\cdot\mathbf{u}=0$. So what is
+                                // left are two conditions for pressure
+                                // <i>p</i> and temperature <i>T</i>.
 
                                 // Secondly, we set an initial
                                 // condition for all problem variables,
@@ -115,29 +116,6 @@ namespace EquationData
   const double Rayleigh_number = 10;
 
 
-  template <int dim>
-  class PressureBoundaryValues : public Function<dim>
-  {
-    public:
-      PressureBoundaryValues () : Function<dim>(1) {}
-
-      virtual double value (const Point<dim>   &p,
-                           const unsigned int  component = 0) const;
-  };
-
-
-  template <int dim>
-  double
-  PressureBoundaryValues<dim>::value (const Point<dim>  &/*p*/,
-                                     const unsigned int /*component*/) const
-  {
-    return 0;
-  }
-
-
-
-
-
                                   // @sect4{Initial values}
   template <int dim>
   class TemperatureInitialValues : public Function<dim>
@@ -1278,7 +1256,6 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
                                   // individual blocks (velocity,
                                   // pressure, temperature) from
                                   // the total FE system.
-  const EquationData::PressureBoundaryValues<dim> pressure_boundary_values;
   std::vector<double>               boundary_values (n_face_q_points);
 
   std::vector<double>               old_temperature_values(n_q_points);
@@ -1377,43 +1354,6 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
                            stokes_fe_values.JxW(q);
        }
 
-
-                                      // Next follows the assembly 
-                                      // of the face terms, result
-                                      // from Neumann boundary 
-                                      // conditions. Since these
-                                      // terms only enter the right
-                                      // hand side vector and not
-                                      // the matrix, there is no
-                                      // substantial benefit from
-                                      // extracting the data 
-                                      // before using it, so 
-                                      // we remain in the lines 
-                                      // of step-20 at this point.
-      for (unsigned int face_no=0;
-          face_no<GeometryInfo<dim>::faces_per_cell;
-          ++face_no)
-       if (cell->at_boundary(face_no))
-         {
-           stokes_fe_face_values.reinit (cell, face_no);
-
-           pressure_boundary_values
-             .value_list (stokes_fe_face_values.get_quadrature_points(),
-                          boundary_values);
-
-           for (unsigned int q=0; q<n_face_q_points; ++q)
-             for (unsigned int i=0; i<dofs_per_cell; ++i)
-               {
-                 const Tensor<1,dim>
-                   phi_i_u = stokes_fe_face_values[velocities].value (i, q);
-
-                 local_rhs(i) += -(phi_i_u *
-                                   stokes_fe_face_values.normal_vector(q) *
-                                   boundary_values[q] *
-                                   stokes_fe_face_values.JxW(q));
-               }
-         }      
-
                                       // The last step in the loop 
                                       // over all cells is to
                                       // enter the local contributions
index 1fd4eeada78d4a90bcd8203fb59de71d4207e7f5..83cdeb17dd12146be0ef8a2498058c3f8f7258d8 100644 (file)
@@ -85,29 +85,6 @@ namespace EquationData
   const double Rayleigh_number = 10;
 
 
-  template <int dim>
-  class PressureBoundaryValues : public Function<dim>
-  {
-    public:
-      PressureBoundaryValues () : Function<dim>(1) {}
-
-      virtual double value (const Point<dim>   &p,
-                           const unsigned int  component = 0) const;
-  };
-
-
-  template <int dim>
-  double
-  PressureBoundaryValues<dim>::value (const Point<dim>  &/*p*/,
-                                     const unsigned int /*component*/) const
-  {
-    return 0;
-  }
-
-
-
-
-
                                   // @sect4{Initial values}
   template <int dim>
   class TemperatureInitialValues : public Function<dim>
@@ -856,7 +833,6 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
 
   std::vector<unsigned int> local_dof_indices (dofs_per_cell);
 
-  const EquationData::PressureBoundaryValues<dim> pressure_boundary_values;
   std::vector<double>               boundary_values (n_face_q_points);
 
   std::vector<double>               old_temperature_values(n_q_points);
@@ -919,29 +895,6 @@ void BoussinesqFlowProblem<dim>::assemble_stokes_system ()
                              gravity * phi_u[i] * old_temperature)*
                              stokes_fe_values.JxW(q);
          }
-       for (unsigned int face_no=0;
-           face_no<GeometryInfo<dim>::faces_per_cell;
-           ++face_no)
-         if (cell->at_boundary(face_no))
-           {
-             stokes_fe_face_values.reinit (cell, face_no);
-  
-             pressure_boundary_values
-               .value_list (stokes_fe_face_values.get_quadrature_points(),
-                           boundary_values);
-  
-             for (unsigned int q=0; q<n_face_q_points; ++q)
-               for (unsigned int i=0; i<dofs_per_cell; ++i)
-                 {
-                   const Tensor<1,dim>
-                     phi_i_u = stokes_fe_face_values[velocities].value (i, q);
-  
-                   local_rhs(i) += -(phi_i_u *
-                                     stokes_fe_face_values.normal_vector(q) *
-                                     boundary_values[q] *
-                                     stokes_fe_face_values.JxW(q));
-                 }
-           }
   
        cell->get_dof_indices (local_dof_indices);
   

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.