]> https://gitweb.dealii.org/ - dealii.git/commitdiff
address comments
authorTimo Heister <timo.heister@gmail.com>
Sun, 22 Mar 2015 14:35:30 +0000 (10:35 -0400)
committerTimo Heister <timo.heister@gmail.com>
Sun, 22 Mar 2015 14:48:43 +0000 (10:48 -0400)
- rename doxygen file
- documentation fixes
- rename csp->dsp

45 files changed:
doc/doxygen/headers/distributed.h
doc/doxygen/headers/matrices.h
examples/doxygen/block_dynamic_sparsity_pattern.cc [moved from examples/doxygen/compressed_block_sparsity_pattern.cc with 89% similarity]
examples/step-11/step-11.cc
examples/step-12/step-12.cc
examples/step-13/step-13.cc
examples/step-14/step-14.cc
examples/step-15/step-15.cc
examples/step-16/step-16.cc
examples/step-2/step-2.cc
examples/step-20/step-20.cc
examples/step-22/step-22.cc
examples/step-23/step-23.cc
examples/step-24/step-24.cc
examples/step-25/step-25.cc
examples/step-26/step-26.cc
examples/step-27/step-27.cc
examples/step-28/step-28.cc
examples/step-29/step-29.cc
examples/step-3/step-3.cc
examples/step-31/step-31.cc
examples/step-33/step-33.cc
examples/step-35/step-35.cc
examples/step-36/step-36.cc
examples/step-38/step-38.cc
examples/step-39/step-39.cc
examples/step-4/step-4.cc
examples/step-40/step-40.cc
examples/step-41/step-41.cc
examples/step-43/step-43.cc
examples/step-44/step-44.cc
examples/step-45/step-45.cc
examples/step-46/step-46.cc
examples/step-47/step-47.cc
examples/step-5/step-5.cc
examples/step-50/step-50.cc
examples/step-51/step-51.cc
examples/step-52/step-52.cc
examples/step-6/step-6.cc
examples/step-7/step-7.cc
examples/step-8/step-8.cc
examples/step-9/step-9.cc
include/deal.II/lac/block_sparsity_pattern.h
include/deal.II/lac/petsc_parallel_block_sparse_matrix.h
source/lac/petsc_parallel_block_sparse_matrix.cc

index 4749dc707d54d127ac439d1491d6c710340e7b7d..206dd3537ae05eb78d519df5eac53ddc1dc08375 100644 (file)
  * <h5>Sparsity patterns</h5>
  *
  * At the time of writing this, the only class equipped to deal with the
- * situation just explained is CompressedSimpleSparsityPattern. A version of
- * the function CompressedSimpleSparsityPattern::reinit() exists that takes an
+ * situation just explained is DynamicSparsityPattern. A version of
+ * the function DynamicSparsityPattern::reinit() exists that takes an
  * IndexSet argument that indicates which lines of the sparsity pattern to
  * allocate memory for. In other words, it is safe to create such an object
  * that will report as its size 1 billion, but in fact only stores only as
  * When creating the sparsity pattern as well as when assembling the linear
  * system, we need to know about constraints on degrees of freedom, for
  * example resulting from hanging nodes or boundary conditions. Like the
- * CompressedSimpleSparsityPattern class, the ConstraintMatrix can also take
+ * DynamicSparsityPattern class, the ConstraintMatrix can also take
  * an IndexSet upon construction that indicates for which of the possibly very
  * large number of degrees of freedom it should actually store
  * constraints. Unlike for the sparsity pattern, these are now only those
  * store all necessary constraints on each processor: you will just generate
  * wrong matrix entries, but the program will not abort. This is opposed to
  * the situation of the sparsity pattern: there, if the IndexSet passed to the
- * CompressedSimpleSparsityPattern indicates that it should store too few rows
+ * DynamicSparsityPattern indicates that it should store too few rows
  * of the matrix, the program will either abort when you attempt to write into
  * matrix entries that do not exist or the matrix class will silently allocate
  * more memory to accommodate them. As a consequence, it is useful to err on
index a9e6e67a32e3ed96183364ac2fc889bc7053a00a..1841443030c9a6e4f552394181e3b1a33eed844f 100644 (file)
@@ -159,7 +159,7 @@ class MATRIX
  * locations can be added any more. Only after compression can a sparsity
  * pattern be associated to a matrix, since the latter requires the efficient
  * compressed data format of the former. Building a sparsity pattern during
- * the dynamic phase often happens with the DoFTools:make_sparsity_pattern()
+ * the dynamic phase often happens with the DoFTools::make_sparsity_pattern()
  * function. Although this may appear a restriction, it is typically not a
  * significant problem to first build a sparsity pattern and then to write
  * into the matrix only in the previously allocated locations, since in finite
@@ -176,7 +176,7 @@ class MATRIX
  * The main drawback of static sparsity patterns is that their efficient
  * construction requires a reasonably good guess how many entries each of the
  * rows may maximally have. During the actual construction, for example in the
- * DoFTools:make_sparsity_pattern() function, only at most as many entries can
+ * DoFTools::make_sparsity_pattern() function, only at most as many entries can
  * be allocated as previously stated. This is a problem because it is often
  * difficult to estimate the maximal number of entries per row. Consequently,
  * a common strategy is to first build and intermediate sparsity pattern that
@@ -194,46 +194,23 @@ class MATRIX
  * with bad estimates requires huge amounts of memory, almost all of which
  * will not be used and be de-allocated upon compression.
  *
- * To avoid this, deal.II contains a number of "dynamic" or "compressed"
- * sparsity patterns that only allocate as much memory as necessary to hold
- * the currently added entries. While this saves much memory compared to the
- * worst-case behavior mentioned above, it requires the use of less efficient
- * storage schemes for insertion of elements, and the frequent allocation of
- * memory often also takes significant compute time. The tradeoff to avoid
- * excessive memory allocation cannot be avoided, however.
- *
- * The following classes implement this "dynamic" memory scheme in deal.II:
- * - CompressedSparsityPattern
- * - CompressedSimpleSparsityPattern
- * - CompressedSetSparsityPattern
- *
- * These classes have different performance characteristics and memory
- * requirements. Which one is the "best" changes from case to case because
- * it is dependent on the number of dofs, the number of couplings per dof,
- * the strategy used to insert and the amount of memory available.
- *
- * CompressedSparsityPattern and CompressedSimpleSparsityPattern are very
- * similar, where CompressedSimpleSparsityPattern trades some memory (requires
- * up to twice the memory in the worst case) for additional speed which is
- * noticeable in cases with many nonzero entries. CompressedSetSparsityPattern
- * on the other hand uses a lot more memory but may perform better in cases with
- * many nonzero entries per row. See for example the step-27
- * and step-22 tutorial programs.
- *
- * As a guideline you should start using CompressedSparsityPattern and try the
- * other variants if you run into problems. Switching between them should be as
- * simple as changing the class name because all classes have the same interface
- * for adding entries.
- * In either case, these classes are typically used in the following way
- * (replace the class CompressedSparsityPattern with a different one from above):
+ * To avoid this, deal.II contains a "dynamic" or "compressed" sparsity
+ * pattern called DynamicSparsityPattern that only allocate as much memory as
+ * necessary to hold the currently added entries. While this saves much memory
+ * compared to the worst-case behavior mentioned above, it requires the use of
+ * less efficient storage schemes for insertion of elements, and the frequent
+ * allocation of memory often also takes significant compute time. The
+ * tradeoff to avoid excessive memory allocation cannot be avoided, however.
+ *
+ * The class is typically used in the following way
  * @verbatim
- * CompressedSparsityPattern compressed_pattern (dof_handler.n_dofs());
+ * DynamicSparsityPattern dsp (dof_handler.n_dofs());
  * DoFTools::make_sparsity_pattern (dof_handler,
- *                                  compressed_pattern);
- * constraints.condense (compressed_pattern);
+ *                                  dsp);
+ * constraints.condense (dsp);
  *
  * SparsityPattern final_sparsity_pattern;
- * final_sparsity_pattern.copy_from (compressed_pattern);
+ * final_sparsity_pattern.copy_from (dsp);
  * @endverbatim
  *
  * The intermediate, compressed sparsity pattern is directly copied into the
@@ -241,13 +218,8 @@ class MATRIX
  *
  * <h4>Dynamic block sparsity patterns</h4>
  *
