From d46e67562dda1bf5d20740e4b6a8a887c90bca38 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sat, 10 Aug 2013 09:05:05 +0000 Subject: [PATCH] Small update git-svn-id: https://svn.dealii.org/trunk@30273 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-51/step-51.cc | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/deal.II/examples/step-51/step-51.cc b/deal.II/examples/step-51/step-51.cc index 0a097f89ab..2ec3e3e44a 100644 --- a/deal.II/examples/step-51/step-51.cc +++ b/deal.II/examples/step-51/step-51.cc @@ -15,7 +15,7 @@ * --------------------------------------------------------------------- * - * Author: Martin Kronbichler, TU Muenchen, + * Author: Martin Kronbichler, Technische Universität München, * Scott T. Miller, The Pennsylvania State University, 2013 */ @@ -405,9 +405,6 @@ struct Step51::PerTaskData template struct Step51::ScratchData { - const Vector &solution; - Vector &solution_local; - FEValues fe_values_local; FEFaceValues fe_face_values_local; FEFaceValues fe_face_values; @@ -438,9 +435,7 @@ struct Step51::ScratchData const Solution exact_solution; // Full constructor - ScratchData(const Vector &solution, - Vector &solution_local, - const FiniteElement &fe, + ScratchData(const FiniteElement &fe, const FiniteElement &fe_local, const QGauss &quadrature_formula, const QGauss &face_quadrature_formula, @@ -449,8 +444,6 @@ struct Step51::ScratchData const UpdateFlags flags, const bool trace_reconstruct) : - solution(solution), - solution_local(solution_local), fe_values_local (fe_local, quadrature_formula, local_flags), fe_face_values_local (fe_local, face_quadrature_formula, local_face_flags), fe_face_values (fe, face_quadrature_formula, flags), @@ -488,8 +481,6 @@ struct Step51::ScratchData // Copy constructor ScratchData(const ScratchData &sd) : - solution(sd.solution), - solution_local(sd.solution_local), fe_values_local (sd.fe_values_local.get_fe(), sd.fe_values_local.get_quadrature(), sd.fe_values_local.get_update_flags()), @@ -591,6 +582,8 @@ Step51::setup_system () system_matrix.reinit (sparsity_pattern); } + + template void Step51::assemble_system (const bool trace_reconstruct) @@ -609,9 +602,7 @@ Step51::assemble_system (const bool trace_reconstruct) PerTaskData task_data (fe.dofs_per_cell, trace_reconstruct); - ScratchData scratch (solution, - solution_local, - fe, fe_local, + ScratchData scratch (fe, fe_local, quadrature_formula, face_quadrature_formula, local_flags, @@ -700,7 +691,7 @@ Step51::assemble_system_one_cell (const typename DoFHandler::active_ce scratch.fe_face_values_local.reinit(loc_cell, face); scratch.fe_face_values.reinit(cell, face); if (scratch.trace_reconstruct) - scratch.fe_face_values.get_function_values (scratch.solution, scratch.trace_values); + scratch.fe_face_values.get_function_values (solution, scratch.trace_values); for (unsigned int q=0; q::assemble_system_one_cell (const typename DoFHandler::active_ce else { scratch.ll_matrix.vmult(scratch.tmp_rhs, scratch.l_rhs); - loc_cell->set_dof_values(scratch.tmp_rhs, scratch.solution_local); + loc_cell->set_dof_values(scratch.tmp_rhs, solution_local); } } -- 2.39.5