You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
preprocess the unknowns y = pre(x) and by consequence, calculate f as f(y, *args); this defaults to pre = lambda x: x
update the solution x = update(x, dx); this defaults to lambda x, dx: x + dx
check if success success = check(dx, x, f); this defaults to check = lambda dx, x, f, tol=np.finfo(float).eps: np.linalg.norm(dx) < tol
With this modifications it should be possible to combine contique and felupe. The resulting newtonrhapson function should be very abstract and hence, the code should have good readability.
The text was updated successfully, but these errors were encountered:
adtzlr
changed the title
[Enhancement] Add optional
[Enhancement] Add optional preprocessing of unknowns as well as user-defined update and check functions
Jul 13, 2021
adtzlr
changed the title
[Enhancement] Add optional preprocessing of unknowns as well as user-defined update and check functions
[Enhancement] Add user-defined pre-modification of unknowns as well as update and check functions in Newton-Rhapson iterations
Jul 13, 2021
adtzlr
changed the title
[Enhancement] Add user-defined pre-modification of unknowns as well as update and check functions in Newton-Rhapson iterations
Add user-defined pre-modification of unknowns as well as update and check functions in Newton-Rhapson iterations
Jul 13, 2021
This should involve
y = pre(x)
and by consequence, calculatef
asf(y, *args)
; this defaults topre = lambda x: x
x = update(x, dx)
; this defaults tolambda x, dx: x + dx
success = check(dx, x, f)
; this defaults tocheck = lambda dx, x, f, tol=np.finfo(float).eps: np.linalg.norm(dx) < tol
With this modifications it should be possible to combine
contique
andfelupe
. The resultingnewtonrhapson
function should be very abstract and hence, the code should have good readability.The text was updated successfully, but these errors were encountered: