From a40845f7ebf41fd2e558aab12692a9687ec4b740 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 11 Apr 2013 05:34:10 +0000 Subject: [PATCH] Remove warning. git-svn-id: https://svn.dealii.org/trunk@29253 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/matrix_free/step-37.cc | 52 +++++++++++++++++------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/tests/matrix_free/step-37.cc b/tests/matrix_free/step-37.cc index e3fbc8ba25..c422125579 100644 --- a/tests/matrix_free/step-37.cc +++ b/tests/matrix_free/step-37.cc @@ -125,7 +125,7 @@ namespace Step37 void reinit (const DoFHandler &dof_handler, const ConstraintMatrix &constraints, - const unsigned int level = numbers::invalid_unsigned_int); + const unsigned int level = numbers::invalid_unsigned_int); unsigned int m () const; unsigned int n () const; @@ -223,7 +223,7 @@ namespace Step37 LaplaceOperator:: evaluate_coefficient (const Coefficient &coefficient_function) { - const unsigned int n_cells = data.get_size_info().n_macro_cells; + const unsigned int n_cells = data.n_macro_cells(); FEEvaluation phi (data); coefficient.resize (n_cells * phi.n_q_points); for (unsigned int cell=0; cell phi (data); AssertDimension (coefficient.size(), - data.get_size_info().n_macro_cells * phi.n_q_points); + data.n_macro_cells() * phi.n_q_points); for (unsigned int cell=cell_range.first; cell triangulation; FE_Q fe; - DoFHandler mg_dof_handler; + DoFHandler dof_handler; ConstraintMatrix constraints; SystemMatrixType system_matrix; @@ -393,7 +393,7 @@ namespace Step37 LaplaceProblem::LaplaceProblem () : fe (degree_finite_element), - mg_dof_handler (triangulation) + dof_handler (triangulation) {} @@ -406,23 +406,23 @@ namespace Step37 mg_matrices.clear(); mg_constraints.clear(); - mg_dof_handler.distribute_dofs (fe); - mg_dof_handler.distribute_mg_dofs (fe); + dof_handler.distribute_dofs (fe); + dof_handler.distribute_mg_dofs (fe); deallog << "Number of degrees of freedom: " - << mg_dof_handler.n_dofs() + << dof_handler.n_dofs() << std::endl; constraints.clear(); - VectorTools::interpolate_boundary_values (mg_dof_handler, + VectorTools::interpolate_boundary_values (dof_handler, 0, ZeroFunction(), constraints); constraints.close(); - system_matrix.reinit (mg_dof_handler, constraints); - solution.reinit (mg_dof_handler.n_dofs()); - system_rhs.reinit (mg_dof_handler.n_dofs()); + system_matrix.reinit (dof_handler, constraints); + solution.reinit (dof_handler.n_dofs()); + system_rhs.reinit (dof_handler.n_dofs()); const unsigned int nlevels = triangulation.n_levels(); mg_matrices.resize(0, nlevels-1); @@ -432,7 +432,7 @@ namespace Step37 ZeroFunction homogeneous_dirichlet_bc (1); dirichlet_boundary[0] = &homogeneous_dirichlet_bc; std::vector > boundary_indices(triangulation.n_levels()); - MGTools::make_boundary_list (mg_dof_handler, + MGTools::make_boundary_list (dof_handler, dirichlet_boundary, boundary_indices); for (unsigned int level=0; level coefficient; std::vector coefficient_values (n_q_points); - typename DoFHandler::active_cell_iterator cell = mg_dof_handler.begin_active(), - endc = mg_dof_handler.end(); + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + endc = dof_handler.end(); for (; cell!=endc; ++cell) { cell->get_dof_indices (local_dof_indices); @@ -508,11 +508,11 @@ namespace Step37 const unsigned int n_levels = triangulation.n_levels(); std::vector > diagonals (n_levels); for (unsigned int level=0; level cell_no(triangulation.n_levels()); - typename DoFHandler::cell_iterator cell = mg_dof_handler.begin(), - endc = mg_dof_handler.end(); + typename DoFHandler::cell_iterator cell = dof_handler.begin(), + endc = dof_handler.end(); for (; cell!=endc; ++cell) { const unsigned int level = cell->level(); @@ -564,17 +564,15 @@ namespace Step37 template void LaplaceProblem::solve () { - GrowingVectorMemory<> vector_memory; - MGTransferPrebuilt > mg_transfer; - mg_transfer.build_matrices(mg_dof_handler); + mg_transfer.build_matrices(dof_handler); MGCoarseGridHouseholder > mg_coarse; mg_coarse.initialize(coarse_matrix); typedef PreconditionChebyshev > SMOOTHER; MGSmootherPrecondition > - mg_smoother(vector_memory); + mg_smoother; typename SMOOTHER::AdditionalData smoother_data; smoother_data.smoothing_range = 10.; @@ -585,7 +583,7 @@ namespace Step37 MGMatrix > mg_matrix(&mg_matrices); - Multigrid > mg(mg_dof_handler, + Multigrid > mg(dof_handler, mg_matrix, mg_coarse, mg_transfer, @@ -593,7 +591,7 @@ namespace Step37 mg_smoother); PreconditionMG, MGTransferPrebuilt > > - preconditioner(mg_dof_handler, mg, mg_transfer); + preconditioner(dof_handler, mg, mg_transfer); const std::size_t multigrid_memory = (mg_matrices.memory_consumption() + -- 2.39.5