get_booz_newton Function

private function get_booz_newton(x0, bounds, AB_fbase_in, A_in, B_in) result(x_out)

Uses

  • proc~~get_booz_newton~~UsesGraph proc~get_booz_newton get_booz_newton module~modgvec_fbase MODgvec_fBase proc~get_booz_newton->module~modgvec_fbase module~modgvec_newton MODgvec_Newton proc~get_booz_newton->module~modgvec_newton module~modgvec_globals MODgvec_Globals module~modgvec_fbase->module~modgvec_globals module~modgvec_newton->module~modgvec_globals iso_fortran_env iso_fortran_env module~modgvec_globals->iso_fortran_env

This function returns the result of the 2D newton root search for the boozer angle

Arguments

Type IntentOptional 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)

Return Value real(kind=wp), (2)


Calls

proc~~get_booz_newton~~CallsGraph proc~get_booz_newton get_booz_newton interface~newtonroot2d NewtonRoot2D proc~get_booz_newton->interface~newtonroot2d interface~newtonroot2d->interface~newtonroot2d

Called by

proc~~get_booz_newton~~CalledByGraph proc~get_booz_newton get_booz_newton proc~find_boozer_angles find_boozer_angles proc~find_boozer_angles->proc~get_booz_newton proc~self_find_boozer_angles t_sfl_boozer%self_find_boozer_angles proc~self_find_boozer_angles->proc~find_boozer_angles proc~self_find_boozer_angles_irho t_sfl_boozer%self_find_boozer_angles_irho proc~self_find_boozer_angles_irho->proc~find_boozer_angles proc~buildtransform_sfl t_transform_sfl%BuildTransform_SFL proc~buildtransform_sfl->proc~self_find_boozer_angles

Source Code

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