initialize a SFL-Boozer object, with some parameters taken from the state (globals) Note: as of v0.2.16 (Thanks Christopher Albert) f90wrap supports ALLOCATABLEs in the return value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | mn_max(2) |
parameters for the Boozer object |
||
| integer, | intent(in) | :: | mn_nyq(2) |
parameters for the Boozer object |
||
| character(len=8), | intent(in) | :: | sin_cos |
can be either only sine: " sin" only cosine: " cos" or full: "sin_cos" |
||
| integer, | intent(in) | :: | nrho |
parameters for the Boozer object |
||
| real, | intent(in), | DIMENSION(nrho) | :: | rho_pos |
radial positions |
|
| logical, | intent(in) | :: | relambda |
recompute lambda flag |
SFL-Boozer object
FUNCTION init_boozer(mn_max, mn_nyq, sin_cos, nrho, rho_pos, relambda) RESULT(sfl_boozer) ! MODULES USE MODgvec_SFL_Boozer, ONLY: t_sfl_boozer USE MODgvec_MHD3D_vars, ONLY: hmap, iota_profile, Phi_profile ! INPUT/OUTPUT VARIABLES ------------------------------------------------------------------------------------------------------! TYPE(t_sfl_boozer) :: sfl_boozer !! SFL-Boozer object INTEGER, INTENT(IN) :: mn_max(2), mn_nyq(2), nrho !! parameters for the Boozer object CHARACTER(LEN=8), INTENT(IN) :: sin_cos !! can be either only sine: " _sin_" only cosine: " _cos_" or full: "_sin_cos_" REAL, INTENT(IN), DIMENSION(nrho) :: rho_pos !! radial positions LOGICAL, INTENT(IN) :: relambda !! recompute lambda flag ! LOCAL VARIABLES -------------------------------------------------------------------------------------------------------------! INTEGER :: i REAL, DIMENSION(nrho) :: iota, phiPrime ! iota and phiPrime ! CODE ------------------------------------------------------------------------------------------------------------------------! DO i = 1,nrho iota(i) = iota_profile%eval_at_rho(rho_pos(i)) phiPrime(i) = Phi_profile%eval_at_rho(rho_pos(i),deriv=1) END DO sfl_boozer = t_sfl_boozer(mn_max, mn_nyq, nfp, sin_cos, hmap, nrho, rho_pos, iota, phiPrime, relambda) END FUNCTION init_boozer