- * The following classes implement an array of dynamic sparsity patterns:
- * - BlockCompressedSparsityPattern
- * - BlockCompressedSetSparsityPattern
- * - BlockCompressedSimpleSparsityPattern
- *
- * These classes inherit the same tradeoffs regarding their efficiency from
- * their non-block classes (see above). See their documentation and
+ * The class BlockDynamicSparsityPattern implements an array of dynamic
+ * sparsity patterns for contructing block matrices. See the documentation and
  * step-22 for more information.
  *
  * @ingroup Matrices
similarity index 89%
rename from examples/doxygen/compressed_block_sparsity_pattern.cc
rename to examples/doxygen/block_dynamic_sparsity_pattern.cc
index 7ade2ed7fbbffcae3a0a8fcbb602e09a2cd3d640..cedb545fe51c970e31834418d5976f801a047d78 100644 (file)
@@ -55,17 +55,17 @@ int main()
   std::vector<unsigned int> dofs_per_block(fe.n_blocks());
   DoFTools::count_dofs_per_block(dof, dofs_per_block);
 
-  BlockDynamicSparsityPattern c_sparsity(fe.n_blocks(), fe.n_blocks());
+  BlockDynamicSparsityPattern dsp(fe.n_blocks(), fe.n_blocks());
   for (unsigned int i=0; i<fe.n_blocks(); ++i)
     for (unsigned int j=0; j<fe.n_blocks(); ++j)
-      c_sparsity.block(i,j).reinit(dofs_per_block[i],dofs_per_block[j]);
-  c_sparsity.collect_sizes();
+      dsp.block(i,j).reinit(dofs_per_block[i],dofs_per_block[j]);
+  dsp.collect_sizes();
 
-  DoFTools::make_sparsity_pattern(dof, c_sparsity);
-  constraints.condense(c_sparsity);
+  DoFTools::make_sparsity_pattern(dof, dsp);
+  constraints.condense(dsp);
 
   BlockSparsityPattern sparsity;
-  sparsity.copy_from(c_sparsity);
+  sparsity.copy_from(dsp);
 
   unsigned int ig = 0;
   for (unsigned int ib=0; ib<fe.n_blocks(); ++ib)
index aaadf896b9da02407e08ea46e58c1e6caf6fc729..1277932c2aea1fb4a9ee50013cdaa18c79dafe09 100644 (file)
@@ -44,7 +44,7 @@
 #include <deal.II/numerics/matrix_tools.h>
 
 // Just this one is new: it declares a class
-// <code>DynamicSparsityPattern</code>, which we will use and explain
+// DynamicSparsityPattern, which we will use and explain
 // further down below.
 #include <deal.II/lac/dynamic_sparsity_pattern.h>
 
@@ -202,7 +202,7 @@ namespace Step11
     //
     // Since this can be so difficult that no reasonable answer can be given
     // that allows allocation of only a reasonable amount of memory, there is
-    // a class <code>DynamicSparsityPattern</code>, that can help us out
+    // a class DynamicSparsityPattern, that can help us out
     // here. It does not require that we know in advance how many entries rows
     // could have, but allows just about any length. It is thus significantly
     // more flexible in case you do not have good estimates of row lengths,
@@ -215,15 +215,15 @@ namespace Step11
     // pattern due to the differential operator, then condense it with the
     // constraints object which adds those positions in the sparsity pattern
     // that are required for the elimination of the constraint.
-    DynamicSparsityPattern csp (dof_handler.n_dofs(),
+    DynamicSparsityPattern dsp (dof_handler.n_dofs(),
                                 dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, csp);
-    mean_value_constraints.condense (csp);
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
+    mean_value_constraints.condense (dsp);
 
     // Finally, once we have the full pattern, we can initialize an object of
     // type <code>SparsityPattern</code> from it and in turn initialize the
     // matrix with it. Note that this is actually necessary, since the
-    // <code>DynamicSparsityPattern</code> is so inefficient compared to
+    // DynamicSparsityPattern is so inefficient compared to
     // the <code>SparsityPattern</code> class due to the more flexible data
     // structures it has to use, that we can impossibly base the sparse matrix
     // class on it, but rather need an object of type
@@ -236,7 +236,7 @@ namespace Step11
     // compressed object right from the start, to which you cannot add new
     // entries anymore. The <code>compress</code> call is therefore implicit
     // in the <code>copy_from</code> call.
-    sparsity_pattern.copy_from (csp);
+    sparsity_pattern.copy_from (dsp);
     system_matrix.reinit (sparsity_pattern);
   }
 
index 5800662b3cb290fdfa54712dfe9131873b75cedc..eb82f053127334dbff99f0b01e465922493295f9 100644 (file)
@@ -222,9 +222,9 @@ namespace Step12
     // To build the sparsity pattern for DG discretizations, we can call the
     // function analogue to DoFTools::make_sparsity_pattern, which is called
     // DoFTools::make_flux_sparsity_pattern:
-    DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
-    DoFTools::make_flux_sparsity_pattern (dof_handler, c_sparsity);
-    sparsity_pattern.copy_from(c_sparsity);
+    DynamicSparsityPattern dsp(dof_handler.n_dofs());
+    DoFTools::make_flux_sparsity_pattern (dof_handler, dsp);
+    sparsity_pattern.copy_from(dsp);
 
     // Finally, we set up the structure of all components of the linear
     // system.
index 7bc173e742da900267f7a787c7b8aa559f3ea103..ffc1df67ca9a2101db42b5dd7895dfc01cf3a60a 100644 (file)
@@ -1033,11 +1033,13 @@ namespace Step13
         = &DoFTools::make_hanging_node_constraints;
 
       // Start a side task then continue on the main thread
-      Threads::Task<> side_task(std_cxx11::bind(mhnc_p,std_cxx11::cref(dof_handler),
-                                                std_cxx11::ref(hanging_node_constraints)));
+      Threads::Task<> side_task
+        = Threads::new_task (mhnc_p,
+                             dof_handler,
+                             hanging_node_constraints);
 
-      DynamicSparsityPattern csp(dof_handler.n_dofs(), dof_handler.n_dofs());
-      DoFTools::make_sparsity_pattern (dof_handler, csp);
+      DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs());
+      DoFTools::make_sparsity_pattern (dof_handler, dsp);
 
 
 
@@ -1045,8 +1047,8 @@ namespace Step13
       side_task.join();
 
       hanging_node_constraints.close ();
-      hanging_node_constraints.condense (csp);
-      sparsity_pattern.copy_from(csp);
+      hanging_node_constraints.condense (dsp);
+      sparsity_pattern.copy_from(dsp);
 
 
       // Finally initialize the matrix and right hand side vector
index 061fa9ee0cd98569a6932e04ef48b2a4bf91f378..e6c93cea4c40feacf332625d986268b03746f3a3 100644 (file)
@@ -711,11 +711,13 @@ namespace Step14
         = &DoFTools::make_hanging_node_constraints;
 
       // Start a side task then continue on the main thread
-      Threads::Task<> side_task(std_cxx11::bind(mhnc_p,std_cxx11::cref(dof_handler),
-                                                std_cxx11::ref(hanging_node_constraints)));
+      Threads::Task<> side_task
+        = Threads::new_task (mhnc_p,
+                             dof_handler,
+                             hanging_node_constraints);
 
-      DynamicSparsityPattern csp(dof_handler.n_dofs(), dof_handler.n_dofs());
-      DoFTools::make_sparsity_pattern (dof_handler, csp);
+      DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs());
+      DoFTools::make_sparsity_pattern (dof_handler, dsp);
 
 
 
@@ -723,8 +725,8 @@ namespace Step14
       side_task.join();
 
       hanging_node_constraints.close ();
-      hanging_node_constraints.condense (csp);
-      sparsity_pattern.copy_from(csp);
+      hanging_node_constraints.condense (dsp);
+      sparsity_pattern.copy_from(dsp);
 
       matrix.reinit (sparsity_pattern);
       rhs.reinit (dof_handler.n_dofs());
index 691d7bc761131acd31501b5b681593676a7e0bd4..b92b423341d83476d87828b9d9c663b15083180c 100644 (file)
@@ -208,12 +208,12 @@ namespace Step15
     newton_update.reinit (dof_handler.n_dofs());
     system_rhs.reinit (dof_handler.n_dofs());
 
