From: Timo Heister Date: Tue, 5 Sep 2017 18:51:46 +0000 (-0400) Subject: mesh_loop: replace cells_first by cells_after_faces X-Git-Tag: v9.0.0-rc1~1115^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6155f9addab8f5cec8c96d6827f61c16fa70b6a1;p=dealii.git mesh_loop: replace cells_first by cells_after_faces --- diff --git a/include/deal.II/meshworker/assemble_flags.h b/include/deal.II/meshworker/assemble_flags.h index 906f796107..942b0388f1 100644 --- a/include/deal.II/meshworker/assemble_flags.h +++ b/include/deal.II/meshworker/assemble_flags.h @@ -81,10 +81,10 @@ namespace MeshWorker assemble_boundary_faces = 0x0040, /** - * Assemble cell integrals before face integrals. If not specified, cells - * will be assembled after faces and boundaries. + * By default we assemble cell integrals before face integrals. If this + * flag is specified, cells will be assembled after faces and boundaries. */ - cells_first = 0x0080, + cells_after_faces = 0x0080, /** * Combination of flags to determine if any work on cells is done. diff --git a/include/deal.II/meshworker/mesh_loop.h b/include/deal.II/meshworker/mesh_loop.h index 256f1a8834..f7094bd87d 100644 --- a/include/deal.II/meshworker/mesh_loop.h +++ b/include/deal.II/meshworker/mesh_loop.h @@ -79,8 +79,8 @@ namespace MeshWorker * If the flag AssembleFlags::assemble_own_cells is passed, then the default * behavior is to first loop over faces and do the work there, and then * compute the actual work on the cell. It is possible to perform the - * integration on the cells before working on faces, by adding the flag - * AssembleFlags::cells_first. + * integration on the cells after working on faces, by adding the flag + * AssembleFlags::cells_after_faces. * * If the flag AssembleFlags::assemble_own_interior_faces_once is specified, * then each interior face is visited only once, and the @p face_worker is @@ -148,9 +148,9 @@ namespace MeshWorker != (assemble_ghost_faces_once|assemble_ghost_faces_both), ExcMessage("You can only specify assemble_ghost_faces_once OR assemble_ghost_faces_both.")); - Assert(!(flags & cells_first) || + Assert(!(flags & cells_after_faces) || (flags & (assemble_own_cells | assemble_ghost_cells)), - ExcMessage("The option cells_first only makes sense if you assemble on cells.")); + ExcMessage("The option cells_after_faces only makes sense if you assemble on cells.")); Assert((!face_worker) == !(flags & work_on_faces), ExcMessage("If you specify a face_worker, assemble_face_* needs to be set.")); @@ -175,7 +175,7 @@ namespace MeshWorker if ((!ignore_subdomain) && (current_subdomain_id == numbers::artificial_subdomain_id)) return; - if ( (flags & (cells_first)) && + if ( !(flags & (cells_after_faces)) && ( ((flags & (assemble_own_cells)) && own_cell) || ( (flags & assemble_ghost_cells) && !own_cell) ) ) cell_worker(cell, scratch, copy); @@ -298,7 +298,7 @@ namespace MeshWorker } // faces // Execute the cell_worker if faces are handled before cells - if (!(flags & cells_first) && + if ((flags & cells_after_faces) && ( ((flags & assemble_own_cells) && own_cell) || ((flags & assemble_ghost_cells) && !own_cell))) cell_worker(cell, scratch, copy); }; diff --git a/tests/meshworker/mesh_loop_02.cc b/tests/meshworker/mesh_loop_02.cc index c4ba93c3b8..2aa1a9240e 100644 --- a/tests/meshworker/mesh_loop_02.cc +++ b/tests/meshworker/mesh_loop_02.cc @@ -93,16 +93,16 @@ void test() assemble_boundary_faces, boundary_worker); - deallog << "CELLS AND BOUNDARY" << std::endl << std::endl; + deallog << "CELLS LAST AND BOUNDARY" << std::endl << std::endl; mesh_loop(cell, endc, cell_worker, copier, scratch, copy, - assemble_own_cells | assemble_boundary_faces, + assemble_own_cells | assemble_boundary_faces | cells_after_faces, boundary_worker); deallog << "CELLS FIRST AND BOUNDARY" << std::endl << std::endl; mesh_loop(cell, endc, cell_worker, copier, scratch, copy, - assemble_own_cells | cells_first | assemble_boundary_faces, + assemble_own_cells | assemble_boundary_faces, boundary_worker);