fedoo.problem.NonLinear.nlsolve
- NonLinear.nlsolve(dt: float = 0.1, update_dt: bool = True, tmax: float | None = None, t0: float | None = None, dt_min: float = 1e-06, max_subiter: int | None = None, tol_nr: float | None = None, print_info: int | None = None, save_at_exact_time: bool | None = None, interval_output: int | float | None = None, callback: Callable[[Problem, ...], None] | None = None, exec_callback_at_each_iter: bool | None = None) None
Solve the non linear problem using the newton-raphson algorithm.
- Parameters:
dt (float, default=0.1) – Initial time increment
update_dt (bool, default = True) – If True, the time increment may be modified during resolution: * decrease if the solver has not converged * increase if the solver has converged in one iteration.
tmax (float, optional.) – Time at the end of the time step. If omitted, the attribute tmax is considered (default = 1.) else, the attribute tmax is modified.
t0 (float, optional.) – Time at the start of the time step. If omitted, the attribute t0 is considered (default = 0.) else, the attribute t0 is modified.
dt_min (float, default = 1e-6) – Minimal time increment
max_subiter (int, optional) – Maximal number of newton raphson iteration at for each time increment. If omitted, the ‘max_subiter’ field in the nr_parameters attribute (ie nr_parameters[‘max_subiter’]) is considered (default = 5).
tol_nr (float, optional) – Tolerance of the newton-raphson algorithm. If omitted, the ‘tol’ field in the nr_parameters attribute (ie nr_parameters[‘tol’]) is considered (default = 5e-3).
print_info (int, optional) – Level of information printed to console. If 0, nothing is printed If 1, iterations info are printed If 2, iterations and newton-raphson sub iterations info are printed. If omitted, the print_info attribute is considered (default = 1).
save_at_exact_time (bool, optional) – If True, the time increment is modified to stop at times defined by interval_output and allow to save results. If omitted, the save_at_exact_time attribute is considered (default = True). The given value is stored in the save_at_exact_time attribute.
interval_output (int|float, optional) – Time step for output if save_at_exact_time is True (default) else number of iter increments between 2 output If interval_output == -1, the results is saved at each initial time_step intervals or each increment depending on the save_at_exact_time value. If omitted, the interval_output attribute is considred (default -1)
callback (function, optional) – The callback function is executed automatically during the non linear resolution. By default, the callback function is executed when output is requested (defined by the interval_output argument). If exec_callback_at_each_iter is True, the callback function is excuted at each time iteration.
exec_callback_at_each_iter – If True, the callback function is executed after each time iteration.
bool – If True, the callback function is executed after each time iteration.
False (default =) – If True, the callback function is executed after each time iteration.