From 04161113a7ff6f825daaefcf64aec9e0e05bd93d Mon Sep 17 00:00:00 2001 From: Guillaume Giudicelli Date: Sun, 23 Nov 2025 10:42:15 -0700 Subject: [PATCH 1/2] Add warning on using the absolute step tolerance refs #4328 --- src/solvers/petsc_nonlinear_solver.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/solvers/petsc_nonlinear_solver.C b/src/solvers/petsc_nonlinear_solver.C index 960c7707ea9..12e6040532a 100644 --- a/src/solvers/petsc_nonlinear_solver.C +++ b/src/solvers/petsc_nonlinear_solver.C @@ -970,6 +970,10 @@ PetscNonlinearSolver::solve (SparseMatrix & pre_in, // System Preconditi this->max_nonlinear_iterations, this->max_function_evaluations)); + // Not supported by PETSc + if (this->absolute_step_tolerance != 0) // 0 is default value, both in MOOSE and libMesh + libmesh_warning("Setting the absolute step tolerance is not supported with the PETSc nonlinear solver."); + // Set the divergence tolerance for the non-linear solver #if !PETSC_VERSION_LESS_THAN(3,8,0) LibmeshPetscCall(SNESSetDivergenceTolerance(_snes, this->divergence_tolerance)); From e7da3a2583bfb943c6fa8e415dbcfdb320d78967 Mon Sep 17 00:00:00 2001 From: Guillaume Giudicelli Date: Sun, 23 Nov 2025 10:48:38 -0700 Subject: [PATCH 2/2] Add warning for relative step tolerance, unused by trilinos solver --- src/solvers/trilinos_nox_nonlinear_solver.C | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/solvers/trilinos_nox_nonlinear_solver.C b/src/solvers/trilinos_nox_nonlinear_solver.C index 63db6d58286..b08a23af32a 100644 --- a/src/solvers/trilinos_nox_nonlinear_solver.C +++ b/src/solvers/trilinos_nox_nonlinear_solver.C @@ -385,6 +385,9 @@ NoxNonlinearSolver::solve (SparseMatrix & /* jac_in */, // System Jacobi Teuchos::RCP grpPtr = Teuchos::rcp(new NOX::Epetra::Group(printParams, iReq, x, linSys)); NOX::Epetra::Group & grp = *(grpPtr.get()); + if (this->relative_step_tolerance != 0) // 0 is default value + libmesh_warning("Setting the relative step tolerance is currently not supported with the trilinos nox nonlinear solver."); + Teuchos::RCP absresid = Teuchos::rcp(new NOX::StatusTest::NormF(this->absolute_residual_tolerance, NOX::StatusTest::NormF::Unscaled)); Teuchos::RCP relresid =