]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify step-40.
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 17 Nov 2022 00:19:50 +0000 (17:19 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 17 Nov 2022 15:44:40 +0000 (08:44 -0700)
examples/step-40/step-40.cc

index 4906261cd4b5a65c79f49d0ceeb52f9664a0790d..58958135d5e34f9e2b31c8f674e773d49b04ce07 100644 (file)
@@ -469,22 +469,16 @@ namespace Step40
                                                     mpi_communicator);
 
     SolverControl solver_control(dof_handler.n_dofs(), 1e-12);
+    LA::SolverCG  solver(solver_control);
 
-#ifdef USE_PETSC_LA
-    LA::SolverCG solver(solver_control, mpi_communicator);
-#else
-    LA::SolverCG solver(solver_control);
-#endif
-
-    LA::MPI::PreconditionAMG preconditioner;
 
     LA::MPI::PreconditionAMG::AdditionalData data;
-
 #ifdef USE_PETSC_LA
     data.symmetric_operator = true;
 #else
     /* Trilinos defaults are good */
 #endif
+    LA::MPI::PreconditionAMG preconditioner;
     preconditioner.initialize(system_matrix, data);
 
     solver.solve(system_matrix,

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.