]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a bug where we were using the wrong FEValues object to calculate the temperature...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Oct 2007 04:15:55 +0000 (04:15 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 21 Oct 2007 04:15:55 +0000 (04:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@15358 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 34537fb4247344e3010e41ce1a07f8287b778feb..c55e7377d986e681caa6223986ce5029a6209d7d 100644 (file)
@@ -740,8 +740,10 @@ void BoussinesqFlowProblem<dim>::assemble_rhs_T ()
                                             // refined
            fe_face_values.reinit (cell, face_no);
 
-           fe_face_values.get_function_values (old_solution, old_solution_values_face);
-           fe_face_values.get_function_values (solution, present_solution_values_face);
+           fe_face_values.get_function_values (old_solution,
+                                               old_solution_values_face);
+           fe_face_values.get_function_values (solution,
+                                               present_solution_values_face);
 
            if (cell->at_boundary(face_no))
              temperature_boundary_values
@@ -751,7 +753,7 @@ void BoussinesqFlowProblem<dim>::assemble_rhs_T ()
              {
                const typename DoFHandler<dim>::active_cell_iterator
                  neighbor = cell->neighbor(face_no);
-
+               
                fe_face_values_neighbor.reinit (neighbor,
                                                cell->neighbor_of_neighbor(face_no));
              
@@ -799,8 +801,10 @@ void BoussinesqFlowProblem<dim>::assemble_rhs_T ()
                {
                  fe_subface_values.reinit (cell, face_no, subface_no);
 
-                 fe_subface_values.get_function_values (old_solution, old_solution_values_face);
-                 fe_subface_values.get_function_values (solution, present_solution_values_face);
+                 fe_subface_values.get_function_values (old_solution,
+                                                        old_solution_values_face);
+                 fe_subface_values.get_function_values (solution,
+                                                        present_solution_values_face);
 
                  const typename DoFHandler<dim>::active_cell_iterator
                    neighbor = cell->neighbor_child_on_subface (face_no, subface_no);
@@ -811,7 +815,7 @@ void BoussinesqFlowProblem<dim>::assemble_rhs_T ()
                  fe_face_values_neighbor
                    .get_function_values (old_solution,
                                          old_solution_values_face_neighbor);
-             
+                 
                  for (unsigned int q=0; q<n_face_q_points; ++q)
                    neighbor_temperature[q] = old_solution_values_face_neighbor[q](dim+1);
 
@@ -868,13 +872,13 @@ void BoussinesqFlowProblem<dim>::assemble_rhs_T ()
                                                 neighbor_face_no,
                                                 neighbor_subface_no);
              
-             fe_face_values_neighbor
+             fe_subface_values_neighbor
                .get_function_values (old_solution,
                                      old_solution_values_face_neighbor);
              
              for (unsigned int q=0; q<n_face_q_points; ++q)
                neighbor_temperature[q] = old_solution_values_face_neighbor[q](dim+1);
-
+             
              for (unsigned int q=0; q<n_face_q_points; ++q)
                {
                  Tensor<1,dim> present_u_face;
@@ -1035,8 +1039,6 @@ template <int dim>
 void
 BoussinesqFlowProblem<dim>::refine_mesh () 
 {
-  return;
-  
   Vector<float> estimated_error_per_cell (triangulation.n_active_cells());
 
 //TODO do this better      
@@ -1204,7 +1206,7 @@ void BoussinesqFlowProblem<dim>::run ()
 
       std::cout << std::endl;
 
-      if (timestep_number % 1 == 0)
+      if (timestep_number % 10 == 0)
        refine_mesh ();
     }
   while (time <= 500);

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.