-    DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, c_sparsity);
+    DynamicSparsityPattern dsp(dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
 
-    hanging_node_constraints.condense (c_sparsity);
+    hanging_node_constraints.condense (dsp);
 
-    sparsity_pattern.copy_from(c_sparsity);
+    sparsity_pattern.copy_from(dsp);
     system_matrix.reinit (sparsity_pattern);
   }
 
index 4c4edee95d3921165753f15a7de5e0c312bf06df..ced76104e65461dd62ceb5aa46bc5dd1d04184fd 100644 (file)
@@ -277,8 +277,8 @@ namespace Step16
                   ? ")" : ", ");
     deallog << std::endl;
 
-    DynamicSparsityPattern csp(dof_handler.n_dofs(), dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, csp);
+    DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
 
     solution.reinit (dof_handler.n_dofs());
     system_rhs.reinit (dof_handler.n_dofs());
@@ -296,8 +296,8 @@ namespace Step16
                                               constraints);
     constraints.close ();
     hanging_node_constraints.close ();
-    constraints.condense (csp);
-    sparsity_pattern.copy_from (csp);
+    constraints.condense (dsp);
+    sparsity_pattern.copy_from (dsp);
     system_matrix.reinit (sparsity_pattern);
 
     // The multigrid constraints have to be initialized. They need to know
