From b73fb4e85cb3428b2b9cd0063adb6363938a8fc3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 16 Nov 2022 17:19:50 -0700 Subject: [PATCH] Simplify step-40. --- examples/step-40/step-40.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/step-40/step-40.cc b/examples/step-40/step-40.cc index 4906261cd4..58958135d5 100644 --- a/examples/step-40/step-40.cc +++ b/examples/step-40/step-40.cc @@ -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, -- 2.39.5