]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove deprecated functions MeshWorker::loop and MeshWorker::integration_loop.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 30 Dec 2014 02:49:06 +0000 (20:49 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 4 Jan 2015 21:13:43 +0000 (15:13 -0600)
doc/news/changes.h
include/deal.II/meshworker/loop.h
tests/integrators/cells_and_faces_01.cc
tests/integrators/functional_01.cc
tests/integrators/mesh_worker_01.cc
tests/integrators/mesh_worker_1d_dg.cc
tests/integrators/mesh_worker_matrix_01.cc
tests/mpi/mesh_worker_matrix_01.cc

index bd92a5a8918bbfc7361205f1e84508b5be6034ef..ca46883a4423d57a204161c7f240945f3435b5ef 100644 (file)
@@ -42,8 +42,8 @@ inconvenience this causes.
   been deprecated and that were previously already marked as
   deprecated (i.e., they would have yielded warnings by the compiler whenever
   you tried to use them). Specifically, these are:
-  - TimeDependent::end_sweep (with an argument)
-  - PointValueHistory::mark_locations
+  - TimeDependent::end_sweep (with an argument).
+  - PointValueHistory::mark_locations.
   - The DataPostprocessor::compute_derived_quantities_scalar and
     DataPostprocessor::compute_derived_quantities_vector functions without
     evaluation points. If you have
@@ -52,6 +52,7 @@ inconvenience this causes.
     functions of same name but with the evaluation point argument instead.
   - The constructors of classes MGSmoother, MGSmootherRelaxation and
     MGSmootherPrecondition that take a VectorMemory object.
+  - Deprecated variants of MeshWorker::loop and MeshWorker::integration_loop.
 </ol>
 
   <li> Removed: The config.h file no longer exports HAVE_* definitions.
index 878c2baaf3641ac33978e543d7153e7d1c71f888..754e2e703c216a844fe543fb6d30626660cc1328 100644 (file)
@@ -408,93 +408,6 @@ namespace MeshWorker
 #endif
   }
 
