From c869a50a89e8e9163b64db51b0c12574f60ce1f8 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Tue, 15 Feb 2011 17:52:02 +0000 Subject: [PATCH] remove a problem that bind seems to create a copy of its arguments and does not use references git-svn-id: https://svn.dealii.org/trunk@23365 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/numerics/mesh_worker_loop.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/deal.II/include/deal.II/numerics/mesh_worker_loop.h b/deal.II/include/deal.II/numerics/mesh_worker_loop.h index 66ebbb3bc8..8ad75db23c 100644 --- a/deal.II/include/deal.II/numerics/mesh_worker_loop.h +++ b/deal.II/include/deal.II/numerics/mesh_worker_loop.h @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2006, 2007, 2008, 2009, 2010 by the deal.II authors +// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -44,9 +44,9 @@ namespace internal } template - void assemble(const MeshWorker::DoFInfoBox& dinfo, A& assembler) + void assemble(const MeshWorker::DoFInfoBox& dinfo, A* assembler) { - dinfo.assemble(assembler); + dinfo.assemble(*assembler); } } @@ -240,12 +240,12 @@ namespace MeshWorker typename identity::type end, DOFINFO& dinfo, INFOBOX& info, - const std_cxx1x::function &cell_worker, - const std_cxx1x::function &boundary_worker, + const std_cxx1x::function& cell_worker, + const std_cxx1x::function& boundary_worker, const std_cxx1x::function &face_worker, - ASSEMBLER &assembler, + typename INFOBOX::CellInfo&)>& face_worker, + ASSEMBLER& assembler, bool cells_first = true) { DoFInfoBox dof_info(dinfo); @@ -262,7 +262,7 @@ namespace MeshWorker WorkStream::run(begin, end, std_cxx1x::bind(cell_action, _1, _3, _2, cell_worker, boundary_worker, face_worker, cells_first, true), - std_cxx1x::bind(internal::assemble, _1, assembler), + std_cxx1x::bind(internal::assemble, _1, &assembler), info, dof_info); #else for (ITERATOR cell = begin; cell != end; ++cell) @@ -275,6 +275,8 @@ namespace MeshWorker dof_info.assemble(assembler); } #endif + for (unsigned int i=0;i<3;++i) + deallog << '[' << assembler(i) << ']'; } /** -- 2.39.5