From 8b1cf505f1c3b28f5855f204dbefc0c6e5d2f88b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 7 Jan 2022 02:49:22 -0700 Subject: [PATCH] Use better variable names in step-43. --- examples/step-43/step-43.cc | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/examples/step-43/step-43.cc b/examples/step-43/step-43.cc index 32115156ee..1985e21bbf 100644 --- a/examples/step-43/step-43.cc +++ b/examples/step-43/step-43.cc @@ -554,8 +554,9 @@ namespace Step43 const double porosity; const double AOS_threshold; - std::shared_ptr Amg_preconditioner; - std::shared_ptr Mp_preconditioner; + std::shared_ptr top_left_preconditioner; + std::shared_ptr + bottom_right_preconditioner; bool rebuild_saturation_matrix; @@ -724,8 +725,8 @@ namespace Step43 } { - Amg_preconditioner.reset(); - Mp_preconditioner.reset(); + top_left_preconditioner.reset(); + bottom_right_preconditioner.reset(); darcy_preconditioner_matrix.clear(); BlockDynamicSparsityPattern dsp(darcy_dofs_per_block, @@ -930,11 +931,15 @@ namespace Step43 { assemble_darcy_preconditioner(); - Amg_preconditioner = std::make_shared(); - Amg_preconditioner->initialize(darcy_preconditioner_matrix.block(0, 0)); + top_left_preconditioner = + std::make_shared(); + top_left_preconditioner->initialize( + darcy_preconditioner_matrix.block(0, 0)); - Mp_preconditioner = std::make_shared(); - Mp_preconditioner->initialize(darcy_preconditioner_matrix.block(1, 1)); + bottom_right_preconditioner = + std::make_shared(); + bottom_right_preconditioner->initialize( + darcy_preconditioner_matrix.block(1, 1)); } @@ -1473,12 +1478,12 @@ namespace Step43 const LinearSolvers::InverseMatrix mp_inverse(darcy_preconditioner_matrix.block(1, 1), - *Mp_preconditioner); + *bottom_right_preconditioner); const LinearSolvers::BlockSchurPreconditioner< TrilinosWrappers::PreconditionIC, TrilinosWrappers::PreconditionIC> - preconditioner(darcy_matrix, mp_inverse, *Amg_preconditioner); + preconditioner(darcy_matrix, mp_inverse, *top_left_preconditioner); SolverControl solver_control(darcy_matrix.m(), 1e-16 * darcy_rhs.l2_norm()); -- 2.39.5