-  template<int dim, int spacedim, class DOFINFO, class INFOBOX, class ASSEMBLER, class ITERATOR>
-  void loop(ITERATOR begin,
-            typename identity<ITERATOR>::type end,
-            DOFINFO &dinfo,
-            INFOBOX &info,
-            const std_cxx11::function<void (DOFINFO &, typename INFOBOX::CellInfo &)> &cell_worker,
-            const std_cxx11::function<void (DOFINFO &, typename INFOBOX::CellInfo &)> &boundary_worker,
-            const std_cxx11::function<void (DOFINFO &, DOFINFO &,
-                                            typename INFOBOX::CellInfo &,
-                                            typename INFOBOX::CellInfo &)> &face_worker,
-            ASSEMBLER &assembler,
-            bool cells_first,
-            bool unique_faces_only = true) DEAL_II_DEPRECATED;
-
-  template<int dim, int spacedim, class DOFINFO, class INFOBOX, class ASSEMBLER, class ITERATOR>
-  void loop(ITERATOR begin,
-            typename identity<ITERATOR>::type end,
-            DOFINFO &dinfo,
-            INFOBOX &info,
-            const std_cxx11::function<void (DOFINFO &, typename INFOBOX::CellInfo &)> &cell_worker,
-            const std_cxx11::function<void (DOFINFO &, typename INFOBOX::CellInfo &)> &boundary_worker,
-            const std_cxx11::function<void (DOFINFO &, DOFINFO &,
-                                            typename INFOBOX::CellInfo &,
-                                            typename INFOBOX::CellInfo &)> &face_worker,
-            ASSEMBLER &assembler,
-            bool cells_first,
-            bool unique_faces_only)
-  {
-    LoopControl lctrl;
-    lctrl.cells_first = cells_first;
-    lctrl.own_faces = (unique_faces_only)
-                      ? LoopControl::one
-                      : LoopControl::both;
-
-    loop<dim,spacedim>(begin, end, dinfo, info, cell_worker, boundary_worker, face_worker, assembler, lctrl);
-  }
-
-  /**
-   * @deprecated The simplification in this loop is insignificant. Therefore,
-   * it is recommended to use loop() instead.
-   *
-   * Simplified interface for loop() if specialized for integration.
-   *
-   * @ingroup MeshWorker
-   * @author Guido Kanschat, 2009
-   */
-  template<int dim, int spacedim, class ITERATOR, class ASSEMBLER>
-  void integration_loop(ITERATOR begin,
-                        typename identity<ITERATOR>::type end,
-                        DoFInfo<dim, spacedim> &dof_info,
-                        IntegrationInfoBox<dim, spacedim> &box,
-                        const std_cxx11::function<void (DoFInfo<dim>&, IntegrationInfo<dim, spacedim>&)> &cell_worker,
-                        const std_cxx11::function<void (DoFInfo<dim>&, IntegrationInfo<dim, spacedim>&)> &boundary_worker,
-                        const std_cxx11::function<void (DoFInfo<dim> &, DoFInfo<dim> &,
-                                                        IntegrationInfo<dim, spacedim> &,
-                                                        IntegrationInfo<dim, spacedim> &)> &face_worker,
-                        ASSEMBLER &assembler,
-                        bool cells_first) DEAL_II_DEPRECATED;
-
-
-  template<int dim, int spacedim, class ITERATOR, class ASSEMBLER>
-  void integration_loop(ITERATOR begin,
-                        typename identity<ITERATOR>::type end,
-                        DoFInfo<dim, spacedim> &dof_info,
-                        IntegrationInfoBox<dim, spacedim> &box,
-                        const std_cxx11::function<void (DoFInfo<dim>&, IntegrationInfo<dim, spacedim>&)> &cell_worker,
-                        const std_cxx11::function<void (DoFInfo<dim>&, IntegrationInfo<dim, spacedim>&)> &boundary_worker,
-                        const std_cxx11::function<void (DoFInfo<dim> &, DoFInfo<dim> &,
-                                                        IntegrationInfo<dim, spacedim> &,
-                                                        IntegrationInfo<dim, spacedim> &)> &face_worker,
-                        ASSEMBLER &assembler,
-                        bool cells_first)
-  {
-    LoopControl lctrl;
-
-    loop<dim, spacedim>
-    (begin, end,
-     dof_info,
-     box,
-     cell_worker,
-     boundary_worker,
-     face_worker,
-     assembler,
-     cells_first,
-     lctrl);
-  }
-
 
   /**
    * Simplified interface for loop() if specialized for integration, using the
@@ -504,51 +417,6 @@ namespace MeshWorker
    * @author Guido Kanschat, 2009
    */
   template<int dim, int spacedim, class ITERATOR, class ASSEMBLER>
