From 6b1a11a492a4c8e2df614548c7da1a0e719884ed Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Thu, 10 Aug 2017 16:21:01 -0600 Subject: [PATCH] Fix indentation. --- include/deal.II/meshworker/mesh_loop.h | 16 ++++++++------- tests/meshworker/mesh_loop_02.cc | 27 +++++++++++++++----------- tests/meshworker/mesh_loop_03.cc | 27 +++++++++++++++----------- 3 files changed, 41 insertions(+), 29 deletions(-) diff --git a/include/deal.II/meshworker/mesh_loop.h b/include/deal.II/meshworker/mesh_loop.h index db52f446c0..7631af58d5 100644 --- a/include/deal.II/meshworker/mesh_loop.h +++ b/include/deal.II/meshworker/mesh_loop.h @@ -46,7 +46,7 @@ namespace MeshWorker class CellWorker, class Copyer, class ScratchData, class CopyData, class BoundaryWorker, class FaceWorker> - void mesh_loop(const Iterator & begin, + void mesh_loop(const Iterator &begin, const typename identity::type &end, // const std::function &cell_worker, @@ -72,8 +72,8 @@ namespace MeshWorker BoundaryWorker boundary_worker = BoundaryWorker(), FaceWorker face_worker = FaceWorker(), - const unsigned int queue_length = 2*MultithreadInfo::n_threads(), - const unsigned int chunk_size = 8) + const unsigned int queue_length = 2*MultithreadInfo::n_threads(), + const unsigned int chunk_size = 8) { auto cell_action = [&] (const Iterator &cell, ScratchData &scratch, CopyData ©) { @@ -88,9 +88,10 @@ namespace MeshWorker if ((!ignore_subdomain) && (csid == numbers::artificial_subdomain_id)) return; - if( (flags & (assemble_cells_first)) && - ( ((flags & (assemble_own_cells)) && own_cell) - || ( (flags & assemble_ghost_cells) && !own_cell) ) ) + + if ( (flags & (assemble_cells_first)) && + ( ((flags & (assemble_own_cells)) && own_cell) + || ( (flags & assemble_ghost_cells) && !own_cell) ) ) cell_worker(cell, scratch, copy); if (flags & assemble_own_faces) @@ -158,7 +159,8 @@ namespace MeshWorker neighbor, neighbor_face_no.first, neighbor_face_no.second, scratch, copy); - if(flags & assemble_own_interior_faces_both) { + if (flags & assemble_own_interior_faces_both) + { face_worker(neighbor, neighbor_face_no.first, neighbor_face_no.second, cell, face_no, numbers::invalid_unsigned_int, scratch, copy); diff --git a/tests/meshworker/mesh_loop_02.cc b/tests/meshworker/mesh_loop_02.cc index 985be0a1a7..f231b62af3 100644 --- a/tests/meshworker/mesh_loop_02.cc +++ b/tests/meshworker/mesh_loop_02.cc @@ -32,7 +32,8 @@ struct CopyData {}; using namespace MeshWorker; template -void test() { +void test() +{ Triangulation tria; GridGenerator::hyper_cube(tria); tria.refine_global(1); @@ -49,25 +50,29 @@ void test() { - auto cell_worker = [] (const Iterator &cell, ScratchData &s, CopyData &c) { + auto cell_worker = [] (const Iterator &cell, ScratchData &s, CopyData &c) + { deallog << "Cell worker on : " << cell << std::endl; }; - auto boundary_worker = [] (const Iterator &cell, const unsigned int &f, ScratchData &, CopyData &) { + auto boundary_worker = [] (const Iterator &cell, const unsigned int &f, ScratchData &, CopyData &) + { deallog << "Boundary worker on : " << cell << ", Face : "<< f << std::endl; }; auto face_worker = [] - (const Iterator &cell, const unsigned int & f, const unsigned int &sf, - const Iterator &ncell, const unsigned int &nf, const unsigned int & nsf, - ScratchData &s, CopyData &c) { - deallog << "Face worker on : " << cell << ", Neighbor cell : " << ncell - << ", Face : "<< f << ", Neighbor Face : " << nf - << ", Subface: " << sf - << ", Neighbor Subface: " << nsf << std::endl; + (const Iterator &cell, const unsigned int &f, const unsigned int &sf, + const Iterator &ncell, const unsigned int &nf, const unsigned int &nsf, + ScratchData &s, CopyData &c) + { + deallog << "Face worker on : " << cell << ", Neighbor cell : " << ncell + << ", Face : "<< f << ", Neighbor Face : " << nf + << ", Subface: " << sf + << ", Neighbor Subface: " << nsf << std::endl; }; - auto copyer = [](const CopyData &) { + auto copyer = [](const CopyData &) + { deallog << "Copyer" << std::endl; }; diff --git a/tests/meshworker/mesh_loop_03.cc b/tests/meshworker/mesh_loop_03.cc index 5b388de4ef..a7e51a20aa 100644 --- a/tests/meshworker/mesh_loop_03.cc +++ b/tests/meshworker/mesh_loop_03.cc @@ -33,7 +33,8 @@ struct CopyData {}; using namespace MeshWorker; template -void test() { +void test() +{ Triangulation tria; GridGenerator::hyper_cube(tria); tria.refine_global(1); @@ -50,25 +51,29 @@ void test() { - auto cell_worker = [] (const Iterator &cell, ScratchData &s, CopyData &c) { + auto cell_worker = [] (const Iterator &cell, ScratchData &s, CopyData &c) + { deallog << "Cell worker on : " << cell << std::endl; }; - auto boundary_worker = [] (const Iterator &cell, const unsigned int &f, ScratchData &, CopyData &) { + auto boundary_worker = [] (const Iterator &cell, const unsigned int &f, ScratchData &, CopyData &) + { deallog << "Boundary worker on : " << cell << ", Face : "<< f << std::endl; }; auto face_worker = [] - (const Iterator &cell, const unsigned int & f, const unsigned int &sf, - const Iterator &ncell, const unsigned int &nf, const unsigned int & nsf, - ScratchData &s, CopyData &c) { - deallog << "Face worker on : " << cell << ", Neighbor cell : " << ncell - << ", Face : "<< f << ", Neighbor Face : " << nf - << ", Subface: " << sf - << ", Neighbor Subface: " << nsf << std::endl; + (const Iterator &cell, const unsigned int &f, const unsigned int &sf, + const Iterator &ncell, const unsigned int &nf, const unsigned int &nsf, + ScratchData &s, CopyData &c) + { + deallog << "Face worker on : " << cell << ", Neighbor cell : " << ncell + << ", Face : "<< f << ", Neighbor Face : " << nf + << ", Subface: " << sf + << ", Neighbor Subface: " << nsf << std::endl; }; - auto copyer = [](const CopyData &) { + auto copyer = [](const CopyData &) + { deallog << "Copyer" << std::endl; }; -- 2.39.5