From: Wolfgang Bangerth Date: Tue, 30 Dec 2014 02:49:06 +0000 (-0600) Subject: Remove deprecated functions MeshWorker::loop and MeshWorker::integration_loop. X-Git-Tag: v8.3.0-rc1~566^2~18 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95b98fbf6ac06096b750c466a90596a19b66aff9;p=dealii.git Remove deprecated functions MeshWorker::loop and MeshWorker::integration_loop. --- diff --git a/doc/news/changes.h b/doc/news/changes.h index bd92a5a891..ca46883a44 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -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.
  • Removed: The config.h file no longer exports HAVE_* definitions. diff --git a/include/deal.II/meshworker/loop.h b/include/deal.II/meshworker/loop.h index 878c2baaf3..754e2e703c 100644 --- a/include/deal.II/meshworker/loop.h +++ b/include/deal.II/meshworker/loop.h @@ -408,93 +408,6 @@ namespace MeshWorker #endif } - template - void loop(ITERATOR begin, - typename identity::type end, - DOFINFO &dinfo, - INFOBOX &info, - const std_cxx11::function &cell_worker, - const std_cxx11::function &boundary_worker, - const std_cxx11::function &face_worker, - ASSEMBLER &assembler, - bool cells_first, - bool unique_faces_only = true) DEAL_II_DEPRECATED; - - template - void loop(ITERATOR begin, - typename identity::type end, - DOFINFO &dinfo, - INFOBOX &info, - const std_cxx11::function &cell_worker, - const std_cxx11::function &boundary_worker, - const std_cxx11::function &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(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 - void integration_loop(ITERATOR begin, - typename identity::type end, - DoFInfo &dof_info, - IntegrationInfoBox &box, - const std_cxx11::function&, IntegrationInfo&)> &cell_worker, - const std_cxx11::function&, IntegrationInfo&)> &boundary_worker, - const std_cxx11::function &, DoFInfo &, - IntegrationInfo &, - IntegrationInfo &)> &face_worker, - ASSEMBLER &assembler, - bool cells_first) DEAL_II_DEPRECATED; - - - template - void integration_loop(ITERATOR begin, - typename identity::type end, - DoFInfo &dof_info, - IntegrationInfoBox &box, - const std_cxx11::function&, IntegrationInfo&)> &cell_worker, - const std_cxx11::function&, IntegrationInfo&)> &boundary_worker, - const std_cxx11::function &, DoFInfo &, - IntegrationInfo &, - IntegrationInfo &)> &face_worker, - ASSEMBLER &assembler, - bool cells_first) - { - LoopControl lctrl; - - loop - (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 - void integration_loop(ITERATOR begin, - typename identity::type end, - DoFInfo &dof_info, - IntegrationInfoBox &box, - const LocalIntegrator &integrator, - ASSEMBLER &assembler, - bool cells_first) - DEAL_II_DEPRECATED; - - template - void integration_loop(ITERATOR begin, - typename identity::type end, - DoFInfo &dof_info, - IntegrationInfoBox &box, - const LocalIntegrator &integrator, - ASSEMBLER &assembler, - bool cells_first) - { - std_cxx11::function&, IntegrationInfo&)> cell_worker; - std_cxx11::function&, IntegrationInfo&)> boundary_worker; - std_cxx11::function &, DoFInfo &, - IntegrationInfo &, - IntegrationInfo &)> face_worker; - if (integrator.use_cell) - cell_worker = std_cxx11::bind(&LocalIntegrator::cell, &integrator, std_cxx11::_1, std_cxx11::_2); - if (integrator.use_boundary) - boundary_worker = std_cxx11::bind(&LocalIntegrator::boundary, &integrator, std_cxx11::_1, std_cxx11::_2); - if (integrator.use_face) - face_worker = std_cxx11::bind(&LocalIntegrator::face, &integrator, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4); - - loop - (begin, end, - dof_info, - box, - cell_worker, - boundary_worker, - face_worker, - assembler, - cells_first); - } - - /** - * As above but using LoopControl - */ - template void integration_loop(ITERATOR begin, typename identity::type end, DoFInfo &dof_info, diff --git a/tests/integrators/cells_and_faces_01.cc b/tests/integrators/cells_and_faces_01.cc index 76c0f7c526..96e654f4f6 100644 --- a/tests/integrators/cells_and_faces_01.cc +++ b/tests/integrators/cells_and_faces_01.cc @@ -112,13 +112,17 @@ test_mesh(MGDoFHandler &mgdofs) MeshWorker::Assembler::CellsAndFaces assembler; assembler.initialize(out_data, true); + MeshWorker::LoopControl lctrl; + lctrl.cells_first = true; + lctrl.own_faces = MeshWorker::LoopControl::one; + MeshWorker::loop, EmptyInfoBox> (dofs.begin_active(), dofs.end(), dof_info, info_box, std_cxx11::bind (&Local::cell, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::bdry, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::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 &mgdofs) std_cxx11::bind (&Local::cell, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::bdry, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::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 &mgdofs) MeshWorker::Assembler::Functional assembler; assembler.initialize(n_functionals); + MeshWorker::LoopControl lctrl; + lctrl.cells_first = true; + lctrl.own_faces = MeshWorker::LoopControl::one; + MeshWorker::loop, EmptyInfoBox> (dofs.begin_active(), dofs.end(), dof_info, info_box, std_cxx11::bind (&Local::cell, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::bdry, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::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 &mgdofs) std_cxx11::bind (&Local::cell, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::bdry, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::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 &mgdofs) assembler; assembler.initialize(matrix, v); + MeshWorker::LoopControl lctrl; + lctrl.cells_first = true; + lctrl.own_faces = MeshWorker::LoopControl::one; MeshWorker::loop, MeshWorker::IntegrationInfoBox > (dofs.begin_active(), dofs.end(), dof_info, info_box, std_cxx11::bind (&Local::cell, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::bdry, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::face, local, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4), - assembler, true); + assembler, lctrl); for (unsigned int i=0; i, MeshWorker::IntegrationInfoBox > (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::integrate_face_term, this, std_cxx11::_1, std_cxx11::_2, std_cxx11::_3, std_cxx11::_4), - assembler, true); + assembler, lctrl); }//assemble_system diff --git a/tests/integrators/mesh_worker_matrix_01.cc b/tests/integrators/mesh_worker_matrix_01.cc index fb91a4ed7a..8d3535f7f6 100644 --- a/tests/integrators/mesh_worker_matrix_01.cc +++ b/tests/integrators/mesh_worker_matrix_01.cc @@ -150,13 +150,16 @@ test_simple(DoFHandler &dofs, bool faces) MeshWorker::Assembler::MatrixSimple > assembler; assembler.initialize(matrix); + MeshWorker::LoopControl lctrl; + lctrl.cells_first = true; + lctrl.own_faces = MeshWorker::LoopControl::one; MeshWorker::loop, MeshWorker::IntegrationInfoBox > (dofs.begin_active(), dofs.end(), dof_info, info_box, std_cxx11::bind (&Local::cell, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::bdry, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::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); diff --git a/tests/mpi/mesh_worker_matrix_01.cc b/tests/mpi/mesh_worker_matrix_01.cc index 7de6551d69..5450565300 100644 --- a/tests/mpi/mesh_worker_matrix_01.cc +++ b/tests/mpi/mesh_worker_matrix_01.cc @@ -155,13 +155,16 @@ test_simple(DoFHandler &dofs, bool faces) FilteredIterator::active_cell_iterator> end(IteratorFilters::LocallyOwnedCell(), dofs.end()); + MeshWorker::LoopControl lctrl; + lctrl.cells_first = true; + lctrl.own_faces = MeshWorker::LoopControl::one; MeshWorker::loop, MeshWorker::IntegrationInfoBox > (cell, end, dof_info, info_box, std_cxx11::bind (&Local::cell, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::bdry, local, std_cxx11::_1, std_cxx11::_2), std_cxx11::bind (&Local::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());