Logo

← Back to 3MAH


Contents:

  • Overview
  • Installation
  • Quick Start
  • Geometry and Mesh (fedoo.mesh)
  • Constitutive Law (fedoo.constitutivelaw)
  • Weak Formulation (fedoo.weakform)
  • Class Assembly
  • Time Integration (fedoo.time)
  • Problem (fedoo.problem)
    • fedoo.problem.Linear
    • fedoo.problem.NonLinear
      • fedoo.problem.NonLinear.add_global_dof
      • fedoo.problem.NonLinear.add_line_search
      • fedoo.problem.NonLinear.add_output
      • fedoo.problem.NonLinear.apply_boundary_conditions
      • fedoo.problem.NonLinear.change_assembly
      • fedoo.problem.NonLinear.compute_nr_error
      • fedoo.problem.NonLinear.elastic_prediction
      • fedoo.problem.NonLinear.force_elastic_matrix_next_iter
      • fedoo.problem.NonLinear.get_A
      • fedoo.problem.NonLinear.get_B
      • fedoo.problem.NonLinear.get_D
      • fedoo.problem.NonLinear.get_X
      • fedoo.problem.NonLinear.get_active
      • fedoo.problem.NonLinear.get_all
      • fedoo.problem.NonLinear.get_disp
      • fedoo.problem.NonLinear.get_dof_solution
      • fedoo.problem.NonLinear.get_ext_forces
      • fedoo.problem.NonLinear.get_results
      • fedoo.problem.NonLinear.get_rot
      • fedoo.problem.NonLinear.get_temp
      • fedoo.problem.NonLinear.init_bc_start_value
      • fedoo.problem.NonLinear.initialize
      • fedoo.problem.NonLinear.invalidate_factorization
      • fedoo.problem.NonLinear.make_active
      • fedoo.problem.NonLinear.nlsolve
      • fedoo.problem.NonLinear.remove_line_search
      • fedoo.problem.NonLinear.reset
      • fedoo.problem.NonLinear.save_results
      • fedoo.problem.NonLinear.set_A
      • fedoo.problem.NonLinear.set_B
      • fedoo.problem.NonLinear.set_D
      • fedoo.problem.NonLinear.set_X
      • fedoo.problem.NonLinear.set_active
      • fedoo.problem.NonLinear.set_dof_solution
      • fedoo.problem.NonLinear.set_nr_criterion
      • fedoo.problem.NonLinear.set_reuse_factorization
      • fedoo.problem.NonLinear.set_solver
      • fedoo.problem.NonLinear.set_start
      • fedoo.problem.NonLinear.set_time_integrator
      • fedoo.problem.NonLinear.solve
      • fedoo.problem.NonLinear.solve_nr_increment
      • fedoo.problem.NonLinear.solve_time_increment
      • fedoo.problem.NonLinear.to_start
      • fedoo.problem.NonLinear.update
      • fedoo.problem.NonLinear.updateA
      • fedoo.problem.NonLinear.updateD
      • fedoo.problem.NonLinear.update_boundary_conditions
      • fedoo.problem.NonLinear.active
      • fedoo.problem.NonLinear.assembly
      • fedoo.problem.NonLinear.global_dof
      • fedoo.problem.NonLinear.n_dof
      • fedoo.problem.NonLinear.n_global_dof
      • fedoo.problem.NonLinear.n_iter
      • fedoo.problem.NonLinear.n_node_dof
      • fedoo.problem.NonLinear.name
      • fedoo.problem.NonLinear.results
      • fedoo.problem.NonLinear.solver
      • fedoo.problem.NonLinear.space
      • fedoo.problem.NonLinear.t_fact
      • fedoo.problem.NonLinear.t_fact_old
      • fedoo.problem.NonLinear.nr_parameters
      • fedoo.problem.NonLinear.bc
    • fedoo.problem.Newmark
    • fedoo.problem.NonLinearNewmark
    • fedoo.problem.ExplicitDynamic
    • fedoo.core.base.ProblemBase
    • fedoo.Problem
  • Boundary conditions and constraints
  • Post-Processing
  • Examples
  • Heterogeneous structures
fedoo
  • Problem (fedoo.problem)
  • fedoo.problem.NonLinear
  • fedoo.problem.NonLinear.add_line_search
  • View page source

fedoo.problem.NonLinear.add_line_search

NonLinear.add_line_search(method='Quadratic', name=None)

Add line search algorithm for the Newton-Raphson solver.

Line search improves global convergence by scaling the displacement increment \(dX\) by a step size \(\alpha \in (0, 1]\). This is particularly useful for problems with sharp non-linearities or when the initial guess is far from the equilibrium.

Parameters:
  • method ({'Armijo', 'Residual', 'Energy', 'Quadratic'} or callable, default 'Quadratic') –

    The strategy used to determine or refine the step size:

    • ’Armijo’: Ensures a “sufficient decrease” in the residual using a least-square assumption. Standard for most nonlinear applications.

    • ’Residual’: Simple backtracking that accepts any step reducing the residual norm. Fast but less robust.

    • ’Energy’: Minimizes the out-of-balance work (residual projected onto the search direction). Ideal for snap-through/buckling.

    • ’Quadratic’: Performs a parabolic interpolation of the objective function to jump directly to the estimated minimum.

    • callable: If a function is provided, it must follow the signature user_line_search(pb, dX) -> float and will be assigned directly as the line search callback.

  • name (str, optional) – A unique identifier for the line search. If not provided, it defaults to ‘standard’ for built-in methods, or the function’s name for callables.

Notes

  • Implementation: This method sets the _step_size_callback attribute of the problem instance. Parameters like ls_max_iter and ls_method are stored within the self.nr_parameters dictionary.

  • Objective Function: For ‘Armijo’ and ‘Quadratic’ methods, the solver minimizes the squared L2-norm of the residual:

    \[\phi(\alpha) = \frac{1}{2} \|R(u + \alpha dX)\|^2\]
  • Work Criterion: The ‘Energy’ method minimizes the directional derivative of the potential energy (the external work).

  • Safeguards: To prevent solver stagnation, interpolated values are clipped such that \(\alpha_{new} \in [0.1\alpha, 0.5\alpha]\).

Example

>>> # Using a built-in method
>>> my_problem.add_line_search(method="Quadratic")
>>> # Using a custom function
>>> def my_ls(pb, dX): return 0.5
>>> my_problem.add_line_search(method=my_ls)
Previous Next

© Copyright 2019, Etienne Prulière.

Built with Sphinx using a theme provided by Read the Docs.