-  void integration_loop(ITERATOR begin,
-                        typename identity<ITERATOR>::type end,
-                        DoFInfo<dim, spacedim> &dof_info,
-                        IntegrationInfoBox<dim, spacedim> &box,
-                        const LocalIntegrator<dim, spacedim> &integrator,
-                        ASSEMBLER &assembler,
-                        bool cells_first)
-  DEAL_II_DEPRECATED;
-
-  template<int dim, int spacedim, class ITERATOR, class ASSEMBLER>
-  void integration_loop(ITERATOR begin,
-                        typename identity<ITERATOR>::type end,
-                        DoFInfo<dim, spacedim> &dof_info,
-                        IntegrationInfoBox<dim, spacedim> &box,
-                        const LocalIntegrator<dim, spacedim> &integrator,
-                        ASSEMBLER &assembler,
-                        bool cells_first)
-  {
-    std_cxx11::function<void (DoFInfo<dim>&, IntegrationInfo<dim, spacedim>&)> cell_worker;
-    std_cxx11::function<void (DoFInfo<dim>&, IntegrationInfo<dim, spacedim>&)> boundary_worker;
-    std_cxx11::function<void (DoFInfo<dim> &, DoFInfo<dim> &,
-                              IntegrationInfo<dim, spacedim> &,
-                              IntegrationInfo<dim, spacedim> &)> face_worker;
-    if (integrator.use_cell)
-      cell_worker = std_cxx11::bind(&LocalIntegrator<dim, spacedim>::cell, &integrator, std_cxx11::_1, std_cxx11::_2);
-    if (integrator.use_boundary)
-      boundary_worker = std_cxx11::bind(&LocalIntegrator<dim, spacedim>::boundary, &integrator, std_cxx11::_1, std_cxx11::_2);
-    if (integrator.use_face)
-      face_worker = std_cxx11::bind(&LocalIntegrator<dim, spacedim>::face, &integrator, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4);
-
-    loop<dim, spacedim>
-    (begin, end,
-     dof_info,
-     box,
-     cell_worker,
-     boundary_worker,
-     face_worker,
-     assembler,
-     cells_first);
-  }
-
-  /**
-   * As above but using LoopControl
-   */
-  template<int dim, int spacedim, class ITERATOR, class ASSEMBLER>
   void integration_loop(ITERATOR begin,
                         typename identity<ITERATOR>::type end,
                         DoFInfo<dim, spacedim> &dof_info,
index 76c0f7c5266ff23346e05ba086373551714bbcd7..96e654f4f606a227a181d457d93f2bcbb83cf46b 100644 (file)
@@ -112,13 +112,17 @@ test_mesh(MGDoFHandler<dim> &mgdofs)
   MeshWorker::Assembler::CellsAndFaces<double> assembler;
   assembler.initialize(out_data, true);
 
+  MeshWorker::LoopControl lctrl;
+  lctrl.cells_first = true;
+  lctrl.own_faces = MeshWorker::LoopControl::one;
+
   MeshWorker::loop<dim, dim, MeshWorker::DoFInfo<dim>, EmptyInfoBox>
   (dofs.begin_active(), dofs.end(),
    dof_info, info_box,
    std_cxx11::bind (&Local<dim>::cell, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::bdry, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::face, local, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4),
-   assembler, true);
+   assembler, lctrl);
 
   deallog << "  Results cells";
   for (unsigned int i=0; i<n_functionals; ++i)
@@ -140,7 +144,7 @@ test_mesh(MGDoFHandler<dim> &mgdofs)
    std_cxx11::bind (&Local<dim>::cell, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::bdry, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::face, local, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4),
-   assembler, true);
+   assembler, lctrl);
 
   deallog << "MGResults cells";
   for (unsigned int i=0; i<n_functionals; ++i)
index c7d4a3861c094a1b94f4a5273ff1ee2c127239b0..2f6be91ba35c682b40402ddc829b7618954dfd4c 100644 (file)
@@ -95,13 +95,17 @@ test_mesh(MGDoFHandler<dim> &mgdofs)
   MeshWorker::Assembler::Functional<double> assembler;
   assembler.initialize(n_functionals);
 
+  MeshWorker::LoopControl lctrl;
+  lctrl.cells_first = true;
+  lctrl.own_faces = MeshWorker::LoopControl::one;
+
   MeshWorker::loop<dim, dim, MeshWorker::DoFInfo<dim>, EmptyInfoBox>
   (dofs.begin_active(), dofs.end(),
    dof_info, info_box,
    std_cxx11::bind (&Local<dim>::cell, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::bdry, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::face, local, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4),
-   assembler, true);
+   assembler, lctrl);
 
   deallog << "  Results";
   for (unsigned int i=0; i<n_functionals; ++i)
@@ -116,7 +120,7 @@ test_mesh(MGDoFHandler<dim> &mgdofs)
    std_cxx11::bind (&Local<dim>::cell, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::bdry, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::face, local, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4),
-   assembler, true);
+   assembler, lctrl);
 
   deallog << "MGResults";
   for (unsigned int i=0; i<n_functionals; ++i)
