From: Wolfgang Bangerth Date: Tue, 8 Sep 2009 03:24:04 +0000 (+0000) Subject: Only compute error indicators locally. X-Git-Tag: v8.0.0~7163 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44826b798ecb8ac6a17e127bf0ac5ccf66745c85;p=dealii.git Only compute error indicators locally. git-svn-id: https://svn.dealii.org/trunk@19410 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index da51074471..e99f883c71 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -2967,13 +2967,24 @@ template void BoussinesqFlowProblem::refine_mesh (const unsigned int max_grid_level) { computing_timer.enter_section ("Refine mesh structure, part 1"); - Vector estimated_error_per_cell (triangulation.n_active_cells()); + Vector local_estimated_error_per_cell (triangulation.n_active_cells()); KellyErrorEstimator::estimate (temperature_dof_handler, QGauss(temperature_degree+1), typename FunctionMap::type(), temperature_solution, - estimated_error_per_cell); + local_estimated_error_per_cell, + std::vector(), + 0, + 0, + Utilities::Trilinos::get_this_mpi_process(trilinos_communicator)); + + Vector x_local_estimated_error_per_cell (triangulation.n_active_cells()); + x_local_estimated_error_per_cell = local_estimated_error_per_cell; + Vector estimated_error_per_cell (triangulation.n_active_cells()); + trilinos_communicator.MaxAll (&x_local_estimated_error_per_cell(0), + &estimated_error_per_cell(0), + triangulation.n_active_cells()); GridRefinement::refine_and_coarsen_fixed_fraction (triangulation, estimated_error_per_cell,