autopdex.solver.solve_damped_newton

autopdex.solver.solve_damped_newton(dofs, settings, static_settings, newton_tol=1e-08, damping_coefficient=0.8, maxiter=30, **kwargs)[source]

Solves a nonlinear system using the damped Newton method.

This function performs damped Newton iterations to solve a nonlinear system, with support for nodal imposition of Dirichlet boundary conditions specified as a boolean tuple-tree in static_settings[‘dirichlet dofs’].

In this function the information needed for solver.damped_newton is prepared and the function is then called.

Parameters:
  • dofs (jnp.ndarray or dict) – Degrees of freedom or initial guess for the solution.

  • settings (dict) – Dictionary containing various settings and parameters required for assembling the problem.

  • static_settings (dict) – Dictionary containing static settings such as solution structure and solver backend.

  • newton_tol (float, optional) – Tolerance for the Newton method convergence criterion. Default is 1e-8.

  • damping_coefficient (float, optional) – Damping coefficient for the Newton updates. Default is 0.8.

  • maxiter (int, optional) – Maximum number of iterations for the Newton method. Default is 30.

  • **kwargs (dict) – Additional keyword arguments passed to the solver function.

Returns:

A tuple containing the following elements:
  • sol (jnp.ndarray): The solution obtained by solving the nonlinear system using the damped Newton method.

  • infos (tuple): Additional information about the solution process, including:
    • num_iterations (int): The number of iterations performed.

    • residual_norm (float): The norm of the residual at the solution.

    • diverged (bool): Flag indicating whether the method diverged.

Return type:

tuple