@@ -343,11 +343,11 @@ namespace Step16
     // matrices.
     for (unsigned int level=0; level<n_levels; ++level)
       {
-        DynamicSparsityPattern csp (dof_handler.n_dofs(level),
+        DynamicSparsityPattern dsp (dof_handler.n_dofs(level),
                                     dof_handler.n_dofs(level));
-        MGTools::make_sparsity_pattern(dof_handler, csp, level);
+        MGTools::make_sparsity_pattern(dof_handler, dsp, level);
 
-        mg_sparsity_patterns[level].copy_from (csp);
+        mg_sparsity_patterns[level].copy_from (dsp);
 
         mg_matrices[level].reinit(mg_sparsity_patterns[level]);
         mg_interface_in[level].reinit(mg_sparsity_patterns[level]);
index 9702a20f35eea73534b0e54f8e4ea9359964d1db..ae9fbfd3ad6df0349ce7e58de14bfe31164d0d09 100644 (file)
@@ -202,18 +202,18 @@ void distribute_dofs (DoFHandler<2> &dof_handler)
   // to initialize this intermediate data structure, we have to give it the
   // size of the matrix, which in our case will be square with as many rows
   // and columns as there are degrees of freedom on the grid:
-  DynamicSparsityPattern compressed_sparsity_pattern(dof_handler.n_dofs(),
-                                                     dof_handler.n_dofs());
+  DynamicSparsityPattern dynamic_sparsity_pattern(dof_handler.n_dofs(),
+                                                  dof_handler.n_dofs());
 
   // We then fill this object with the places where nonzero elements will be
   // located given the present numbering of degrees of freedom:
-  DoFTools::make_sparsity_pattern (dof_handler, compressed_sparsity_pattern);
+  DoFTools::make_sparsity_pattern (dof_handler, dynamic_sparsity_pattern);
 
   // Now we are ready to create the actual sparsity pattern that we could
   // later use for our matrix. It will just contain the data already assembled
   // in the DynamicSparsityPattern.
   SparsityPattern sparsity_pattern;
-  sparsity_pattern.copy_from (compressed_sparsity_pattern);
+  sparsity_pattern.copy_from (dynamic_sparsity_pattern);
 
   // With this, we can now write the results to a file:
   std::ofstream out ("sparsity_pattern.1");
@@ -265,12 +265,12 @@ void renumber_dofs (DoFHandler<2> &dof_handler)
 {
   DoFRenumbering::Cuthill_McKee (dof_handler);
 
-  DynamicSparsityPattern compressed_sparsity_pattern(dof_handler.n_dofs(),
-                                                     dof_handler.n_dofs());
-  DoFTools::make_sparsity_pattern (dof_handler, compressed_sparsity_pattern);
+  DynamicSparsityPattern dynamic_sparsity_pattern(dof_handler.n_dofs(),
+                                                  dof_handler.n_dofs());
+  DoFTools::make_sparsity_pattern (dof_handler, dynamic_sparsity_pattern);
 
   SparsityPattern sparsity_pattern;
-  sparsity_pattern.copy_from (compressed_sparsity_pattern);
+  sparsity_pattern.copy_from (dynamic_sparsity_pattern);
 
   std::ofstream out ("sparsity_pattern.2");
   sparsity_pattern.print_gnuplot (out);
index 81e9c73a971e3948e780c83361a10d8f0b4c602f..f3c27e81c457bfd5dcb2b152e36f22a5c11c7ff9 100644 (file)
@@ -364,19 +364,19 @@ namespace Step20
     // <code>n_u</code> and <code>n_p</code>, which hold the number of velocity
     // and pressure variables. In the second step we have to instruct the block
     // system to update its knowledge about the sizes of the blocks it manages;
-    // this happens with the <code>c_sparsity.collect_sizes ()</code> call.
-    BlockDynamicSparsityPattern c_sparsity(2, 2);
-    c_sparsity.block(0, 0).reinit (n_u, n_u);
-    c_sparsity.block(1, 0).reinit (n_p, n_u);
-    c_sparsity.block(0, 1).reinit (n_u, n_p);
-    c_sparsity.block(1, 1).reinit (n_p, n_p);
-    c_sparsity.collect_sizes ();
-    DoFTools::make_sparsity_pattern (dof_handler, c_sparsity);
+    // this happens with the <code>dsp.collect_sizes ()</code> call.
+    BlockDynamicSparsityPattern dsp(2, 2);
+    dsp.block(0, 0).reinit (n_u, n_u);
+    dsp.block(1, 0).reinit (n_p, n_u);
+    dsp.block(0, 1).reinit (n_u, n_p);
+    dsp.block(1, 1).reinit (n_p, n_p);
+    dsp.collect_sizes ();
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
 
     // We use the compressed block sparsity pattern in the same way as the
     // non-block version to create the sparsity pattern and then the system
     // matrix:
-    sparsity_pattern.copy_from(c_sparsity);
+    sparsity_pattern.copy_from(dsp);
     system_matrix.reinit (sparsity_pattern);
 
     // Then we have to resize the solution and right hand side vectors in
index ce1458b395516ac78a901d2f42569aa95d8963e8..beb787b99031b53269a3f9aa02768225cadcca8c 100644 (file)
@@ -522,20 +522,20 @@ namespace Step22
     // in step-11 and step-18.
     //
     // All this is done inside a new scope, which
-    // means that the memory of <code>csp</code> will be released once the
+    // means that the memory of <code>dsp</code> will be released once the
     // information has been copied to <code>sparsity_pattern</code>.
     {
-      BlockDynamicSparsityPattern csp (2,2);
+      BlockDynamicSparsityPattern dsp (2,2);
 
-      csp.block(0,0).reinit (n_u, n_u);
-      csp.block(1,0).reinit (n_p, n_u);
-      csp.block(0,1).reinit (n_u, n_p);
-      csp.block(1,1).reinit (n_p, n_p);
+      dsp.block(0,0).reinit (n_u, n_u);
+      dsp.block(1,0).reinit (n_p, n_u);
+      dsp.block(0,1).reinit (n_u, n_p);
+      dsp.block(1,1).reinit (n_p, n_p);
 
-      csp.collect_sizes();
+      dsp.collect_sizes();
 
-      DoFTools::make_sparsity_pattern (dof_handler, csp, constraints, false);
-      sparsity_pattern.copy_from (csp);
+      DoFTools::make_sparsity_pattern (dof_handler, dsp, constraints, false);
+      sparsity_pattern.copy_from (dsp);
     }
 
     // Finally, the system matrix, solution and right hand side are created
index 429c565d7883ffe839c2223a410acc6cb2314a4e..76f5ab90899191d9be43f8dda22ff3a6b221b705 100644 (file)
@@ -333,9 +333,9 @@ namespace Step23
               << std::endl
               << std::endl;
 
-    DynamicSparsityPattern csp(dof_handler.n_dofs(), dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, csp);
-    sparsity_pattern.copy_from (csp);
+    DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
+    sparsity_pattern.copy_from (dsp);
 
     // Then comes a block where we have to initialize the 3 matrices we need
     // in the course of the program: the mass matrix, the Laplace matrix, and
index 700aeeaaa7c27a900f8420be263d71936d900eb6..b5500730874042238d8b9cd387f4e4cdaac0b7c9 100644 (file)
@@ -290,9 +290,9 @@ namespace Step24
               << std::endl
               << std::endl;
 
-    DynamicSparsityPattern csp(dof_handler.n_dofs(), dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, csp);
-    sparsity_pattern.copy_from (csp);
+    DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit (sparsity_pattern);
     mass_matrix.reinit (sparsity_pattern);
index d182d7dd3aba1aa23ea4f36e6652dc5e1a94772a..e4566bcdd3f05166ee09b33b0991027daa51f39c 100644 (file)
@@ -307,9 +307,9 @@ namespace Step25
               << dof_handler.n_dofs()
               << std::endl;
 
-    DynamicSparsityPattern csp(dof_handler.n_dofs(), dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, csp);
-    sparsity_pattern.copy_from (csp);
+    DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit  (sparsity_pattern);
     mass_matrix.reinit    (sparsity_pattern);
index 6d6781f28cf20101ca03f9b90a3061ea2a0938f6..69cd670707191f90dd9e511a58c43051da8d51c6 100644 (file)
@@ -249,12 +249,12 @@ namespace Step26
                                              constraints);
     constraints.close();
 
-    DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
+    DynamicSparsityPattern dsp(dof_handler.n_dofs());
     DoFTools::make_sparsity_pattern(dof_handler,
-                                    c_sparsity,
+                                    dsp,
                                     constraints,
                                     /*keep_constrained_dofs = */ true);
-    sparsity_pattern.copy_from(c_sparsity);
+    sparsity_pattern.copy_from(dsp);
 
     mass_matrix.reinit(sparsity_pattern);
     laplace_matrix.reinit(sparsity_pattern);
index c1ed5552ab1008ca75b056a136b012c8b46411bc..a3d54b613628b4f20a1590679ef7d5aaedd95b5e 100644 (file)
@@ -212,10 +212,10 @@ namespace Step27
                                               constraints);
     constraints.close ();
 
-    DynamicSparsityPattern csp (dof_handler.n_dofs(),
+    DynamicSparsityPattern dsp (dof_handler.n_dofs(),
                                 dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, csp, constraints, false);
-    sparsity_pattern.copy_from (csp);
+    DoFTools::make_sparsity_pattern (dof_handler, dsp, constraints, false);
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit (sparsity_pattern);
   }
index 296fd7dbd4911742b4074e58bea8e4f554f4e46a..aec1ef2f64764cfeede841f93942b226441bf9f4 100644 (file)
@@ -593,10 +593,10 @@ namespace Step28
 
     system_matrix.clear ();
 
-    DynamicSparsityPattern csp(n_dofs, n_dofs);
-    DoFTools::make_sparsity_pattern (dof_handler, csp);
-    hanging_node_constraints.condense (csp);
-    sparsity_pattern.copy_from (csp);
+    DynamicSparsityPattern dsp(n_dofs, n_dofs);
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
+    hanging_node_constraints.condense (dsp);
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit (sparsity_pattern);
 
index f18b368ae5015bd1a69bceaf87379441476e275f..d5d4ec69f281b01f179ad358887a4d2768724515 100644 (file)
@@ -538,9 +538,9 @@ namespace Step29
 
     dof_handler.distribute_dofs (fe);
 
-    DynamicSparsityPattern csp(dof_handler.n_dofs(), dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, csp);
-    sparsity_pattern.copy_from (csp);
+    DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit (sparsity_pattern);
     system_rhs.reinit (dof_handler.n_dofs());
index 60ca98c3b3f476c6f80c9dcc1213165521cf53b3..2cf3f8dd1682ca161510624ac9c6d0b357a4f6e6 100644 (file)
@@ -208,9 +208,9 @@ void Step3::setup_system ()
   // first creating a temporary structure, tagging those entries that might be
   // nonzero, and then copying the data over to the SparsityPattern object
   // that can then be used by the system matrix.
-  DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
-  DoFTools::make_sparsity_pattern (dof_handler, c_sparsity);
-  sparsity_pattern.copy_from(c_sparsity);
+  DynamicSparsityPattern dsp(dof_handler.n_dofs());
+  DoFTools::make_sparsity_pattern (dof_handler, dsp);
+  sparsity_pattern.copy_from(dsp);
 
   // Note that the SparsityPattern object does not hold the values of the
   // matrix, it only stores the places where entries are. The entries
index 7f311fd9cd63eb61f814ec9361a1c30f8a32cfc2..8d53da03f5b01928659dc954cc9bf1b48d04577f 100644 (file)
@@ -958,14 +958,14 @@ namespace Step31
     {
       stokes_matrix.clear ();
 
-      BlockDynamicSparsityPattern csp (2,2);
+      BlockDynamicSparsityPattern dsp (2,2);
 
-      csp.block(0,0).reinit (n_u, n_u);
-      csp.block(0,1).reinit (n_u, n_p);
-      csp.block(1,0).reinit (n_p, n_u);
-      csp.block(1,1).reinit (n_p, n_p);
+      dsp.block(0,0).reinit (n_u, n_u);
+      dsp.block(0,1).reinit (n_u, n_p);
+      dsp.block(1,0).reinit (n_p, n_u);
+      dsp.block(1,1).reinit (n_p, n_p);
 
-      csp.collect_sizes ();
+      dsp.collect_sizes ();
 
       Table<2,DoFTools::Coupling> coupling (dim+1, dim+1);
 
@@ -976,10 +976,10 @@ namespace Step31
           else
             coupling[c][d] = DoFTools::none;
 
-      DoFTools::make_sparsity_pattern (stokes_dof_handler, coupling, csp,
+      DoFTools::make_sparsity_pattern (stokes_dof_handler, coupling, dsp,
                                        stokes_constraints, false);
 
-      stokes_matrix.reinit (csp);
+      stokes_matrix.reinit (dsp);
     }
 
     {
@@ -987,14 +987,14 @@ namespace Step31
       Mp_preconditioner.reset ();
       stokes_preconditioner_matrix.clear ();
 
-      BlockDynamicSparsityPattern csp (2,2);
+      BlockDynamicSparsityPattern dsp (2,2);
 
-      csp.block(0,0).reinit (n_u, n_u);
-      csp.block(0,1).reinit (n_u, n_p);
-      csp.block(1,0).reinit (n_p, n_u);
-      csp.block(1,1).reinit (n_p, n_p);
+      dsp.block(0,0).reinit (n_u, n_u);
+      dsp.block(0,1).reinit (n_u, n_p);
+      dsp.block(1,0).reinit (n_p, n_u);
+      dsp.block(1,1).reinit (n_p, n_p);
 
-      csp.collect_sizes ();
+      dsp.collect_sizes ();
 
       Table<2,DoFTools::Coupling> coupling (dim+1, dim+1);
       for (unsigned int c=0; c<dim+1; ++c)
@@ -1004,10 +1004,10 @@ namespace Step31
           else
             coupling[c][d] = DoFTools::none;
 
-      DoFTools::make_sparsity_pattern (stokes_dof_handler, coupling, csp,
+      DoFTools::make_sparsity_pattern (stokes_dof_handler, coupling, dsp,
                                        stokes_constraints, false);
 
-      stokes_preconditioner_matrix.reinit (csp);
+      stokes_preconditioner_matrix.reinit (dsp);
     }
 
     // The creation of the temperature matrix (or, rather, matrices, since we
@@ -1027,11 +1027,11 @@ namespace Step31
       temperature_stiffness_matrix.clear ();
       temperature_matrix.clear ();
 
-      DynamicSparsityPattern csp (n_T, n_T);
-      DoFTools::make_sparsity_pattern (temperature_dof_handler, csp,
+      DynamicSparsityPattern dsp (n_T, n_T);
+      DoFTools::make_sparsity_pattern (temperature_dof_handler, dsp,
                                        temperature_constraints, false);
 
-      temperature_matrix.reinit (csp);
+      temperature_matrix.reinit (dsp);
       temperature_mass_matrix.reinit (temperature_matrix);
       temperature_stiffness_matrix.reinit (temperature_matrix);
     }
index b46fc60fdab1ad43c9284dbfe6e153a7abd89f6e..56ff286bf7202ca9952a241e8a441b9c772c02ba 100644 (file)
@@ -1401,11 +1401,11 @@ namespace Step33
   template <int dim>
   void ConservationLaw<dim>::setup_system ()
   {
-    DynamicSparsityPattern sparsity_pattern (dof_handler.n_dofs(),
-                                             dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern);
+    DynamicSparsityPattern dsp (dof_handler.n_dofs(),
+                                dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
 
-    system_matrix.reinit (sparsity_pattern);
+    system_matrix.reinit (dsp);
   }
 
 
index 8742441d21be99c07c3257fce1abd8216c468441..2d4933fb38a09aae14e52db8a5216b39ee16359b 100644 (file)
@@ -791,9 +791,9 @@ namespace Step35
   NavierStokesProjection<dim>::initialize_velocity_matrices()
   {
     {
-      DynamicSparsityPattern csp(dof_handler_velocity.n_dofs(), dof_handler_velocity.n_dofs());
-      DoFTools::make_sparsity_pattern (dof_handler_velocity, csp);
-      sparsity_pattern_velocity.copy_from (csp);
+      DynamicSparsityPattern dsp(dof_handler_velocity.n_dofs(), dof_handler_velocity.n_dofs());
+      DoFTools::make_sparsity_pattern (dof_handler_velocity, dsp);
+      sparsity_pattern_velocity.copy_from (dsp);
     }
     vel_Laplace_plus_Mass.reinit (sparsity_pattern_velocity);
     for (unsigned int d=0; d<dim; ++d)
@@ -817,9 +817,9 @@ namespace Step35
   NavierStokesProjection<dim>::initialize_pressure_matrices()
   {
     {
-      DynamicSparsityPattern csp(dof_handler_pressure.n_dofs(), dof_handler_pressure.n_dofs());
-      DoFTools::make_sparsity_pattern (dof_handler_pressure, csp);
-      sparsity_pattern_pressure.copy_from (csp);
+      DynamicSparsityPattern dsp(dof_handler_pressure.n_dofs(), dof_handler_pressure.n_dofs());
+      DoFTools::make_sparsity_pattern (dof_handler_pressure, dsp);
+      sparsity_pattern_pressure.copy_from (dsp);
     }
 
     pres_Laplace.reinit (sparsity_pattern_pressure);
@@ -847,9 +847,9 @@ namespace Step35
   NavierStokesProjection<dim>::initialize_gradient_operator()
   {
     {
-      DynamicSparsityPattern csp(dof_handler_velocity.n_dofs(), dof_handler_pressure.n_dofs());
-      DoFTools::make_sparsity_pattern (dof_handler_velocity, dof_handler_pressure, csp);
-      sparsity_pattern_pres_vel.copy_from (csp);
+      DynamicSparsityPattern dsp(dof_handler_velocity.n_dofs(), dof_handler_pressure.n_dofs());
+      DoFTools::make_sparsity_pattern (dof_handler_velocity, dof_handler_pressure, dsp);
+      sparsity_pattern_pres_vel.copy_from (dsp);
     }
 
     InitGradPerTaskData per_task_data (0, fe_velocity.dofs_per_cell,
index 6cc02f2e9fb20f98151843a59d7441ae85ba4ee5..016c174c589534431b0ba4ea52e238c41ebf3bfc 100644 (file)
@@ -152,12 +152,12 @@ namespace Step36
   // previously. One way to do that would be to use code like this:
   // @code
   //   DynamicSparsityPattern
-  //      csp (dof_handler.n_dofs(),
+  //      dsp (dof_handler.n_dofs(),
   //           dof_handler.n_dofs());
-  //   DoFTools::make_sparsity_pattern (dof_handler, csp);
-  //   csp.compress ();
-  //   stiffness_matrix.reinit (csp);
-  //   mass_matrix.reinit (csp);
+  //   DoFTools::make_sparsity_pattern (dof_handler, dsp);
+  //   dsp.compress ();
+  //   stiffness_matrix.reinit (dsp);
+  //   mass_matrix.reinit (dsp);
   // @endcode
   // instead of the two <code>reinit()</code> calls for the
   // stiffness and mass matrices below.
index 0bc5e4435ae46e65c8cf1d0fcec735c0cb6c44b9..36720a35a66811d0dabb4a5ba02fd11cf33aff9a 100644 (file)
@@ -341,9 +341,9 @@ namespace Step38
               << " degrees of freedom."
               << std::endl;
 
-    DynamicSparsityPattern csp (dof_handler.n_dofs(), dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, csp);
-    sparsity_pattern.copy_from (csp);
+    DynamicSparsityPattern dsp (dof_handler.n_dofs(), dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit (sparsity_pattern);
 
index 03d5aa97dc9fe6d4e86ca8c24e5043efcf55e0ed..ce4e0e03f18dfe25e1f2f02f7f68a798bc39c5c7 100644 (file)
@@ -502,9 +502,9 @@ namespace Step39
     // not know the row sizes in advance, we first fill a temporary
     // DynamicSparsityPattern object and copy it to the regular
     // SparsityPattern once it is complete.
-    DynamicSparsityPattern c_sparsity(n_dofs);
-    DoFTools::make_flux_sparsity_pattern(dof_handler, c_sparsity);
-    sparsity.copy_from(c_sparsity);
+    DynamicSparsityPattern dsp(n_dofs);
+    DoFTools::make_flux_sparsity_pattern(dof_handler, dsp);
+    sparsity.copy_from(dsp);
     matrix.reinit(sparsity);
 
     const unsigned int n_levels = triangulation.n_levels();
@@ -529,9 +529,9 @@ namespace Step39
       {
         // These are roughly the same lines as above for the global matrix,
         // now for each level.
-        DynamicSparsityPattern c_sparsity(dof_handler.n_dofs(level));
-        MGTools::make_flux_sparsity_pattern(dof_handler, c_sparsity, level);
-        mg_sparsity[level].copy_from(c_sparsity);
+        DynamicSparsityPattern dsp(dof_handler.n_dofs(level));
+        MGTools::make_flux_sparsity_pattern(dof_handler, dsp, level);
+        mg_sparsity[level].copy_from(dsp);
         mg_matrix[level].reinit(mg_sparsity[level]);
 
         // Additionally, we need to initialize the transfer matrices at the
@@ -540,10 +540,10 @@ namespace Step39
         // object on level 0.
         if (level>0)
           {
-            DynamicSparsityPattern ci_sparsity;
-            ci_sparsity.reinit(dof_handler.n_dofs(level-1), dof_handler.n_dofs(level));
-            MGTools::make_flux_sparsity_pattern_edge(dof_handler, ci_sparsity, level);
-            mg_sparsity_dg_interface[level].copy_from(ci_sparsity);
+            DynamicSparsityPattern dsp;
+            dsp.reinit(dof_handler.n_dofs(level-1), dof_handler.n_dofs(level));
+            MGTools::make_flux_sparsity_pattern_edge(dof_handler, dsp, level);
+            mg_sparsity_dg_interface[level].copy_from(dsp);
             mg_matrix_dg_up[level].reinit(mg_sparsity_dg_interface[level]);
             mg_matrix_dg_down[level].reinit(mg_sparsity_dg_interface[level]);
           }
index a8f06c66cf9aa28d7ecf95991331d85c7eb21e16..b4c7a62cd0a01c36ba23b0e16f38ce3cce96188c 100644 (file)
@@ -271,9 +271,9 @@ void Step4<dim>::setup_system ()
             << dof_handler.n_dofs()
             << std::endl;
 
-  DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
-  DoFTools::make_sparsity_pattern (dof_handler, c_sparsity);
-  sparsity_pattern.copy_from(c_sparsity);
+  DynamicSparsityPattern dsp(dof_handler.n_dofs());
+  DoFTools::make_sparsity_pattern (dof_handler, dsp);
+  sparsity_pattern.copy_from(dsp);
 
   system_matrix.reinit (sparsity_pattern);
 
index 9dda199522bf5e7f8577529c6690552b21c1ab3f..e03278ce6575199e55c9442b02b51d8e389da4cf 100644 (file)
@@ -315,18 +315,18 @@ namespace Step40
     // entries that will exist in that part of the finite element matrix that
     // it will own. The final step is to initialize the matrix with the
     // sparsity pattern.
-    DynamicSparsityPattern csp (locally_relevant_dofs);
+    DynamicSparsityPattern dsp (locally_relevant_dofs);
 
-    DoFTools::make_sparsity_pattern (dof_handler, csp,
+    DoFTools::make_sparsity_pattern (dof_handler, dsp,
                                      constraints, false);
-    SparsityTools::distribute_sparsity_pattern (csp,
+    SparsityTools::distribute_sparsity_pattern (dsp,
                                                 dof_handler.n_locally_owned_dofs_per_processor(),
                                                 mpi_communicator,
                                                 locally_relevant_dofs);
 
     system_matrix.reinit (locally_owned_dofs,
                           locally_owned_dofs,
-                          csp,
+                          dsp,
                           mpi_communicator);
   }
 
index b2211d7e424016635cc04f20e8da974e54b1d56c..981df9e03e95af9eba9bc0439dea58293baf4942 100644 (file)
@@ -246,14 +246,14 @@ namespace Step41
                                               constraints);
     constraints.close ();
 
-    DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
+    DynamicSparsityPattern dsp(dof_handler.n_dofs());
     DoFTools::make_sparsity_pattern (dof_handler,
-                                     c_sparsity,
+                                     dsp,
                                      constraints,
                                      false);
 
-    system_matrix.reinit (c_sparsity);
-    complete_system_matrix.reinit (c_sparsity);
+    system_matrix.reinit (dsp);
+    complete_system_matrix.reinit (dsp);
 
     solution.reinit (dof_handler.n_dofs());
     system_rhs.reinit (dof_handler.n_dofs());
@@ -266,7 +266,7 @@ namespace Step41
     // diagonal, and in the following then first compute all of this as a
     // matrix and then extract the diagonal elements for later use:
     TrilinosWrappers::SparseMatrix mass_matrix;
-    mass_matrix.reinit (c_sparsity);
+    mass_matrix.reinit (dsp);
     assemble_mass_matrix_diagonal (mass_matrix);
     diagonal_of_mass_matrix.reinit (dof_handler.n_dofs());
     for (unsigned int j=0; j<solution.size (); j++)
index 1199c985ad11a12a823fb03656926a3dfc308ba3..88c273c1df1743e4b98969313c39fd13ecfeac99 100644 (file)
@@ -736,14 +736,14 @@ namespace Step43
     {
       darcy_matrix.clear ();
 
-      BlockDynamicSparsityPattern csp (2,2);
+      BlockDynamicSparsityPattern dsp (2,2);
 
-      csp.block(0,0).reinit (n_u, n_u);
-      csp.block(0,1).reinit (n_u, n_p);
-      csp.block(1,0).reinit (n_p, n_u);
-      csp.block(1,1).reinit (n_p, n_p);
+      dsp.block(0,0).reinit (n_u, n_u);
+      dsp.block(0,1).reinit (n_u, n_p);
+      dsp.block(1,0).reinit (n_p, n_u);
+      dsp.block(1,1).reinit (n_p, n_p);
 
-      csp.collect_sizes ();
+      dsp.collect_sizes ();
 
       Table<2,DoFTools::Coupling> coupling (dim+1, dim+1);
 
@@ -755,10 +755,10 @@ namespace Step43
             coupling[c][d] = DoFTools::none;
 
 
-      DoFTools::make_sparsity_pattern (darcy_dof_handler, coupling, csp,
+      DoFTools::make_sparsity_pattern (darcy_dof_handler, coupling, dsp,
                                        darcy_constraints, false);
 
-      darcy_matrix.reinit (csp);
+      darcy_matrix.reinit (dsp);
     }
 
     {
@@ -766,14 +766,14 @@ namespace Step43
       Mp_preconditioner.reset ();
       darcy_preconditioner_matrix.clear ();
 
-      BlockDynamicSparsityPattern csp (2,2);
+      BlockDynamicSparsityPattern dsp (2,2);
 
-      csp.block(0,0).reinit (n_u, n_u);
-      csp.block(0,1).reinit (n_u, n_p);
-      csp.block(1,0).reinit (n_p, n_u);
-      csp.block(1,1).reinit (n_p, n_p);
+      dsp.block(0,0).reinit (n_u, n_u);
+      dsp.block(0,1).reinit (n_u, n_p);
+      dsp.block(1,0).reinit (n_p, n_u);
+      dsp.block(1,1).reinit (n_p, n_p);
 
-      csp.collect_sizes ();
+      dsp.collect_sizes ();
 
       Table<2,DoFTools::Coupling> coupling (dim+1, dim+1);
       for (unsigned int c=0; c<dim+1; ++c)
@@ -783,23 +783,23 @@ namespace Step43
           else
             coupling[c][d] = DoFTools::none;
 
-      DoFTools::make_sparsity_pattern (darcy_dof_handler, coupling, csp,
+      DoFTools::make_sparsity_pattern (darcy_dof_handler, coupling, dsp,
                                        darcy_constraints, false);
 
-      darcy_preconditioner_matrix.reinit (csp);
+      darcy_preconditioner_matrix.reinit (dsp);
     }
 
 
     {
       saturation_matrix.clear ();
 
-      DynamicSparsityPattern csp (n_s, n_s);
+      DynamicSparsityPattern dsp (n_s, n_s);
 
-      DoFTools::make_sparsity_pattern (saturation_dof_handler, csp,
+      DoFTools::make_sparsity_pattern (saturation_dof_handler, dsp,
                                        saturation_constraints, false);
 
 
-      saturation_matrix.reinit (csp);
+      saturation_matrix.reinit (dsp);
     }
 
     darcy_solution.reinit (2);
index e59bd88b5354ee63e36963d7d3e9e24ecbd7ee7f..10bd48c8592286484abbd2eeebdc6af8aa4fa554 100644 (file)
@@ -1582,20 +1582,20 @@ namespace Step44
       const types::global_dof_index n_dofs_p = dofs_per_block[p_dof];
       const types::global_dof_index n_dofs_J = dofs_per_block[J_dof];
 
-      BlockDynamicSparsityPattern csp(n_blocks, n_blocks);
+      BlockDynamicSparsityPattern dsp(n_blocks, n_blocks);
 
-      csp.block(u_dof, u_dof).reinit(n_dofs_u, n_dofs_u);
-      csp.block(u_dof, p_dof).reinit(n_dofs_u, n_dofs_p);
-      csp.block(u_dof, J_dof).reinit(n_dofs_u, n_dofs_J);
+      dsp.block(u_dof, u_dof).reinit(n_dofs_u, n_dofs_u);
+      dsp.block(u_dof, p_dof).reinit(n_dofs_u, n_dofs_p);
+      dsp.block(u_dof, J_dof).reinit(n_dofs_u, n_dofs_J);
 
-      csp.block(p_dof, u_dof).reinit(n_dofs_p, n_dofs_u);
-      csp.block(p_dof, p_dof).reinit(n_dofs_p, n_dofs_p);
-      csp.block(p_dof, J_dof).reinit(n_dofs_p, n_dofs_J);
+      dsp.block(p_dof, u_dof).reinit(n_dofs_p, n_dofs_u);
+      dsp.block(p_dof, p_dof).reinit(n_dofs_p, n_dofs_p);
+      dsp.block(p_dof, J_dof).reinit(n_dofs_p, n_dofs_J);
 
-      csp.block(J_dof, u_dof).reinit(n_dofs_J, n_dofs_u);
-      csp.block(J_dof, p_dof).reinit(n_dofs_J, n_dofs_p);
-      csp.block(J_dof, J_dof).reinit(n_dofs_J, n_dofs_J);
-      csp.collect_sizes();
+      dsp.block(J_dof, u_dof).reinit(n_dofs_J, n_dofs_u);
+      dsp.block(J_dof, p_dof).reinit(n_dofs_J, n_dofs_p);
+      dsp.block(J_dof, J_dof).reinit(n_dofs_J, n_dofs_J);
+      dsp.collect_sizes();
 
       // The global system matrix initially has the following structure
       // @f{align*}
@@ -1630,10 +1630,10 @@ namespace Step44
             coupling[ii][jj] = DoFTools::always;
       DoFTools::make_sparsity_pattern(dof_handler_ref,
                                       coupling,
-                                      csp,
+                                      dsp,
                                       constraints,
                                       false);
-      sparsity_pattern.copy_from(csp);
+      sparsity_pattern.copy_from(dsp);
     }
 
     tangent_matrix.reinit(sparsity_pattern);
index 72a1e1d67b9e32d5e57ccc02b599154d4b096456..7acf22240d1ee3bcc88bfea40d5ce03ea2fecc2f 100644 (file)
@@ -180,14 +180,14 @@ namespace Step45
     // Then we create the sparsity pattern and the system matrix and
     // initialize the solution and right-hand side vectors. This is again as
     // in step-3 or step-6, for example:
-    DynamicSparsityPattern c_sparsity_pattern (dof_handler.n_dofs(),
-                                               dof_handler.n_dofs());
+    DynamicSparsityPattern dsp (dof_handler.n_dofs(),
+                                dof_handler.n_dofs());
     DoFTools::make_sparsity_pattern (dof_handler,
-                                     c_sparsity_pattern,
+                                     dsp,
                                      constraints,
                                      false);
-    c_sparsity_pattern.compress ();
-    sparsity_pattern.copy_from (c_sparsity_pattern);
+    dsp.compress ();
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit (sparsity_pattern);
     system_rhs.reinit (dof_handler.n_dofs());
index a0e46f92717c498961350b6ce232301dcae3217e..abca6c360fc70ea34cce7f44b54fbc34107c3c70 100644 (file)
@@ -460,7 +460,7 @@ namespace Step46
     // extensively in the introduction, and use it to initialize the matrix;
     // then also set vectors to their correct sizes:
     {
-      DynamicSparsityPattern csp (dof_handler.n_dofs(),
+      DynamicSparsityPattern dsp (dof_handler.n_dofs(),
                                   dof_handler.n_dofs());
 
       Table<2,DoFTools::Coupling> cell_coupling (fe_collection.n_components(),
@@ -481,10 +481,10 @@ namespace Step46
               face_coupling[c][d] = DoFTools::always;
           }
 
-      DoFTools::make_flux_sparsity_pattern (dof_handler, csp,
+      DoFTools::make_flux_sparsity_pattern (dof_handler, dsp,
                                             cell_coupling, face_coupling);
-      constraints.condense (csp);
-      sparsity_pattern.copy_from (csp);
+      constraints.condense (dsp);
+      sparsity_pattern.copy_from (dsp);
     }
 
     system_matrix.reinit (sparsity_pattern);
index 3e30d75d920c2ab8eefd6e5496381ca4e8f1dd56..352091a7f8c5dfc2fa16523e9e9c8ebe6976c56b 100644 (file)
@@ -259,12 +259,12 @@ namespace Step47
     constraints.close();
 
 
-    DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, c_sparsity);
+    DynamicSparsityPattern dsp(dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
 
-    constraints.condense (c_sparsity);
+    constraints.condense (dsp);
 
-    sparsity_pattern.copy_from(c_sparsity);
+    sparsity_pattern.copy_from(dsp);
 
     system_matrix.reinit (sparsity_pattern);
   }
index a808db5c55f5a17156020013f7d643d653bbf839..cb07bb63a5283d0b94619ed53f6682b3b752980b 100644 (file)
@@ -270,9 +270,9 @@ void Step5<dim>::setup_system ()
             << dof_handler.n_dofs()
             << std::endl;
 
-  DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
-  DoFTools::make_sparsity_pattern (dof_handler, c_sparsity);
-  sparsity_pattern.copy_from(c_sparsity);
+  DynamicSparsityPattern dsp(dof_handler.n_dofs());
+  DoFTools::make_sparsity_pattern (dof_handler, dsp);
+  sparsity_pattern.copy_from(dsp);
 
   system_matrix.reinit (sparsity_pattern);
 
index ab4729587715b16b7cae2e02158b76d97b1104f7..bcbf3a63e023de697adaae569e6c82a9a1c6ab94 100644 (file)
@@ -371,9 +371,9 @@ namespace Step50
     constraints.close ();
     hanging_node_constraints.close ();
 
-    DynamicSparsityPattern csp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (mg_dof_handler, csp, constraints);
-    system_matrix.reinit (mg_dof_handler.locally_owned_dofs(), csp, MPI_COMM_WORLD, true);
+    DynamicSparsityPattern dsp(mg_dof_handler.n_dofs(), mg_dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (mg_dof_handler, dsp, constraints);
+    system_matrix.reinit (mg_dof_handler.locally_owned_dofs(), dsp, MPI_COMM_WORLD, true);
 
     // The multigrid constraints have to be
     // initialized. They need to know about
@@ -434,18 +434,18 @@ namespace Step50
     // matrices.
     for (unsigned int level=0; level<n_levels; ++level)
       {
-        DynamicSparsityPattern csp(mg_dof_handler.n_dofs(level),
+        DynamicSparsityPattern dsp(mg_dof_handler.n_dofs(level),
                                    mg_dof_handler.n_dofs(level));
-        MGTools::make_sparsity_pattern(mg_dof_handler, csp, level);
+        MGTools::make_sparsity_pattern(mg_dof_handler, dsp, level);
 
         mg_matrices[level].reinit(mg_dof_handler.locally_owned_mg_dofs(level),
                                   mg_dof_handler.locally_owned_mg_dofs(level),
-                                  csp,
+                                  dsp,
                                   MPI_COMM_WORLD, true);
 
         mg_interface_matrices[level].reinit(mg_dof_handler.locally_owned_mg_dofs(level),
                                             mg_dof_handler.locally_owned_mg_dofs(level),
-                                            csp,
+                                            dsp,
                                             MPI_COMM_WORLD, true);
       }
   }
index 0f512514f234fa24a74283eeacc79e3c07346eb1..d6c7ff72ca915b9d35a982a4cd00f62ef83b8cdd 100644 (file)
@@ -470,10 +470,10 @@ namespace Step51
     // to the number of dofs on a face, when copying this into the final
     // sparsity pattern.
     {
-      DynamicSparsityPattern csp (dof_handler.n_dofs());
-      DoFTools::make_sparsity_pattern (dof_handler, csp,
+      DynamicSparsityPattern dsp (dof_handler.n_dofs());
+      DoFTools::make_sparsity_pattern (dof_handler, dsp,
                                        constraints, false);
-      sparsity_pattern.copy_from(csp, fe.dofs_per_face);
+      sparsity_pattern.copy_from(dsp, fe.dofs_per_face);
     }
     system_matrix.reinit (sparsity_pattern);
   }
index 81ee24d6b7bf3f447c77c429ef54874e803d383e..10071ebdc6f7c2fecc39c58de262dc07a22a36a3 100644 (file)
@@ -169,9 +169,9 @@ namespace Step52
     VectorTools::interpolate_boundary_values(dof_handler,1,ZeroFunction<2>(),constraint_matrix);
     constraint_matrix.close();
 
-    DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern(dof_handler,c_sparsity,constraint_matrix);
-    sparsity_pattern.copy_from(c_sparsity);
+    DynamicSparsityPattern dsp(dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern(dof_handler,dsp,constraint_matrix);
+    sparsity_pattern.copy_from(dsp);
 
     system_matrix.reinit(sparsity_pattern);
     mass_matrix.reinit(sparsity_pattern);
index ac0fc3be25a41e36bafe93c1544438ea6b07534d..5ce8e02ec5a720f17b0f35922f1e23441d1b3edb 100644 (file)
@@ -344,9 +344,9 @@ void Step6<dim>::setup_system ()
   // constraints after assembling, we would have to pass <code>true</code>
   // instead because then we would first write into these locations only to
   // later set them to zero again during condensation.
-  DynamicSparsityPattern c_sparsity(dof_handler.n_dofs());
+  DynamicSparsityPattern dsp(dof_handler.n_dofs());
   DoFTools::make_sparsity_pattern(dof_handler,
-                                  c_sparsity,
+                                  dsp,
                                   constraints,
                                   /*keep_constrained_dofs = */ false);
 
@@ -354,7 +354,7 @@ void Step6<dim>::setup_system ()
   // regularly assembling the matrix and those that were introduced by
   // eliminating constraints). We can thus copy our intermediate object to the
   // sparsity pattern:
-  sparsity_pattern.copy_from(c_sparsity);
+  sparsity_pattern.copy_from(dsp);
 
   // Finally, the so-constructed sparsity pattern serves as the basis on top
   // of which we will create the sparse matrix:
index 7442ff11c0a1b1ae4425851f4cf63a2f865cab06..d2996618a6f5d66041a20bc27a4284d7dac2cc7c 100644 (file)
@@ -531,10 +531,10 @@ namespace Step7
                                              hanging_node_constraints);
     hanging_node_constraints.close ();
 
-    DynamicSparsityPattern csp (dof_handler.n_dofs(), dof_handler.n_dofs());
-    DoFTools::make_sparsity_pattern (dof_handler, csp);
-    hanging_node_constraints.condense (csp);
-    sparsity_pattern.copy_from (csp);
+    DynamicSparsityPattern dsp (dof_handler.n_dofs(), dof_handler.n_dofs());
+    DoFTools::make_sparsity_pattern (dof_handler, dsp);
+    hanging_node_constraints.condense (dsp);
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit (sparsity_pattern);
 
index a72fbda2a8e2bc5b3a415c29cd5c7ae600ba7dd2..91e044360829d77ec82608b9683189f2b42d6fbd 100644 (file)
@@ -342,12 +342,12 @@ namespace Step8
                                              hanging_node_constraints);
     hanging_node_constraints.close ();
 
-    DynamicSparsityPattern csp(dof_handler.n_dofs(), dof_handler.n_dofs());
+    DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs());
     DoFTools::make_sparsity_pattern(dof_handler,
-                                    csp,
+                                    dsp,
                                     hanging_node_constraints,
                                     /*keep_constrained_dofs = */ true);
-    sparsity_pattern.copy_from (csp);
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit (sparsity_pattern);
 
index b1610e40496652386836837632d9b448d811914c..8b6a8dd0d13138a65ccc185555a4e79f51314727 100644 (file)
@@ -553,12 +553,12 @@ namespace Step9
                                              hanging_node_constraints);
     hanging_node_constraints.close ();
 
-    DynamicSparsityPattern csp(dof_handler.n_dofs(), dof_handler.n_dofs());
+    DynamicSparsityPattern dsp(dof_handler.n_dofs(), dof_handler.n_dofs());
     DoFTools::make_sparsity_pattern(dof_handler,
-                                    csp,
+                                    dsp,
                                     hanging_node_constraints,
                                     /*keep_constrained_dofs = */ true);
-    sparsity_pattern.copy_from (csp);
+    sparsity_pattern.copy_from (dsp);
 
     system_matrix.reinit (sparsity_pattern);
 
index e9a6b34e56f21b32f19fbcb8aa8197c120178ecd..c64d5a268479827daf47681249f63d19252adc18 100644 (file)
@@ -49,15 +49,15 @@ namespace TrilinosWrappers
 
 /**
  * This is the base class for block versions of the sparsity pattern and
- * compressed sparsity pattern classes. It has not much functionality, but
- * only administrates an array of sparsity pattern objects and delegates work
- * to them. It has mostly the same interface as has the SparsityPattern,
- * CompressedSparsityPattern, and CompressedSetSparsityPattern classes, and
- * simply transforms calls to its member functions to calls to the respective
- * member functions of the member sparsity patterns.
+ * dynamic sparsity pattern classes. It has not much functionality, but only
+ * administrates an array of sparsity pattern objects and delegates work to
+ * them. It has mostly the same interface as has the SparsityPattern, and
+ * DynamicSparsityPattern, and simply transforms calls to its member functions
+ * to calls to the respective member functions of the member sparsity
+ * patterns.
  *
  * The largest difference between the SparsityPattern and
- * CompressedSparsityPattern classes and this class is that mostly, the
+ * DynamicSparsityPattern classes and this class is that mostly, the
  * matrices have different properties and you will want to work on the blocks
  * making up the matrix rather than the whole matrix. You can access the
  * different blocks using the <tt>block(row,col)</tt> function.
@@ -469,13 +469,14 @@ public:
  * the use of block indices causes some additional complications, we give a
  * short example.
  *
- * @dontinclude compressed_block_sparsity_pattern.cc
+ * @dontinclude block_dynamic_sparsity_pattern.cc
  *
  * After the the DoFHandler <tt>dof</tt> and the ConstraintMatrix
  * <tt>constraints</tt> have been set up with a system element, we must count
  * the degrees of freedom in each matrix block:
  *
- * @skipline dofs_per_block @until count
+ * @skipline dofs_per_block
+ * @until count
  *
  * Now, we are ready to set up the BlockDynamicSparsityPattern.
  *
index 61ae9a1bcffccaa990f553b856d2f3b8e2455300..33a5991e2aaf453073d543c923736b13d2bc2f64 100644 (file)
@@ -155,7 +155,7 @@ namespace PETScWrappers
        */
       void reinit(const std::vector<IndexSet> &rows,
                   const std::vector<IndexSet> &cols,
-                  const BlockDynamicSparsityPattern &bcsp,
+                  const BlockDynamicSparsityPattern &bdsp,
                   const MPI_Comm &com);
 
 
@@ -163,7 +163,7 @@ namespace PETScWrappers
        * Same as above but for a symmetric structure only.
        */
       void reinit(const std::vector<IndexSet> &sizes,
-                  const BlockDynamicSparsityPattern &bcsp,
+                  const BlockDynamicSparsityPattern &bdsp,
                   const MPI_Comm &com);
 
 
index 011f6ecce7827bb7d2a522560ea506ca75fdce7e..afc0b0ec8be4302764160f0969d5d9401e8421a1 100644 (file)
@@ -71,37 +71,37 @@ namespace PETScWrappers
     BlockSparseMatrix::
     reinit(const std::vector<IndexSet> &rows,
            const std::vector<IndexSet> &cols,
-           const BlockDynamicSparsityPattern &bcsp,
+           const BlockDynamicSparsityPattern &bdsp,
            const MPI_Comm &com)
     {
-      Assert(rows.size() == bcsp.n_block_rows(), ExcMessage("invalid size"));
-      Assert(cols.size() == bcsp.n_block_cols(), ExcMessage("invalid size"));
+      Assert(rows.size() == bdsp.n_block_rows(), ExcMessage("invalid size"));
+      Assert(cols.size() == bdsp.n_block_cols(), ExcMessage("invalid size"));
 
 
       clear();
-      this->sub_objects.reinit (bcsp.n_block_rows(),
-                                bcsp.n_block_cols());
+      this->sub_objects.reinit (bdsp.n_block_rows(),
+                                bdsp.n_block_cols());
 
       std::vector<types::global_dof_index> row_sizes;
-      for (unsigned int r=0; r<bcsp.n_block_rows(); ++r)
-        row_sizes.push_back( bcsp.block(r,0).n_rows() );
+      for (unsigned int r=0; r<bdsp.n_block_rows(); ++r)
+        row_sizes.push_back( bdsp.block(r,0).n_rows() );
       this->row_block_indices.reinit (row_sizes);
 
       std::vector<types::global_dof_index> col_sizes;
-      for (unsigned int c=0; c<bcsp.n_block_cols(); ++c)
-        col_sizes.push_back( bcsp.block(0,c).n_cols() );
+      for (unsigned int c=0; c<bdsp.n_block_cols(); ++c)
+        col_sizes.push_back( bdsp.block(0,c).n_cols() );
       this->column_block_indices.reinit (col_sizes);
 
       for (unsigned int r=0; r<this->n_block_rows(); ++r)
         for (unsigned int c=0; c<this->n_block_cols(); ++c)
           {
-            Assert(rows[r].size() == bcsp.block(r,c).n_rows(), ExcMessage("invalid size"));
-            Assert(cols[c].size() == bcsp.block(r,c).n_cols(), ExcMessage("invalid size"));
+            Assert(rows[r].size() == bdsp.block(r,c).n_rows(), ExcMessage("invalid size"));
+            Assert(cols[c].size() == bdsp.block(r,c).n_cols(), ExcMessage("invalid size"));
 
             BlockType *p = new BlockType();
             p->reinit(rows[r],
                       cols[c],
-                      bcsp.block(r,c),
+                      bdsp.block(r,c),
                       com);
             this->sub_objects[r][c] = p;
           }
@@ -112,10 +112,10 @@ namespace PETScWrappers
     void
     BlockSparseMatrix::
     reinit(const std::vector<IndexSet> &sizes,
-           const BlockDynamicSparsityPattern &bcsp,
+           const BlockDynamicSparsityPattern &bdsp,
            const MPI_Comm &com)
     {
-      reinit(sizes, sizes, bcsp, com);
+      reinit(sizes, sizes, bdsp, com);
     }
 
 

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.