From 7b46c04525aa7d4bbd6ce01a9f7ab2846335e581 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Fri, 6 Dec 2013 15:29:19 +0000 Subject: [PATCH] revert last commit git-svn-id: https://svn.dealii.org/trunk@31911 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/meshworker/simple.h | 47 +++++++++++++-------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/deal.II/include/deal.II/meshworker/simple.h b/deal.II/include/deal.II/meshworker/simple.h index 4500b864cc..e43257df15 100644 --- a/deal.II/include/deal.II/meshworker/simple.h +++ b/deal.II/include/deal.II/meshworker/simple.h @@ -824,13 +824,24 @@ namespace MeshWorker { AssertDimension(M.m(), i1.size()); AssertDimension(M.n(), i2.size()); - //Assert(mg_constrained_dofs == 0, ExcInternalError()); -//TODO: Possibly remove this function all together - for (unsigned int j=0; j= threshold) - G.add(i1[j], i2[k], M(j,k)); + if (mg_constrained_dofs == 0) + { + for (unsigned int j=0; j= threshold) + G.add(i1[j], i2[k], M(j,k)); + } + else + { + for (unsigned int j=0; j= threshold) + { + if (!mg_constrained_dofs->continuity_across_refinement_edges()) + G.add(i1[j], i2[k], M(j,k)); + } + } } @@ -905,8 +916,8 @@ namespace MeshWorker for (unsigned int k=0; k= threshold) if (!mg_constrained_dofs->at_refinement_edge(level, i2[k])) - G.add(i1[j], i2[k], M(k,j)); - } + G.add(i1[j], i2[k], M(k,j)); + } } template @@ -1076,10 +1087,10 @@ namespace MeshWorker { if (mg_constrained_dofs == 0) { - assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices, level1); - assemble((*matrix)[level1], info1.matrix(0,true).matrix, info1.indices, info2.indices, level1); - assemble((*matrix)[level1], info2.matrix(0,false).matrix, info2.indices, info2.indices, level1); - assemble((*matrix)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices, level1); + assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices); + assemble((*matrix)[level1], info1.matrix(0,true).matrix, info1.indices, info2.indices); + assemble((*matrix)[level1], info2.matrix(0,false).matrix, info2.indices, info2.indices); + assemble((*matrix)[level1], info2.matrix(0,true).matrix, info2.indices, info1.indices); } else { @@ -1095,7 +1106,7 @@ namespace MeshWorker // Do not add info2.M1, // which is done by // the coarser cell - assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices, level1); + assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices); if (level1>0) { assemble_up((*flux_up)[level1],info1.matrix(0,true).matrix, info2.indices, info1.indices, level1); @@ -1113,10 +1124,10 @@ namespace MeshWorker { if (mg_constrained_dofs == 0) { - assemble((*matrix)[level1], info1.matrix(k,false).matrix, info1.indices_by_block[row], info1.indices_by_block[column], level1); - assemble((*matrix)[level1], info1.matrix(k,true).matrix, info1.indices_by_block[row], info2.indices_by_block[column], level1); - assemble((*matrix)[level1], info2.matrix(k,false).matrix, info2.indices_by_block[row], info2.indices_by_block[column], level1); - assemble((*matrix)[level1], info2.matrix(k,true).matrix, info2.indices_by_block[row], info1.indices_by_block[column], level1); + assemble((*matrix)[level1], info1.matrix(k,false).matrix, info1.indices_by_block[row], info1.indices_by_block[column]); + assemble((*matrix)[level1], info1.matrix(k,true).matrix, info1.indices_by_block[row], info2.indices_by_block[column]); + assemble((*matrix)[level1], info2.matrix(k,false).matrix, info2.indices_by_block[row], info2.indices_by_block[column]); + assemble((*matrix)[level1], info2.matrix(k,true).matrix, info2.indices_by_block[row], info1.indices_by_block[column]); } else { @@ -1132,7 +1143,7 @@ namespace MeshWorker // Do not add info2.M1, // which is done by // the coarser cell - assemble((*matrix)[level1], info1.matrix(k,false).matrix, info1.indices_by_block[row], info1.indices_by_block[column], level1); + assemble((*matrix)[level1], info1.matrix(k,false).matrix, info1.indices_by_block[row], info1.indices_by_block[column]); if (level1>0) { assemble_up((*flux_up)[level1],info1.matrix(k,true).matrix, info2.indices_by_block[row], info1.indices_by_block[column], level1); -- 2.39.5