From: Guido Kanschat Date: Wed, 10 Feb 2010 04:01:02 +0000 (+0000) Subject: add template argument to loop X-Git-Tag: v8.0.0~6514 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c092dfae3dc79eb95bb7458cc018a9eb2581a180;p=dealii.git add template argument to loop git-svn-id: https://svn.dealii.org/trunk@20538 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/deal.II/mesh_worker_01.cc b/tests/deal.II/mesh_worker_01.cc index 9fe3d084ec..6f83b2df05 100644 --- a/tests/deal.II/mesh_worker_01.cc +++ b/tests/deal.II/mesh_worker_01.cc @@ -44,9 +44,10 @@ class Local : public Subscriptor typedef typename MeshWorker::IntegrationWorker::CellInfo CellInfo; typedef typename MeshWorker::IntegrationWorker::FaceInfo FaceInfo; - void cell(CellInfo& info) const; - void bdry(FaceInfo& info) const; - void face(FaceInfo& info1, FaceInfo& info2) const; + void cell(MeshWorker::DoFInfo& dinfo, CellInfo& info) const; + void bdry(MeshWorker::DoFInfo& dinfo, FaceInfo& info) const; + void face(MeshWorker::DoFInfo& dinfo1, MeshWorker::DoFInfo& dinfo2, + FaceInfo& info1, FaceInfo& info2) const; bool cells; bool faces; @@ -65,7 +66,7 @@ class Local : public Subscriptor template void -Local::cell(CellInfo& info) const +Local::cell(MeshWorker::DoFInfo& info, CellInfo&) const { if (!cells) return; const unsigned int cell = info.cell->user_index(); @@ -76,19 +77,19 @@ Local::cell(CellInfo& info) const deallog << std::endl; // Fill local residuals - for (unsigned int k=0;k& M1 = info.M1[k].matrix; + const unsigned int block_row = info.matrix(k).row; + const unsigned int block_col = info.matrix(k).column; + FullMatrix& M1 = info.matrix(k).matrix; for (unsigned int i=0;i::cell(CellInfo& info) const template void -Local::bdry(FaceInfo& info) const +Local::bdry(MeshWorker::DoFInfo& info, FaceInfo&) const { const unsigned int cell = info.cell->user_index(); deallog << "Bdry " << std::setw(2) << cell; @@ -112,7 +113,8 @@ Local::bdry(FaceInfo& info) const template void -Local::face(FaceInfo& info1, FaceInfo& info2) const +Local::face(MeshWorker::DoFInfo& info1, MeshWorker::DoFInfo& info2, + FaceInfo&, FaceInfo&) const { const unsigned int cell1 = info1.cell->user_index(); const unsigned int cell2 = info2.cell->user_index(); @@ -156,17 +158,16 @@ test_simple(MGDoFHandler& mgdofs) MappingQ1 mapping; MeshWorker::IntegrationInfoBox info_box(dofs); - info_box.initialize(integrator, assembler, fe, mapping); - + info_box.initialize(integrator, fe, mapping); + MeshWorker::integration_loop - ::CellInfo, - typename Local::FaceInfo> + ::CellInfo, typename Local::FaceInfo, dim> (dofs.begin_active(), dofs.end(), info_box, - std_cxx1x::bind (&Local::cell, local, _1), - std_cxx1x::bind (&Local::bdry, local, _1), - std_cxx1x::bind (&Local::face, local, _1, _2), - assembler); + std_cxx1x::bind (&Local::cell, local, _1, _2), + std_cxx1x::bind (&Local::bdry, local, _1, _2), + std_cxx1x::bind (&Local::face, local, _1, _2, _3, _4), + assembler, true); } for (unsigned int i=0;i