initialize the type hmap_frenet, reading from parameterfile and then call init_params
self
FUNCTION hmap_frenet_init() RESULT(sf) ! MODULES USE MODgvec_ReadInTools, ONLY: GETLOGICAL,GETINT, GETREALARRAY IMPLICIT NONE !----------------------------------------------------------------------------------------------------------------------------------- ! INPUT VARIABLES !----------------------------------------------------------------------------------------------------------------------------------- ! OUTPUT VARIABLES TYPE(t_hmap_frenet) :: sf !! self !----------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES INTEGER :: nfp,n_max,nvisu REAL(wp),ALLOCATABLE :: Rc(:),Rs(:),Zc(:),Zs(:) LOGICAL :: omnig !=================================================================================================================================== SWRITE(UNIT_stdOut,'(4X,A)')'INIT HMAP :: FRENET FRAME OF A CLOSED CURVE . GET PARAMETERS:' nfp = GETINT("hmap_nfp") n_max = GETINT("hmap_n_max") nvisu = GETINT("hmap_nvisu",-1) ALLOCATE(Rc(0:n_max)) ; Rc=0.0_wp ; Rc=GETREALARRAY("hmap_rc",n_max+1,Rc) ALLOCATE(Rs(0:n_max)) ; Rs=0.0_wp ; Rs=GETREALARRAY("hmap_rs",n_max+1,Rs) ALLOCATE(Zc(0:n_max)) ; Zc=0.0_wp ; Zc=GETREALARRAY("hmap_zc",n_max+1,Zc) ALLOCATE(Zs(0:n_max)) ; Zs=0.0_wp ; Zs=GETREALARRAY("hmap_zs",n_max+1,Zs) omnig=GETLOGICAL("hmap_omnig",.FALSE.) !omnigenity sf=hmap_frenet_init_params(nfp,n_max,nvisu,Rc,Rs,Zc,Zs,omnig) DEALLOCATE(rc,rs,zc,zs) END FUNCTION hmap_frenet_init