From: kanschat Date: Sun, 28 Mar 2010 20:06:26 +0000 (+0000) Subject: make function call to MeshWorker::integration_loop easier X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=121a9593b3056472f7b87b84cf54eb77fee11585;p=dealii-svn.git make function call to MeshWorker::integration_loop easier git-svn-id: https://svn.dealii.org/trunk@20905 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/mesh_worker_loop.h b/deal.II/deal.II/include/numerics/mesh_worker_loop.h index 24f60454ee..291cb80883 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_loop.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_loop.h @@ -230,14 +230,14 @@ namespace MeshWorker * @ingroup MeshWorker * @author Guido Kanschat, 2009 */ - template + template void loop(ITERATOR begin, typename identity::type end, DOFINFO& dinfo, INFOBOX& info, - const std_cxx1x::function&, typename INFOBOX::CellInfo &)> &cell_worker, - const std_cxx1x::function&, typename INFOBOX::FaceInfo &)> &boundary_worker, - const std_cxx1x::function&, DoFInfo&, + const std_cxx1x::function &cell_worker, + const std_cxx1x::function &boundary_worker, + const std_cxx1x::function &face_worker, ASSEMBLER &assembler, @@ -272,18 +272,20 @@ namespace MeshWorker * @ingroup MeshWorker * @author Guido Kanschat, 2009 */ - template + template void integration_loop(ITERATOR begin, typename identity::type end, - DOFINFO& dof_info, - IntegrationInfoBox& box, - const std_cxx1x::function&, CELLINFO &)> &cell_worker, - const std_cxx1x::function&, FACEINFO &)> &boundary_worker, - const std_cxx1x::function&, DoFInfo&, FACEINFO &, FACEINFO &)> &face_worker, + DoFInfo& dof_info, + IntegrationInfoBox& box, + const std_cxx1x::function&, IntegrationInfo&)> &cell_worker, + const std_cxx1x::function&, IntegrationInfo&)> &boundary_worker, + const std_cxx1x::function&, DoFInfo&, + IntegrationInfo&, + IntegrationInfo&)> &face_worker, ASSEMBLER &assembler, bool cells_first = true) { - loop, IntegrationInfoBox > + loop (begin, end, dof_info, box, diff --git a/deal.II/examples/step-12/step-12.cc b/deal.II/examples/step-12/step-12.cc index 69c8ffdeba..a14cd67338 100644 --- a/deal.II/examples/step-12/step-12.cc +++ b/deal.II/examples/step-12/step-12.cc @@ -387,7 +387,7 @@ void Step12::assemble_system () // result of std::bind if the local // integrators were, for example, // non-static member functions. - MeshWorker::loop, MeshWorker::IntegrationInfoBox, dim, dim> + MeshWorker::integration_loop (dof_handler.begin_active(), dof_handler.end(), dof_info, info_box, &Step12::integrate_cell_term, diff --git a/deal.II/examples/step-39/step-39.cc b/deal.II/examples/step-39/step-39.cc index af29011009..1c86d1e32d 100644 --- a/deal.II/examples/step-39/step-39.cc +++ b/deal.II/examples/step-39/step-39.cc @@ -446,7 +446,7 @@ Step39::assemble_matrix() MeshWorker::IntegrationInfoBox info_box; MeshWorker::DoFInfo dof_info(dof_handler); info_box.initialize(integration_worker, fe, mapping); - MeshWorker::loop, MeshWorker::IntegrationInfoBox, dim, dim>( + MeshWorker::integration_loop( dof_handler.begin_active(), dof_handler.end(), dof_info, info_box, &MatrixIntegrator::cell, @@ -473,7 +473,7 @@ Step39::assemble_mg_matrix() MeshWorker::IntegrationInfoBox info_box; MeshWorker::DoFInfo dof_info(mg_dof_handler); info_box.initialize(integration_worker, fe, mapping); - MeshWorker::loop, MeshWorker::IntegrationInfoBox, dim, dim> ( + MeshWorker::integration_loop ( mg_dof_handler.begin(), mg_dof_handler.end(), dof_info, info_box, &MatrixIntegrator::cell, @@ -503,7 +503,7 @@ Step39::assemble_right_hand_side() MeshWorker::DoFInfo dof_info(dof_handler); info_box.initialize(integration_worker, fe, mapping); - MeshWorker::loop, MeshWorker::IntegrationInfoBox, dim, dim>( + MeshWorker::integration_loop( dof_handler.begin_active(), dof_handler.end(), dof_info, info_box, &RHSIntegrator::cell, @@ -624,7 +624,7 @@ Step39::estimate() MeshWorker::IntegrationInfoBox info_box; MeshWorker::DoFInfo dof_info(dof_handler); info_box.initialize(integration_worker, fe, mapping, solution_data); - MeshWorker::loop, MeshWorker::IntegrationInfoBox, dim, dim> ( + MeshWorker::integration_loop ( dof_handler.begin_active(), dof_handler.end(), dof_info, info_box, &Estimator::cell,