]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix all deprecations in examples 4928/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 22 Aug 2017 15:22:38 +0000 (17:22 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 22 Aug 2017 15:22:38 +0000 (17:22 +0200)
examples/step-12/step-12.cc
examples/step-28/step-28.cc
examples/step-29/step-29.cc
examples/step-30/step-30.cc
examples/step-34/step-34.cc
examples/step-37/step-37.cc
examples/step-50/step-50.cc
include/deal.II/base/function.h
tests/grid/find_active_cell_around_point_01.cc

index bc39ef2c0ee6a1d0dae807e0696314fa62e221b7..5dc7a75e3b268663bfc595fbc66e711238669f06 100644 (file)
@@ -357,7 +357,7 @@ namespace Step12
     Vector<double> &local_vector = dinfo.vector(0).block(0);
 
     const std::vector<double> &JxW = fe_v.get_JxW_values ();
-    const std::vector<Tensor<1,dim> > &normals = fe_v.get_all_normal_vectors ();
+    const std::vector<Tensor<1,dim> > &normals = fe_v.get_normal_vectors ();
 
     std::vector<double> 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<double> &JxW = fe_v.get_JxW_values ();
-    const std::vector<Tensor<1,dim> > &normals = fe_v.get_all_normal_vectors ();
+    const std::vector<Tensor<1,dim> > &normals = fe_v.get_normal_vectors ();
 
     for (unsigned int point=0; point<fe_v.n_quadrature_points; ++point)
       {
index 1196de9859fe9e88df8e83f2a90e04899e703240..100d7d52514336261df537d90ad7ea87474d40b7 100644 (file)
@@ -1721,7 +1721,7 @@ namespace Step28
         std::cout << "   Cycle=" << cycle
                   << ", n_dofs=" << energy_groups[0]->n_dofs() + energy_groups[1]->n_dofs()
                   << ",  k_eff=" << k_eff
-                  << ", time=" << timer()
+                  << ", time=" << timer.cpu_time()
                   << std::endl;
 
 
index 1d6acef8ba90edd8cf3226dd2607debd3b84bb7b..42a64566ec6e812e5fb6dcdca80992f60cf52719 100644 (file)
@@ -504,7 +504,7 @@ namespace Step29
     // function:
     timer.stop ();
     deallog << "done ("
-            << timer()
+            << timer.cpu_time()
             << "s)"
             << std::endl;
 
@@ -539,7 +539,7 @@ namespace Step29
 
     timer.stop ();
     deallog << "done ("
-            << timer()
+            << timer.cpu_time()
             << "s)"
             << std::endl;
 
@@ -779,7 +779,7 @@ namespace Step29
 
     timer.stop ();
     deallog << "done ("
-            << timer()
+            << timer.cpu_time()
             << "s)"
             << std::endl;
   }
@@ -823,7 +823,7 @@ namespace Step29
 
     timer.stop ();
     deallog << "done ("
-            << timer ()
+            << timer.cpu_time()
             << "s)"
             << std::endl;
   }
@@ -895,7 +895,7 @@ namespace Step29
 
     timer.stop ();
     deallog << "done ("
-            << timer()
+            << timer.cpu_time()
             << "s)"
             << std::endl;
   }
index a4f8f113fb3da79efa2ccddbe7eba0b43fae9da8..b67f895e65317c3742f063eb9dd5083f1ff5faff 100644 (file)
@@ -235,7 +235,7 @@ namespace Step30
     Vector<double> &cell_vector) const
   {
     const std::vector<double> &JxW = fe_v.get_JxW_values ();
-    const std::vector<Tensor<1,dim> > &normals = fe_v.get_all_normal_vectors ();
+    const std::vector<Tensor<1,dim> > &normals = fe_v.get_normal_vectors ();
 
     std::vector<Point<dim> > beta (fe_v.n_quadrature_points);
     std::vector<double> g(fe_v.n_quadrature_points);
@@ -273,7 +273,7 @@ namespace Step30
     FullMatrix<double> &ue_ve_matrix) const
   {
     const std::vector<double> &JxW = fe_v.get_JxW_values ();
-    const std::vector<Tensor<1,dim> > &normals = fe_v.get_all_normal_vectors ();
+    const std::vector<Tensor<1,dim> > &normals = fe_v.get_normal_vectors ();
 
     std::vector<Point<dim> > 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);
 
index e6b66e28c599c76ac51a8a1fc0b6744767105a64..566102d4859490e9ce1c090d167657853cb67b35 100644 (file)
@@ -607,7 +607,7 @@ namespace Step34
         cell->get_dof_indices(local_dof_indices);
 
         const std::vector<Point<dim> >    &q_points = fe_v.get_quadrature_points();
-        const std::vector<Tensor<1,dim> > &normals  = fe_v.get_all_normal_vectors();
+        const std::vector<Tensor<1,dim> > &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<Vector<double> > singular_cell_wind( singular_quadrature.size(),
                                                                  Vector<double>(dim) );
 
-                const std::vector<Tensor<1,dim> > &singular_normals  = fe_v_singular.get_all_normal_vectors();
+                const std::vector<Tensor<1,dim> > &singular_normals  = fe_v_singular.get_normal_vectors();
                 const std::vector<Point<dim> >    &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<Point<dim> >    &q_points = fe_v.get_quadrature_points();
-        const std::vector<Tensor<1,dim> > &normals  = fe_v.get_all_normal_vectors();
+        const std::vector<Tensor<1,dim> > &normals  = fe_v.get_normal_vectors();
 
         cell->get_dof_indices(dofs);
         fe_v.get_function_values(phi, local_phi);
index 6033e0f9f93ef389672c30f44110df38c9e17be2..3a75f2f5cb4d5603e18d1c1ae00f12ca0178084c 100644 (file)
@@ -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<dim,float> 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<LinearAlgebra::distributed::Vector<double> > 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";
   }
 
index f160f778416899bf333cab97301a48cad04cf26e..140736deef1e4ad6c8cae4c7e89ba3ac58a0a67d 100644 (file)
@@ -704,9 +704,8 @@ namespace Step50
     SolverControl coarse_solver_control (1000, 1e-10, false, false);
     SolverCG<vector_t> coarse_solver(coarse_solver_control);
     PreconditionIdentity id;
-    MGCoarseGridLACIteration<SolverCG<vector_t>,vector_t> coarse_grid_solver(coarse_solver,
-        coarse_matrix,
-        id);
+    MGCoarseGridIterativeSolver<vector_t, SolverCG<vector_t>, 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<vector_t > mg(mg_dof_handler,
-                            mg_matrix,
+    Multigrid<vector_t > mg(mg_matrix,
                             coarse_grid_solver,
                             mg_transfer,
                             mg_smoother,
index 2148794aa44534195d6fa317b8a7e15816ad2471..b0b82a199229fc8ac526ce13b7eb9aeb2d6115ad 100644 (file)
@@ -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<dim, Number> &f);
+  virtual void substitute_function_value_with (const Functions::ConstantFunction<dim, Number> &f);
 
   /**
    * Return the value of the function at the given point for all components.
index e8cec9574f88a5d2b9d27b79fe910932512ac03b..3690eece8c1b349cc8cdc158efcde39724e7af58 100644 (file)
@@ -35,7 +35,7 @@
 
 
 template <int dim, int spacedim>
-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;
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.