From: Jean-Paul Pelteret Date: Fri, 10 May 2019 20:35:31 +0000 (+0200) Subject: Fix two tests missed in #8018. X-Git-Tag: v9.1.0-rc1~72^2~8 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=616aef8506300aa70448ed24d2febcbf89e45082;p=dealii.git Fix two tests missed in #8018. --- diff --git a/tests/adolc/step-44.cc b/tests/adolc/step-44.cc index 7e7c78f18d..5c505338a2 100644 --- a/tests/adolc/step-44.cc +++ b/tests/adolc/step-44.cc @@ -182,7 +182,6 @@ namespace Step44 { std::string type_lin; double tol_lin; - double max_iterations_lin; bool use_static_condensation; std::string preconditioner_type; double preconditioner_relaxation; @@ -204,11 +203,6 @@ namespace Step44 "1e-6", Patterns::Double(0.0), "Linear solver residual (scaled by residual norm)"); - prm.declare_entry( - "Max iteration multiplier", - "1", - Patterns::Double(0.0), - "Linear solver iterations (multiples of the system matrix size)"); prm.declare_entry("Use static condensation", "true", Patterns::Bool(), @@ -231,7 +225,6 @@ namespace Step44 { type_lin = prm.get("Solver type"); tol_lin = prm.get_double("Residual"); - max_iterations_lin = prm.get_double("Max iteration multiplier"); use_static_condensation = prm.get_bool("Use static condensation"); preconditioner_type = prm.get("Preconditioner type"); preconditioner_relaxation = prm.get_double("Preconditioner relaxation"); @@ -1914,8 +1907,7 @@ namespace Step44 std::cout << " SLV " << std::flush; if (parameters.type_lin == "CG") { - const int solver_its = tangent_matrix.block(u_dof, u_dof).m() * - parameters.max_iterations_lin; + const int solver_its = tangent_matrix.block(u_dof, u_dof).m(); const double tol_sol = parameters.tol_lin * system_rhs.block(u_dof).l2_norm(); SolverControl solver_control(solver_its, tol_sol, false, false); @@ -1996,8 +1988,7 @@ namespace Step44 preconditioner_K_Jp_inv.use_matrix( tangent_matrix.block(J_dof, p_dof)); ReductionControl solver_control_K_Jp_inv( - tangent_matrix.block(J_dof, p_dof).m() * - parameters.max_iterations_lin, + tangent_matrix.block(J_dof, p_dof).m(), 1.0e-30, parameters.tol_lin); SolverSelector> solver_K_Jp_inv; @@ -2015,8 +2006,7 @@ namespace Step44 preconditioner_K_con_inv.use_matrix( tangent_matrix.block(u_dof, u_dof)); ReductionControl solver_control_K_con_inv( - tangent_matrix.block(u_dof, u_dof).m() * - parameters.max_iterations_lin, + tangent_matrix.block(u_dof, u_dof).m(), 1.0e-30, parameters.tol_lin); SolverSelector> solver_K_con_inv; diff --git a/tests/adolc/tensor_ops_01.cc b/tests/adolc/tensor_ops_01.cc index 11295a53fd..105442fe46 100644 --- a/tests/adolc/tensor_ops_01.cc +++ b/tests/adolc/tensor_ops_01.cc @@ -90,8 +90,8 @@ test_tensor() adt7 = adt1 * t1; // Outer product - const Tensor<1, dim, number_t> v1; - const Tensor<1, dim, ad_number_t> av1; + const Tensor<1, dim, number_t> v1{}; + const Tensor<1, dim, ad_number_t> av1{}; const AD_Tensor adt8 = outer_product(v1, av1); const AD_Tensor adt9 = outer_product(av1, v1); const AD_Tensor adt10 = outer_product(av1, av1); @@ -168,8 +168,8 @@ test_symmetric_tensor() // const ad_number_t ad_res6 = adt1*t1; // TODO: Overload issue // Outer product - const Tensor<1, dim, number_t> v1; - const Tensor<1, dim, ad_number_t> av1; + const Tensor<1, dim, number_t> v1{}; + const Tensor<1, dim, ad_number_t> av1{}; const AD_STensor adt8 = symmetrize(outer_product(v1, av1)); const AD_STensor adt9 = symmetrize(outer_product(av1, v1)); const AD_STensor adt10 = symmetrize(outer_product(av1, av1));