From 1cbb81c1a66dc3f0931d025fd08523176b66d1ef Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 21 Oct 2007 04:15:55 +0000 Subject: [PATCH] Fix a bug where we were using the wrong FEValues object to calculate the temperature of a neighboring cell. Break a few overly long lines. Switch refinement back on. git-svn-id: https://svn.dealii.org/trunk@15358 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-22/step-22.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/deal.II/examples/step-22/step-22.cc b/deal.II/examples/step-22/step-22.cc index 34537fb424..c55e7377d9 100644 --- a/deal.II/examples/step-22/step-22.cc +++ b/deal.II/examples/step-22/step-22.cc @@ -740,8 +740,10 @@ void BoussinesqFlowProblem::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::assemble_rhs_T () { const typename DoFHandler::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::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::active_cell_iterator neighbor = cell->neighbor_child_on_subface (face_no, subface_no); @@ -811,7 +815,7 @@ void BoussinesqFlowProblem::assemble_rhs_T () fe_face_values_neighbor .get_function_values (old_solution, old_solution_values_face_neighbor); - + for (unsigned int q=0; q::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 present_u_face; @@ -1035,8 +1039,6 @@ template void BoussinesqFlowProblem::refine_mesh () { - return; - Vector estimated_error_per_cell (triangulation.n_active_cells()); //TODO do this better @@ -1204,7 +1206,7 @@ void BoussinesqFlowProblem::run () std::cout << std::endl; - if (timestep_number % 1 == 0) + if (timestep_number % 10 == 0) refine_mesh (); } while (time <= 500); -- 2.39.5