]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix step-55 4153/head 4154/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 30 Mar 2017 19:09:45 +0000 (15:09 -0400)
committerTimo Heister <timo.heister@gmail.com>
Thu, 30 Mar 2017 19:46:13 +0000 (15:46 -0400)
This causes crashes with PETSc and solver convergence issues with
Trilinos with more than one rank.

examples/step-55/step-55.cc

index ab01da6bd1e4696c4eb3c4aa3441c1cc4c8ade07..652ae2f23697dff65a7044d25b4c68656193264d 100644 (file)
@@ -440,14 +440,14 @@ namespace Step55
 
       DoFTools::make_sparsity_pattern (dof_handler, coupling, dsp,
                                        constraints, false);
-      preconditioner_matrix.reinit (owned_partitioning,
-                                    //      owned_partitioning,
-                                    dsp,
-                                    mpi_communicator);
       SparsityTools::distribute_sparsity_pattern (dsp,
                                                   dof_handler.locally_owned_dofs_per_processor(),
                                                   mpi_communicator,
                                                   locally_relevant_dofs);
+      preconditioner_matrix.reinit (owned_partitioning,
+                                    //      owned_partitioning,
+                                    dsp,
+                                    mpi_communicator);
     }
 
     // Finally, we construct the block vectors with the right sizes. The

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.