From: heister Date: Fri, 3 May 2013 01:47:24 +0000 (+0000) Subject: still not running, but compiling X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9969f9144e86bc4096787538f6ad26b722501881;p=dealii-svn.git still not running, but compiling git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@29442 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index f366bf671e..5476260e27 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -1866,21 +1867,18 @@ namespace Step32 this_mpi_process(MPI_COMM_WORLD)); // distribute_sp(); - /* + IndexSet relevant; + + DoFTools::extract_locally_relevant_dofs (stokes_dof_handler, + relevant); + SparsityTools::distribute_sparsity_pattern(sp, - - const std::vector &rows_per_cpu, - const MPI_Comm &mpi_comm, - const IndexSet &myrange); - */ + stokes_dof_handler.n_locally_owned_dofs_per_processor(), + MPI_COMM_WORLD, relevant); + sp.compress(); stokes_matrix.reinit (stokes_partitioning, sp, MPI_COMM_WORLD); - std::cout << stokes_matrix.m() << "x"<< stokes_matrix.n() << std::endl; - std::cout << stokes_matrix.block(0,0).m() << "x"<< stokes_matrix.block(0,0).n() << std::endl; - std::cout << stokes_matrix.block(1,0).m() << "x"<< stokes_matrix.block(1,0).n() << std::endl; - std::cout << stokes_matrix.block(0,1).m() << "x"<< stokes_matrix.block(0,1).n() << std::endl; - std::cout << stokes_matrix.block(1,1).m() << "x"<< stokes_matrix.block(1,1).n() << std::endl; } @@ -1914,6 +1912,14 @@ namespace Step32 stokes_constraints, false, Utilities::MPI:: this_mpi_process(MPI_COMM_WORLD)); + IndexSet relevant; + + DoFTools::extract_locally_relevant_dofs (stokes_dof_handler, + relevant); + + SparsityTools::distribute_sparsity_pattern(sp, + stokes_dof_handler.n_locally_owned_dofs_per_processor(), + MPI_COMM_WORLD, relevant); sp.compress(); stokes_preconditioner_matrix.reinit (stokes_partitioning, sp, MPI_COMM_WORLD); @@ -1940,6 +1946,14 @@ namespace Step32 temperature_constraints, false, Utilities::MPI:: this_mpi_process(MPI_COMM_WORLD)); + IndexSet relevant; + + DoFTools::extract_locally_relevant_dofs (temperature_dof_handler, + relevant); + + SparsityTools::distribute_sparsity_pattern(sp, + temperature_dof_handler.n_locally_owned_dofs_per_processor(), + MPI_COMM_WORLD, relevant); sp.compress(); temperature_matrix.reinit (temperature_partitioner, temperature_partitioner, sp, MPI_COMM_WORLD);