From: Wolfgang Bangerth Date: Wed, 13 May 2020 21:26:53 +0000 (-0600) Subject: Rename a variable in step-50. X-Git-Tag: v9.3.0-rc1~1634^2~10 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=746916d23f78a6c5f5da421286f69d29a01ab7fa;p=dealii.git Rename a variable in step-50. --- diff --git a/examples/step-50/step-50.cc b/examples/step-50/step-50.cc index f28a5409d4..99af2cbc3a 100644 --- a/examples/step-50/step-50.cc +++ b/examples/step-50/step-50.cc @@ -431,7 +431,7 @@ private: MatrixFreeActiveMatrix mf_system_matrix; VectorType solution; VectorType right_hand_side; - Vector estimate_vector; + Vector error_estimator; MGLevelObject mg_matrix; MGLevelObject mg_interface_in; @@ -1222,7 +1222,7 @@ void LaplaceProblem::estimate() Coefficient coefficient; - estimate_vector.reinit(triangulation.n_active_cells()); + error_estimator.reinit(triangulation.n_active_cells()); using Iterator = typename DoFHandler::active_cell_iterator; @@ -1305,11 +1305,11 @@ void LaplaceProblem::estimate() auto copier = [&](const CopyData ©_data) { if (copy_data.cell_index != numbers::invalid_unsigned_int) - estimate_vector[copy_data.cell_index] += copy_data.value; + error_estimator[copy_data.cell_index] += copy_data.value; for (auto &cdf : copy_data.face_data) for (unsigned int j = 0; j < 2; ++j) - estimate_vector[cdf.cell_indices[j]] += cdf.values[j]; + error_estimator[cdf.cell_indices[j]] += cdf.values[j]; }; const unsigned int n_gauss_points = degree + 1; @@ -1353,7 +1353,7 @@ void LaplaceProblem::refine_grid() const double refinement_fraction = 1. / (std::pow(2.0, dim) - 1.); parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number( - triangulation, estimate_vector, refinement_fraction, 0.0); + triangulation, error_estimator, refinement_fraction, 0.0); triangulation.execute_coarsening_and_refinement(); } @@ -1387,8 +1387,8 @@ void LaplaceProblem::output_results(const unsigned int cycle) level(cell->active_cell_index()) = cell->level(); data_out.add_data_vector(level, "level"); - if (estimate_vector.size() > 0) - data_out.add_data_vector(estimate_vector, "error_estimator"); + if (error_estimator.size() > 0) + data_out.add_data_vector(error_estimator, "error_estimator"); data_out.build_patches();