fedoo.problem.NonLinearNewmark.set_nr_criterion
- NonLinearNewmark.set_nr_criterion(criterion='Force', **kargs)
Define the convergence criterion of the newton raphson algorithm.
For a problem pb, the newton raphson parameters can also be directly set in the pb.nr_parameters dict.
- Parameter:
criterion: str in [‘Displacement’, ‘Force’, ‘Work’], default = “Displacement”. Type of convergence test.
- Optional parameters that can be set as kargs:
‘err0’: float or None, default = None. The reference error. If None (default), err0 is automatically computed.
‘tol’: float, default is 5e-3. Error tolerance for convergence.
‘max_subiter’: int, default = 16. Number of nr iterations before returning a convergence error.
‘dt_increase_niter’: int or None, default = None. Number of nr iterations threshold that define an easy convergence. In problem allowing automatic convergence, if the Newton–Raphson loop converges in strictly fewer iterations, the time step is increased. If None, defaults to max_subiter//3.
‘norm_type’: int or numpy.inf, default = 2. Define the norm used to test the criterion.
‘force_elastic_stiffness’: bool, default = False. If True, always forces the use of the elastic stiffness matrix (KE) for all NR iterations (Quasi-Newton / Initial Stiffness method).
‘elastic_initial_guess’: bool, default = False. If True, forces the use of the elastic matrix for the initial guess (first iteration) of a time increment. Ignored if force_elastic_stiffness is True.
‘adaptive_stiffness’: bool, default = False. Enable adaptive stiffness algorithm with xi-blending between safe (often elastic) and tangent stiffness matrices to enhance convergence robustness. Only works if the weak form provides an elastic stiffness matrix at the beginning of the increment, when set_start is triggered (e.g. not for contact problems). Ignored if force_elastic_stiffness is True.
‘assume_cvg_at_max_subiter’: bool, default = False. WARNING: DANGEROUS PARAMETER. If True, assumes convergence when max_subiter iterations are reached, regardless of tolerance criterion. Use only for special cases requiring forced convergence. Skips convergence tolerance check when iteration limit is reached.
‘eigenvalue_shift’: bool, default = False. If True, adds a shifted identity matrix to improve conditioning: A_eff = A + alpha*I where alpha = eigenvalue_shift_factor * R. R is estimated via Rayleigh quotient of the current stiffness.
‘eigenvalue_shift_factor’: float, default = 1e-4. Scaling factor for the eigenvalue shift margin. Larger values = stronger stabilization but less accuracy. Smaller values = more accurate but weaker stabilization.
‘eigenvalue_assume_sym’: bool, default = True. If True, uses the symmetric Lanczos solver (eigsh) for efficiency. If False, uses the general Arnoldi solver (eigs) to account for non-symmetric tangent terms.
‘check_early_divergence’: bool, default = True. If True, aborts the time step early if convergence trends are poor. A step is considered diverging if: 1. The error remains “unproductive” (new_error > 0.999 * previous_error)
for 3 consecutive Newton-Raphson iterations.
The error spikes to more than 100 times the previous error.