From: Daniel Arndt Date: Tue, 22 Aug 2017 15:22:38 +0000 (+0200) Subject: Fix all deprecations in examples X-Git-Tag: v9.0.0-rc1~1190^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a49a4c0b276ae0cebc456977cdc8bf4f556bcdd;p=dealii.git Fix all deprecations in examples --- diff --git a/examples/step-12/step-12.cc b/examples/step-12/step-12.cc index bc39ef2c0e..5dc7a75e3b 100644 --- a/examples/step-12/step-12.cc +++ b/examples/step-12/step-12.cc @@ -357,7 +357,7 @@ namespace Step12 Vector &local_vector = dinfo.vector(0).block(0); const std::vector &JxW = fe_v.get_JxW_values (); - const std::vector > &normals = fe_v.get_all_normal_vectors (); + const std::vector > &normals = fe_v.get_normal_vectors (); std::vector g(fe_v.n_quadrature_points); @@ -421,7 +421,7 @@ namespace Step12 // solution and the right hand side does not receive any contributions. const std::vector &JxW = fe_v.get_JxW_values (); - const std::vector > &normals = fe_v.get_all_normal_vectors (); + const std::vector > &normals = fe_v.get_normal_vectors (); for (unsigned int point=0; point &cell_vector) const { const std::vector &JxW = fe_v.get_JxW_values (); - const std::vector > &normals = fe_v.get_all_normal_vectors (); + const std::vector > &normals = fe_v.get_normal_vectors (); std::vector > beta (fe_v.n_quadrature_points); std::vector g(fe_v.n_quadrature_points); @@ -273,7 +273,7 @@ namespace Step30 FullMatrix &ue_ve_matrix) const { const std::vector &JxW = fe_v.get_JxW_values (); - const std::vector > &normals = fe_v.get_all_normal_vectors (); + const std::vector > &normals = fe_v.get_normal_vectors (); std::vector > beta (fe_v.n_quadrature_points); @@ -952,7 +952,7 @@ namespace Step30 Timer assemble_timer; assemble_system2 (); std::cout << "Time of assemble_system2: " - << assemble_timer() + << assemble_timer.cpu_time() << std::endl; solve (solution2); diff --git a/examples/step-34/step-34.cc b/examples/step-34/step-34.cc index e6b66e28c5..566102d485 100644 --- a/examples/step-34/step-34.cc +++ b/examples/step-34/step-34.cc @@ -607,7 +607,7 @@ namespace Step34 cell->get_dof_indices(local_dof_indices); const std::vector > &q_points = fe_v.get_quadrature_points(); - const std::vector > &normals = fe_v.get_all_normal_vectors(); + const std::vector > &normals = fe_v.get_normal_vectors(); wind.vector_value_list(q_points, cell_wind); // We then form the integral over the current cell for all degrees of @@ -692,7 +692,7 @@ namespace Step34 std::vector > singular_cell_wind( singular_quadrature.size(), Vector(dim) ); - const std::vector > &singular_normals = fe_v_singular.get_all_normal_vectors(); + const std::vector > &singular_normals = fe_v_singular.get_normal_vectors(); const std::vector > &singular_q_points = fe_v_singular.get_quadrature_points(); wind.vector_value_list(singular_q_points, singular_cell_wind); @@ -964,7 +964,7 @@ namespace Step34 fe_v.reinit(cell); const std::vector > &q_points = fe_v.get_quadrature_points(); - const std::vector > &normals = fe_v.get_all_normal_vectors(); + const std::vector > &normals = fe_v.get_normal_vectors(); cell->get_dof_indices(dofs); fe_v.get_function_values(phi, local_phi); diff --git a/examples/step-37/step-37.cc b/examples/step-37/step-37.cc index 6033e0f9f9..3a75f2f5cb 100644 --- a/examples/step-37/step-37.cc +++ b/examples/step-37/step-37.cc @@ -832,7 +832,7 @@ namespace Step37 constraints.close(); setup_time += time.wall_time(); time_details << "Distribute DoFs & B.C. (CPU/wall) " - << time() << "s/" << time.wall_time() << "s" << std::endl; + << time.cpu_time() << "s/" << time.wall_time() << "s" << std::endl; time.restart(); { @@ -855,7 +855,7 @@ namespace Step37 setup_time += time.wall_time(); time_details << "Setup matrix-free system (CPU/wall) " - << time() << "s/" << time.wall_time() << "s" << std::endl; + << time.cpu_time() << "s/" << time.wall_time() << "s" << std::endl; time.restart(); // Next, initialize the matrices for the multigrid method on all the @@ -902,7 +902,7 @@ namespace Step37 } setup_time += time.wall_time(); time_details << "Setup matrix-free levels (CPU/wall) " - << time() << "s/" << time.wall_time() << "s" << std::endl; + << time.cpu_time() << "s/" << time.wall_time() << "s" << std::endl; } @@ -936,7 +936,7 @@ namespace Step37 setup_time += time.wall_time(); time_details << "Assemble right hand side (CPU/wall) " - << time() << "s/" << time.wall_time() << "s" << std::endl; + << time.cpu_time() << "s/" << time.wall_time() << "s" << std::endl; } @@ -955,7 +955,7 @@ namespace Step37 MGTransferMatrixFree mg_transfer(mg_constrained_dofs); mg_transfer.build(dof_handler); setup_time += time.wall_time(); - time_details << "MG build transfer time (CPU/wall) " << time() + time_details << "MG build transfer time (CPU/wall) " << time.cpu_time() << "s/" << time.wall_time() << "s\n"; time.restart(); @@ -1089,7 +1089,7 @@ namespace Step37 SolverControl solver_control (100, 1e-12*system_rhs.l2_norm()); SolverCG > cg (solver_control); setup_time += time.wall_time(); - time_details << "MG build smoother time (CPU/wall) " << time() + time_details << "MG build smoother time (CPU/wall) " << time.cpu_time() << "s/" << time.wall_time() << "s\n"; pcout << "Total setup time (wall) " << setup_time << "s\n"; @@ -1103,7 +1103,7 @@ namespace Step37 pcout << "Time solve (" << solver_control.last_step() - << " iterations) (CPU/wall) " << time() << "s/" + << " iterations) (CPU/wall) " << time.cpu_time() << "s/" << time.wall_time() << "s\n"; } diff --git a/examples/step-50/step-50.cc b/examples/step-50/step-50.cc index f160f77841..140736deef 100644 --- a/examples/step-50/step-50.cc +++ b/examples/step-50/step-50.cc @@ -704,9 +704,8 @@ namespace Step50 SolverControl coarse_solver_control (1000, 1e-10, false, false); SolverCG coarse_solver(coarse_solver_control); PreconditionIdentity id; - MGCoarseGridLACIteration,vector_t> coarse_grid_solver(coarse_solver, - coarse_matrix, - id); + MGCoarseGridIterativeSolver, matrix_t, PreconditionIdentity> + coarse_grid_solver(coarse_solver, coarse_matrix, id); // The next component of a multilevel solver or preconditioner is // that we need a smoother on each level. A common choice for this @@ -765,8 +764,7 @@ namespace Step50 // Now, we are ready to set up the // V-cycle operator and the // multilevel preconditioner. - Multigrid mg(mg_dof_handler, - mg_matrix, + Multigrid mg(mg_matrix, coarse_grid_solver, mg_transfer, mg_smoother, diff --git a/include/deal.II/base/function.h b/include/deal.II/base/function.h index 2148794aa4..b0b82a1992 100644 --- a/include/deal.II/base/function.h +++ b/include/deal.II/base/function.h @@ -525,7 +525,7 @@ public: * beginning. So the number of components of @p f cannot be less than the * calling object. */ - virtual void substitute_function_value_with (const ConstantFunction &f); + virtual void substitute_function_value_with (const Functions::ConstantFunction &f); /** * Return the value of the function at the given point for all components. diff --git a/tests/grid/find_active_cell_around_point_01.cc b/tests/grid/find_active_cell_around_point_01.cc index e8cec9574f..3690eece8c 100644 --- a/tests/grid/find_active_cell_around_point_01.cc +++ b/tests/grid/find_active_cell_around_point_01.cc @@ -35,7 +35,7 @@ template -double test(unsigned int n_ref, unsigned int n_points) +void test(unsigned int n_ref, unsigned int n_points) { deallog << "Testing " << dim << ", " << spacedim << std::endl;