From 477d5d05f7796969f9e20d77ceb7743e0d64b375 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sat, 13 Dec 2008 23:27:23 +0000 Subject: [PATCH] Use extractors to access only the velocity values. git-svn-id: https://svn.dealii.org/trunk@17935 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-31/step-31.cc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/deal.II/examples/step-31/step-31.cc b/deal.II/examples/step-31/step-31.cc index f9e7107a6d..662088e58d 100644 --- a/deal.II/examples/step-31/step-31.cc +++ b/deal.II/examples/step-31/step-31.cc @@ -765,26 +765,21 @@ double BoussinesqFlowProblem::get_maximal_velocity () const const unsigned int n_q_points = quadrature_formula.size(); FEValues fe_values (stokes_fe, quadrature_formula, update_values); - std::vector > stokes_values(n_q_points, - Vector(dim+1)); + std::vector > velocity_values(n_q_points); double max_velocity = 0; + const FEValuesExtractors::Vector velocities (0); + typename DoFHandler::active_cell_iterator cell = stokes_dof_handler.begin_active(), endc = stokes_dof_handler.end(); for (; cell!=endc; ++cell) { fe_values.reinit (cell); - fe_values.get_function_values (stokes_solution, stokes_values); + fe_values[velocities].get_function_values (stokes_solution, velocity_values); for (unsigned int q=0; q velocity; - for (unsigned int i=0; i