From: David Wells Date: Fri, 24 Jul 2015 17:56:48 +0000 (-0400) Subject: Simplify the WorkStream parts of step-14. X-Git-Tag: v8.4.0-rc2~644^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed1a85ac18c9eb3dc0f15acb70054cd2cada1843;p=dealii.git Simplify the WorkStream parts of step-14. This makes it more like step-13, which is one of the goals of this example program. --- diff --git a/examples/step-14/step-14.cc b/examples/step-14/step-14.cc index 8edcbcf653..aae0ef103a 100644 --- a/examples/step-14/step-14.cc +++ b/examples/step-14/step-14.cc @@ -442,11 +442,10 @@ namespace Step14 unsigned int n_dofs () const; + protected: const SmartPointer > fe; const SmartPointer > quadrature; const SmartPointer > face_quadrature; - - protected: DoFHandler dof_handler; Vector solution; const SmartPointer > boundary_values; @@ -2018,10 +2017,12 @@ namespace Step14 struct WeightedResidualScratchData { - WeightedResidualScratchData(const PrimalSolver &primal_solver, - const DualSolver &dual_solver, - const Vector &primal_solution, - const Vector &dual_weights); + WeightedResidualScratchData (const FiniteElement &primal_fe, + const Quadrature &primal_quadrature, + const Quadrature &primal_face_quadrature, + const Function &rhs_function, + const Vector &primal_solution, + const Vector &dual_weights); WeightedResidualScratchData(const WeightedResidualScratchData &scratch_data); @@ -2186,16 +2187,15 @@ namespace Step14 template WeightedResidual::WeightedResidualScratchData:: - WeightedResidualScratchData (const PrimalSolver &primal_solver, - const DualSolver &dual_solver, - const Vector &primal_solution, - const Vector &dual_weights) + WeightedResidualScratchData (const FiniteElement &primal_fe, + const Quadrature &primal_quadrature, + const Quadrature &primal_face_quadrature, + const Function &rhs_function, + const Vector &primal_solution, + const Vector &dual_weights) : - cell_data (*dual_solver.fe, - *dual_solver.quadrature, - *primal_solver.rhs_function), - face_data (*dual_solver.fe, - *dual_solver.face_quadrature), + cell_data (primal_fe, primal_quadrature, rhs_function), + face_data (primal_fe, primal_face_quadrature), primal_solution(primal_solution), dual_weights(dual_weights) {} @@ -2480,8 +2480,10 @@ namespace Step14 std_cxx11::_3, std_cxx11::ref(face_integrals)), std_cxx11::function(), - WeightedResidualScratchData (*this, - *this, + WeightedResidualScratchData (*DualSolver::fe, + *DualSolver::quadrature, + *DualSolver::face_quadrature, + *this->rhs_function, primal_solution, dual_weights), WeightedResidualCopyData());