From: Timo Heister Date: Mon, 15 Apr 2013 00:08:46 +0000 (+0000) Subject: work on step-32 with PETSc (lots missing) X-Git-Tag: v8.0.0~120^2~76 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad1b7872537e84bc856bb1d0c5da587b3a4ab925;p=dealii.git work on step-32 with PETSc (lots missing) git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@29271 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 dd6625b752..e6c9889a8e 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -63,7 +63,7 @@ #include -//#define USE_PETSC_LA +#define USE_PETSC_LA namespace LA { @@ -1713,9 +1713,8 @@ namespace Step32 std::vector rhs_values(n_q_points); - LA::MPI::Vector - rhs (temperature_mass_matrix.row_partitioner()), - solution (temperature_mass_matrix.row_partitioner()); + LA::MPI::Vector rhs (temperature_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); + LA::MPI::Vector solution (temperature_dof_handler.locally_owned_dofs(), MPI_COMM_WORLD); const EquationData::TemperatureInitialValues initial_temperature; @@ -1763,7 +1762,11 @@ namespace Step32 SolverCG cg(solver_control); LA::MPI::PreconditionJacobi preconditioner_mass; +#ifdef USE_PETSC_LA + preconditioner_mass.initialize(temperature_mass_matrix); +#else preconditioner_mass.initialize(temperature_mass_matrix, 1.3); +#endif cg.solve (temperature_mass_matrix, solution, rhs, preconditioner_mass);