]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Slightly different form of the example program.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 14 Jun 2006 15:20:37 +0000 (15:20 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 14 Jun 2006 15:20:37 +0000 (15:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@13249 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/doxygen/compressed_block_sparsity_pattern.cc

index 540215bf8b0de9460b9e918f87d11fe5142882ff..dc55dba606b62f6dcdd6c06efc709c2d411ce4ca 100644 (file)
@@ -58,10 +58,14 @@ int main()
   BlockSparsityPattern sparsity;
   sparsity.copy_from(c_sparsity);
   
-  for (unsigned int i=0;i<fe.n_blocks();++i)
-    for (unsigned int j=0;j<fe.n_blocks();++j)
-      {
-       std::cout << "   Block " << i << ' ' << j << std::endl;
-       sparsity.block(i,j).print(std::cout);
-      }
+//   for (unsigned int i=0;i<fe.n_blocks();++i)
+//     for (unsigned int j=0;j<fe.n_blocks();++j)
+//       {
+//     std::cout << "   Block " << i << ' ' << j << std::endl;
+//     sparsity.block(i,j).print(std::cout);
+//       }
+  for (unsigned int i=0; i<sparsity.n_rows(); ++i)
+    for (unsigned int j=0; j<sparsity.n_cols(); ++j)
+      if (sparsity.exists(i,j))
+       std::cout << i << ' ' << j << std::endl;
 }

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.