index 4e72af0980973b7fcd0d04aa203d7bf926475481..bc3504acc14d9d6400bdbb39a48ce7ca80919faf 100644 (file)
@@ -145,13 +145,16 @@ test_simple(MGDoFHandler<dim> &mgdofs)
   assembler;
   assembler.initialize(matrix, v);
 
+  MeshWorker::LoopControl lctrl;
+  lctrl.cells_first = true;
+  lctrl.own_faces = MeshWorker::LoopControl::one;
   MeshWorker::loop<dim, dim, MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >
   (dofs.begin_active(), dofs.end(),
    dof_info, info_box,
    std_cxx11::bind (&Local<dim>::cell, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::bdry, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::face, local, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4),
-   assembler, true);
+   assembler, lctrl);
 
   for (unsigned int i=0; i<v.size(); ++i)
     deallog << ' ' << std::setprecision(3) << v(i);
index 89ee5b0e9cfa14327c0a6d1cac41b49f40876de1..87b20997bca7eaf9e12d5e2b00063d55383f59a2 100644 (file)
@@ -251,6 +251,10 @@ namespace Advection
     data.add(rhs, "Residual");
     assembler.initialize(data);
 
+    MeshWorker::LoopControl lctrl;
+    lctrl.cells_first = true;
+    lctrl.own_faces = MeshWorker::LoopControl::one;
+
     MeshWorker::loop<dim, dim, MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >
     (dof_handler.begin_active(), dof_handler.end(),
      dof_info, info_box,
@@ -260,7 +264,7 @@ namespace Advection
                      this, std_cxx11::_1, std_cxx11::_2),
      std_cxx11::bind(&AdvectionProblem<dim>::integrate_face_term,
                      this, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4),
-     assembler, true);
+     assembler, lctrl);
 
   }//assemble_system
 
index fb91a4ed7ac18470cd7e02b1cb613337d7c90fc8..8d3535f7f6b814b26776db65fd57ded8031a7976 100644 (file)
@@ -150,13 +150,16 @@ test_simple(DoFHandler<dim> &dofs, bool faces)
   MeshWorker::Assembler::MatrixSimple<SparseMatrix<double> > assembler;
   assembler.initialize(matrix);
 
+  MeshWorker::LoopControl lctrl;
+  lctrl.cells_first = true;
+  lctrl.own_faces = MeshWorker::LoopControl::one;
   MeshWorker::loop<dim, dim, MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >
   (dofs.begin_active(), dofs.end(),
    dof_info, info_box,
    std_cxx11::bind (&Local<dim>::cell, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::bdry, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::face, local, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4),
-   assembler, true);
+   assembler, lctrl);
 
   //matrix.print_formatted(deallog.get_file_stream(), 0, false, 4);
   matrix.print(deallog.get_file_stream(), false, false);
index 7de6551d698f2e039299236fa98510a067302534..5450565300b5799d26465285014c344abd6c6705 100644 (file)
@@ -155,13 +155,16 @@ test_simple(DoFHandler<dim> &dofs, bool faces)
   FilteredIterator<typename DoFHandler<dim>::active_cell_iterator>
   end(IteratorFilters::LocallyOwnedCell(), dofs.end());
 
+  MeshWorker::LoopControl lctrl;
+  lctrl.cells_first = true;
+  lctrl.own_faces = MeshWorker::LoopControl::one;
   MeshWorker::loop<dim, dim, MeshWorker::DoFInfo<dim>, MeshWorker::IntegrationInfoBox<dim> >
   (cell, end,
    dof_info, info_box,
    std_cxx11::bind (&Local<dim>::cell, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::bdry, local, std_cxx11::_1, std_cxx11::_2),
    std_cxx11::bind (&Local<dim>::face, local, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4),
-   assembler, true);
+   assembler, lctrl);
 
   matrix.compress(VectorOperation::add);
   matrix.print(deallog.get_file_stream());

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.