This function returns the result of the 2D newton root search for the boozer angle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x0(2) | |||
| real(kind=wp), | intent(in) | :: | bounds(2) | |||
| type(t_fBase), | intent(in), | TARGET | :: | AB_fbase_in | ||
| real(kind=wp), | intent(in), | TARGET | :: | A_in(1:AB_fbase_in%modes) | ||
| real(kind=wp), | intent(in), | TARGET | :: | B_in(1:AB_fbase_in%modes) |
FUNCTION get_booz_newton(x0,bounds,AB_fbase_in,A_in,B_in) RESULT(x_out) USE MODgvec_fbase ,ONLY: t_fbase USE MODgvec_Newton ,ONLY: NewtonRoot2D IMPLICIT NONE ! INPUT VARIABLES -------------------------! REAL(wp),INTENT(IN) :: x0(2),bounds(2) TYPE(t_fbase),INTENT(IN), TARGET :: AB_fbase_in REAL(wp),INTENT(IN), TARGET :: A_in(1:AB_fbase_in%modes),B_in(1:AB_fbase_in%modes) ! OUTPUT VARIABLES -------------------------! REAL(wp) :: x_out(2) ! LOCAL VARIABLES --------------------------! TYPE(t_newton_Root2D_boozer) :: fobj ! CODE --------------------------------------------------------------------------------------------------------------------------! ! a b maxstep , xinit ,funcs, funcs_jac fobj%AB_fbase_in => AB_fbase_in fobj%A_in => A_in fobj%B_in => B_in fobj%x0 = x0 x_out = NewtonRoot2D(1.0e-12_wp,x0-bounds,x0+bounds,0.1_wp*bounds,x0,fobj) END FUNCTION get_booz_newton