]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
simplify again
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 3 Jan 2014 16:30:11 +0000 (16:30 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 3 Jan 2014 16:30:11 +0000 (16:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@32159 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/meshworker/simple.h

index 9f279b3c8bc7f41b81d32dbf0bfbc9f14e850315..2cb8940f99076d8784c53ac5079b5f5e77c95804 100644 (file)
@@ -824,24 +824,13 @@ 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
 
-      if (mg_constrained_dofs == 0)
-        {
-          for (unsigned int j=0; j<i1.size(); ++j)
-            for (unsigned int k=0; k<i2.size(); ++k)
-              if (std::fabs(M(j,k)) >= threshold)
-                G.add(i1[j], i2[k], M(j,k));
-        }
-      else
-        {
-          for (unsigned int j=0; j<i1.size(); ++j)
-            for (unsigned int k=0; k<i2.size(); ++k)
-              if (std::fabs(M(j,k)) >= threshold)
-                {
-                  if (!mg_constrained_dofs->continuity_across_refinement_edges())
-                    G.add(i1[j], i2[k], M(j,k));
-                }
-        }
+      for (unsigned int j=0; j<i1.size(); ++j)
+        for (unsigned int k=0; k<i2.size(); ++k)
+          if (std::fabs(M(j,k)) >= threshold)
+            G.add(i1[j], i2[k], M(j,k));
     }
 
 
@@ -1087,10 +1076,10 @@ namespace MeshWorker
             {
               if (mg_constrained_dofs == 0)
                 {
-                  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);
+                  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);
                 }
               else
                 {
@@ -1106,7 +1095,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);
+              assemble((*matrix)[level1], info1.matrix(0,false).matrix, info1.indices, info1.indices, level1);
               if (level1>0)
                 {
                   assemble_up((*flux_up)[level1],info1.matrix(0,true).matrix, info2.indices, info1.indices, level1);
@@ -1124,10 +1113,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]);
-                    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]);
+                    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);
                   }
                 else
                   {
@@ -1143,7 +1132,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]);
+                assemble((*matrix)[level1], info1.matrix(k,false).matrix, info1.indices_by_block[row], info1.indices_by_block[column], level1);
                 if (level1>0)
                   {
                     assemble_up((*flux_up)[level1],info1.matrix(k,true).matrix, info2.indices_by_block[row], info1.indices_by_block[column], level1);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.