From: heister Date: Fri, 3 May 2013 00:58:39 +0000 (+0000) Subject: more work on step-32 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41a85acba0ca20c672cee199ca5ca1106bd3144a;p=dealii-svn.git more work on step-32 git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@29435 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 e6c9889a8e..89e1907695 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -906,6 +906,9 @@ namespace Step32 DoFHandler temperature_dof_handler; ConstraintMatrix temperature_constraints; + + std::vector stokes_partitioning, stokes_relevant_partitioning; + LA::MPI::SparseMatrix temperature_mass_matrix; LA::MPI::SparseMatrix temperature_stiffness_matrix; LA::MPI::SparseMatrix temperature_matrix; @@ -1842,8 +1845,11 @@ namespace Step32 { stokes_matrix.clear (); +#ifdef PETSC_LA LA::MPI::CompressedBlockSparsityPattern sp(stokes_partitioning, MPI_COMM_WORLD); - +#else + LA::MPI::CompressedBlockSparsityPattern sp(stokes_partitioning); +#endif Table<2,DoFTools::Coupling> coupling (dim+1, dim+1); for (unsigned int c=0; c stokes_partitioning, stokes_relevant_partitioning; + stokes_partitioning.clear(); + stokes_relevant_partitioning.clear(); IndexSet temperature_partitioning (n_T), temperature_relevant_partitioning (n_T); IndexSet stokes_relevant_set; { @@ -2294,19 +2306,19 @@ namespace Step32 #ifdef USE_PETSC_LA Mp_preconditioner.reset (new PETScWrappers::PreconditionJacobi()); - Amg_preconditioner.reset (new PETScWrappers::PreconditionAMG()); - PETScWrappers::PreconditionAMG::AdditionalData Amg_data; + Amg_preconditioner.reset (new LA::MPI::PreconditionAMG()); + LA::MPI::PreconditionAMG::AdditionalData Amg_data; #else Mp_preconditioner.reset(new TrilinosWrappers::PreconditionJacobi()); Amg_preconditioner.reset(new TrilinosWrappers::PreconditionAMG()); TrilinosWrappers::PreconditionAMG::AdditionalData Amg_data; -#endif - Amg_data.constant_modes = constant_modes; Amg_data.elliptic = true; Amg_data.higher_order_elements = true; Amg_data.smoother_sweeps = 2; Amg_data.aggregation_threshold = 0.02; +#endif + Mp_preconditioner->initialize (stokes_preconditioner_matrix.block(1,1)); Amg_preconditioner->initialize (stokes_preconditioner_matrix.block(0,0),