]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Avoid use of a deprecated function.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Dec 2012 22:46:10 +0000 (22:46 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Dec 2012 22:46:10 +0000 (22:46 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_deprecated@27888 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/grid/grid_generator.cc

index 8e0966cb7c3d272eab6a9d4525f53d11ae161bb4..61ca99f93789540ab8126ab27cdcec7ca29060fa 100644 (file)
@@ -20,6 +20,7 @@
 #include <deal.II/lac/precondition.h>
 #include <deal.II/lac/solver_cg.h>
 #include <deal.II/lac/sparse_matrix.h>
+#include <deal.II/lac/compressed_sparsity_pattern.h>
 #include <deal.II/lac/constraint_matrix.h>
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_reordering.h>
@@ -3196,9 +3197,14 @@ void GridGenerator::laplace_transformation (Triangulation<dim> &tria,
 
   DoFHandler<dim> dof_handler(tria);
   dof_handler.distribute_dofs(q1);
-  SparsityPattern sparsity_pattern (dof_handler.n_dofs (), dof_handler.n_dofs (),
-                                    dof_handler.max_couplings_between_dofs());
-  DoFTools::make_sparsity_pattern (dof_handler, sparsity_pattern);
+
+  CompressedSparsityPattern c_sparsity_pattern (dof_handler.n_dofs (),
+                                       dof_handler.n_dofs ());
+  DoFTools::make_sparsity_pattern (dof_handler, c_sparsity_pattern);
+  c_sparsity_pattern.compress ();
+
+  SparsityPattern sparsity_pattern;
+  sparsity_pattern.copy_from (c_sparsity_pattern);
   sparsity_pattern.compress ();
 
   SparseMatrix<double> S(sparsity_pattern);

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.