V3FIT
optim_params.f
1  MODULE optim_params
2  USE vparams, ONLY: rprec, dp, nsd, ntord, ntor1d, mpol1d
3  USE vsvd0, ONLY: nigroup
4  IMPLICIT NONE
5 !-----------------------------------------------
6 ! L o c a l P a r a m e t e r s
7 !-----------------------------------------------
8  INTEGER, PARAMETER :: NumJstard = 10
9  INTEGER, PARAMETER :: ini_max=100 !! COBRA
10  REAL(rprec) :: bigno = 1.e10_dp
11 !-----------------------------------------------
12 ! L o c a l V a r i a b l e s
13 !-----------------------------------------------
14  INTEGER :: niter_opt, NumJstar, NumJinvariant,
15  1 mboz_opt, nboz_opt, nbmn, nproc, jboot !LPK
16  INTEGER :: num_processors, num_levmar_params
17  INTEGER, DIMENSION(20) :: n_jac, m_jac
18  INTEGER, DIMENSION(20) :: n_vac_island, m_vac_island
19  REAL(rprec) :: r00_scale, b00_scale, epsfcn, rgrid_min, rgrid_max,
20  1 zgrid_min, zgrid_max, r00_opt
21  REAL(rprec) :: sigma_jstar(nsd, NumJstard),
22  1 sigma_jinvariant(nsd, NumJstard)
23  REAL(rprec), DIMENSION(nsd) ::
24  1 sigma_iota, sigma_mercier, sigma_vp
25  REAL(rprec), DIMENSION(nsd) :: sigma_bmin,
26  1 sigma_bmax, sigma_ripple, sigma_bmn, nsurf_mask
27  REAL(rprec) :: sigma_aspect, sigma_ellipticity, sigma_maxcurrent,
28  1 sigma_coil_complex, sigma_curv, sigma_beta, target_aspectratio,
29  2 target_maxcurrent, target_beta, target_rmax, target_rmin,
30  3 target_ellipticity, sigma_rmax, sigma_rmin, sigma_iota_max,
31  4 sigma_iota_min, target_iota_max, target_iota_min
32  5 ,sigma_centering !!Obsolete, replaced by sigma_rmax, sigma_rmin
33  REAL(rprec) :: coil_separation, phiedge_min, phiedge_max
34  REAL(rprec), DIMENSION(0:10) :: target_iota, target_well,
35  1 at, aseedcur, fboot !!LPK
36  REAL(rprec) :: sigma_bal, sigma_boot, zeff_boot, !!LPK
37  1 sigma_fluxp, target_fluxp, sigma_zmax, target_zmax,
38  2 sigma_pseudo, sigma_pseudo2, sigma_rbtor, target_rbtor
39  REAL(rprec), DIMENSION(9) :: sigma_kink, target_kink
40  REAL(rprec), DIMENSION(20) :: sigma_jac, sigma_vac_island
41 
42  COMPLEX :: helicity
43  LOGICAL :: lfix_ntor(-ntord:ntord),
44  1 lfix_rhob(-ntord:ntord,0:mpol1d+1)
45  LOGICAL, DIMENSION(nsd) :: lsurf_mask, ldkes_mask
46  LOGICAL :: lextcur(nigroup), lcoilp_sep
47  LOGICAL :: lreset_opt, lbmn, lcoil_complex, ledge_current,
48  1 lcur_prof_opt, liota_prof_opt, lbootsj_opt, lj_star,
49  2 lj_invariant, lcoil_opt, lcoil_geom, laspect_max, lbeta_min,
50  3 lvac_opt, lphiedge,
51  4 lbal_opt, lbootstrap, lseedcur, lkink_opt, lnescoil_opt !!LPK
52  5 ,lcurprof_opt, lprof_opt, lpress_opt, lboundary !!Obsolete, replaced by lcur_prof_opt, liota_prof_opt, lpres_prof_opt
53  LOGICAL :: lreconp, lreconj, lp1zero, lj1zero
54  INTEGER :: kpp, kjj
55  CHARACTER(len=100) :: seq_ext, opt_ext
56  CHARACTER(len=200) :: v3rfun_dir, v3post_in
57  LOGICAL :: lv3post
58  CHARACTER(len=4) :: sym_type
59 
60  REAL(rprec) :: target_coil_complex, target_coil_jmax !!LPK
61  REAL(rprec) :: sigma_coil_jmax, sigma_berr_ave !!LPK, SPH
62 
63  REAL(rprec), DIMENSION(nsd) :: sigma_neo, nneo_mask !! NEO
64  LOGICAL, DIMENSION(nsd) :: lneo_mask !! NEO
65  LOGICAL :: lneo_opt !! NEO
66  REAL(rprec), DIMENSION(nsd) :: sigma_dsubr
67  LOGICAL :: ldsubr_opt
68  REAL(rprec) :: sigma_orbit
69  LOGICAL :: lorbit_opt
70  INTEGER :: nopt_alg, nopt_boundary
71  LOGICAL :: ldiag_opt, lkeep_mins !! Diagnostic output
72 
73  REAL(rprec) :: sigma_kappa, target_kappa, sigma_oh
74  REAL(rprec), DIMENSION(nigroup) :: sigma_extcur, oh_coefs
75  REAL(rprec), DIMENSION(0:10) :: target_iota_p
76  REAL(rprec), DIMENSION(nsd) :: sigma_iota_pmax, sigma_iota_pmin
77 
78  INTEGER :: nini_theta, nini_zeta, nini_tot !! COBRA
79  REAL(rprec), DIMENSION(nsd) :: sigma_balloon, sigma_pgrad,
80  1 target_balloon !! COBRA
81  REAL(rprec), DIMENSION(ini_max):: bal_theta0, bal_zeta0 !! COBRA
82 
83  REAL(rprec) :: sigma_pedge(1) !! COBRA
84  REAL(rprec) :: sigma_bootsj(nsd)
85  LOGICAL :: lballoon_mask(nsd) !! COBRA
86  LOGICAL :: lballoon_opt, lpres_prof_opt !! COBRA
87 
88  REAL(rprec) :: nballoon_mask(nsd) !! VMECCOBRA (RS)
89  LOGICAL :: l_legendre !! LEGENDRE (RS)
90 
91  REAL(rprec), DIMENSION(nsd) :: ndkes_mask, dkes_nu, dkes_efield,
92  1 sigma_dkes !! RHF
93  LOGICAL :: ldkes_opt !! RHF
94 
95  REAL(rprec) :: sigma_vv, sigma_vv_rms, vv_dist, vv_dist_rms,
96  1 target_vv, target_vv_rms !! RH & MZ
97  INTEGER :: mpol_vv, ntor_vv, nu_vv, nv_vv
98  REAL(rprec), DIMENSION(-ntord:ntord,0:mpol1d) ::
99  1 rbc_vv, zbs_vv
100  LOGICAL :: shapeweight
101 CEAL ! deviation weighting defaults
102  REAL(rprec) :: theta0_bw(3), phi0_bw,
103  1 wtheta_bw, wphi_bw, amplw_bw(3), planes_bw(3)
104 
105  REAL(rprec) :: sigma_diagno(1000), data_diagno(1000)
106  CHARACTER(len=30) :: name_diagno(1000)
107 
108  namelist /optimum/ epsfcn, niter_opt, num_processors, &
109  & num_levmar_params, nsurf_mask, nopt_alg, nopt_boundary, &
110  & lreset_opt, ldiag_opt, lkeep_mins, lbmn, lj_star, laspect_max, &
111  & lbeta_min, lj_invariant, liota_prof_opt, lcur_prof_opt, &
112  & ledge_current, lphiedge, lbootsj_opt, lkink_opt, lballoon_opt, &
113  & l_legendre, ldkes_opt, lneo_opt, ldsubr_opt, lorbit_opt, &
114  & lpres_prof_opt, lnescoil_opt, lcoil_geom, lv3post, lvac_opt, &
115  & lfix_ntor, lfix_rhob, lextcur, sigma_extcur, oh_coefs,sigma_oh,&
116  & r00_opt, r00_scale, b00_scale, rgrid_min, rgrid_max, &
117  & zgrid_min, zgrid_max, mboz_opt, nboz_opt, phiedge_min, &
118  & phiedge_max, coil_separation, target_aspectratio, sigma_aspect,&
119  & target_beta, sigma_beta, target_kink, sigma_kink, &
120  & target_maxcurrent, sigma_maxcurrent, target_rmax, sigma_rmax, &
121  & target_rmin, sigma_rmin, target_zmax, sigma_zmax, target_kappa,&
122  & sigma_kappa,target_ellipticity,sigma_ellipticity, target_fluxp,&
123  & sigma_fluxp, target_rbtor, sigma_rbtor, target_coil_complex, &
124  & sigma_coil_complex, target_coil_jmax, sigma_coil_jmax, &
125  & target_iota, sigma_iota, target_iota_p, sigma_iota_pmax, &
126  & sigma_iota_pmin, target_iota_min, sigma_iota_min, &
127  & target_iota_max, sigma_iota_max, sigma_curv, sigma_berr_ave, &
128  & sigma_pseudo, sigma_pseudo2, sigma_mercier, sigma_jac, n_jac, &
129  & m_jac, n_vac_island, m_vac_island, sigma_vac_island, helicity,&
130  & sigma_bmin, sigma_bmax, sigma_bmn, sigma_ripple, numjstar, &
131  & numjinvariant, sigma_jstar, sigma_jinvariant, nballoon_mask, &
132  & target_balloon, sigma_balloon, sigma_pgrad, sigma_pedge, &
133  & bal_theta0, bal_zeta0, fboot, aseedcur,sigma_bootsj,ndkes_mask,&
134  & dkes_nu, dkes_efield, sigma_dkes, nneo_mask, sigma_neo, &
135  & sigma_dsubr, sigma_orbit, v3rfun_dir, v3post_in, name_diagno, &
136  & data_diagno, sigma_diagno, target_vv, sigma_vv, target_vv_rms, &
137  & lreconp, lp1zero, kpp, lreconj, lj1zero, kjj, &
138  & sigma_vv_rms, mpol_vv, ntor_vv, nu_vv, nv_vv, rbc_vv, zbs_vv, &
139  & shapeweight, planes_bw, amplw_bw, theta0_bw,phi0_bw, wtheta_bw,&
140  & wphi_bw,
141  & lcoil_complex, lballoon_mask, ldkes_mask, lseedcur, lneo_mask &
142  & ,lsurf_mask, lcurprof_opt, lprof_opt, target_well, lcoil_opt & !!Obsolete, retain for consistency
143  & ,sigma_centering, lpress_opt, lbootstrap, lbal_opt, lboundary &
144  & ,sigma_vp, sym_type, sigma_boot, sigma_bal, nproc, nbmn &
145  & ,zeff_boot, jboot, at
146 !
147 ! VARIABLE DESCRIPTIONS
148 !------------------------------------
149 ! SCALARS/VECTORS
150 !------------------------------------
151 ! nopt_alg determines the algorithm for optimization
152 ! 0 = Levenberg-Marquardt (default)
153 ! 1 = Genetic (GA)
154 ! 2 = Differential Evolution (DE)
155 ! nopt_boundary determines internal representation used for optimization
156 ! in fixed-boundary runs (LFREEB=.f)
157 ! 0 = Hirshman-Breslau (default)
158 ! 1 = Advanced HB
159 ! 2 = Garabedian delta_mn
160 ! niter_opt Maximum number of optimization iterations
161 ! num_processors Maximum number of processors to try and use simultaneously
162 ! (obsolescent: nproc)
163 ! num_levmar_params
164 ! nproc
165 ! epsfcn 'Annealing' parameter, 1.E-2 or less. If
166 ! lreset_opt=F, epsfcn <= 1.E-3; if lreset_opt=T,
167 ! epsfcn <= 1.E-4 is recommended
168 ! r00_scale
169 ! b00_scale
170 ! r00_opt
171 ! mboz_opt User-input number of poloidal boozer modes
172 ! nboz_opt User-input number of toroidal boozer modes
173 ! numJstar
174 ! numJInvariant
175 ! sym_type
176 ! m_vac_island, n_vac_island
177 ! m_jac, n_jac
178 ! jboot
179 ! fboot
180 ! at
181 ! aseedcur
182 ! dkes_nu
183 ! dkes_efield
184 ! mpol_vv, ntor_vv
185 ! coil_separation,
186 ! bal_theta0, bal_zeta0
187 ! rgrid_min, rgrid_max
188 ! zgrid_min, zgrid_max
189 ! nbmn
190 ! zeff_boot
191 ! oh_coefs
192 ! rbc_vv, zbs_vv
193 ! theta0_bw, phi0_bw, amplw_bw
194 ! planes_bw
195 !------------------------------------
196 ! CONTROL-MASK ARRAYS
197 !------------------------------------
198 ! nsurf_mask Real array (size=nrad) giving the fractional radial s-values
199 ! at which optimizations are to be done for bmin, bmax, Jinvariant,
200 ! DKES, NEO calculations
201 ! lsurf_mask (obs) Logical array (size=nrad); use nsurf_mask
202 ! nballoon_mask Real array (size=nrad) containing fractional radial s-values
203 ! where ballooning growth rates are to be computed
204 ! lballoon_mask (obs) Logical array (size=nrad) designating surfaces where
205 ! ballooning growth rates are to be computed (=T); use nballoon mask
206 ! lextcur Logical array (size>=nextcur); if (i-th) element =T and lfreeb=True,
207 ! extcur(i) will be varied as an independent variable.
208 ! ndkes_mask
209 ! ldkes_mask
210 ! nneo_mask
211 ! lneo_mask
212 !------------------------------------
213 ! LOGICAL CONTROL VARIABLES
214 !------------------------------------
215 ! lreset_opt =F, VMEC runs without resetting (after convergence)
216 ! to a coarse radial grid
217 ! =T (default), VMEC resets after each new iteration
218 ! lcur_prof_opt =T, ncurr set to 1 and ac current series expansion coefficients
219 ! are varied as independent variables
220 ! =F (default), ac coefficients are fixed (if ncurr = 1)
221 ! liota_prof_opt =T, ncurr set to 0 and ai iota series expansion coefficients
222 ! are varied as independent variables
223 ! ledge_current =T, vary curtor (edge current), provided ncurr=1
224 ! lphiedge =T, vary phiedge (edge toroidal flux)
225 ! lprof_opt (obs) (see lcur_prof_opt and liota_prof_opt)
226 ! lcurprof_opt (obs) (see lcur_prof_opt)
227 ! lpres_prof_opt =T optimize pressure profile shape (vary mass expansion coefficients
228 ! as independent variables); used to achieve ballooning stability
229 ! =F keep pressure profile shape fixed
230 ! lpress_opt (obs) (see lpres_prof_opt)
231 ! laspect_max =T, then sigma_aspect = bigno if aspect ratio <= target_aspectratio.
232 ! used to guarantee a no larger than the target.
233 ! lbeta_min =T, then sigma_beta = bigno if beta >= Target_Beta. Used to
234 ! guarantee a minimum beta
235 ! lkink_opt =T, do global kink stability calculation
236 ! lballoon_opt =T, do ballooning calculation
237 ! =F, do not do ballooning calculation if nballoon_mask prescribed
238 ! lbal_opt (obs) (use nballoon_mask)
239 ! =F (or lfreeb=False), extcur(i) is fixed during optimization
240 ! lnescoil_opt =T, evaluate NESCOIL coil optimization targets
241 !
242 ! lfix_ntor(n) Logical array. =F, r0n's, z0n's are free to vary (i.e., they ARE NOT fixed)
243 ! for the toroidal index 'n' of the arrays rbc(n,m=0), zbs(n,m=0)
244 ! =T, r0n's, z0n's are fixed (not allowed to varied) during optimization
245 ! Useful if certain n-s are to be kept fixed (such as the
246 ! axi-symmetric boundary components: lfix_ntor(0) = T)
247 ! NO EFFECT IN FREE-BDY OPTIMIZATION
248 ! lfix_rhob(n,m) 2D logical array. =F, rhobc(n,m) component is varied during optimization (default)
249 ! =T, rhobc(n,m) compoents is fixed during optimization
250 ! NO EFFECT IN FREE-BDY OPTIMIZATION
251 ! lbmn =T, add Boozer spectra target to chi-sq (for targetting symmetries: QA, QH, QP)
252 ! lbootsj_opt
253 ! lbootstrap (obs) (see lbootsj_opt)
254 ! lseedcur
255 ! lj_star
256 ! lj_invariant
257 ! l_legendre
258 ! lkeep_mins
259 ! lcoil_complex
260 ! lcoil_opt (obsolete)
261 ! lcoil_geom =T, do coil geometry optimization
262 ! (coil harmonics are independent variables in the optimization)
263 ! Note that in this case, the initial coil shapes
264 ! and the weights for the coil evaluations targets
265 ! (e.g. coil curvatures and separations) are
266 ! specified in the COILSIN NAMELIST (in coilsnamin.f in LIBSTELL).
267 !
268 ! =F, coil geometry is FIXED and either the
269 ! EXTERNAL currents are varied (lfreeb=.true., lextcur)
270 ! or the bdy coefficients (rbc, zbs) are varied.
271 ! lcoilp_sep a COMPUTED variable, which = F if lcoil_geom = T and
272 ! MAY = T when lcoil_geom=F. Used to force computation of
273 ! minimum coil-plasma separation even when the coil geometry is not
274 ! evolving in the optimizer
275 ! lvac_opt =T, use rotations and shifts of coils for independent optimization variables
276 ! ldkes_opt
277 ! lneo_opt
278 ! ldiag_opt
279 ! ldsubr_opt
280 ! lorbit_opt
281 ! phiedge_max,min max/min allowable range for variation of phiedge, when lphiedge = TRUE
282 !------------------------------------
283 ! TARGET/WEIGHTS (SIGMA = 1/WEIGHT)
284 !------------------------------------
285 ! Equilibrium and Geometry
286 !------------------------------------
287 ! Target_AspectRatio Aspect Ratio
288 ! sigma_aspect
289 ! Target_MaxCurrent Maximum integrated toroidal current
290 ! (bounding current, matched at each radial position)
291 ! sigma_maxcurrent
292 ! Target_Beta Volume averaged beta to match
293 ! sigma beta
294 ! Target_Iota Coefficients of power series (in flux s)
295 ! for iota profile
296 ! sigma_iota
297 ! Target_Iota_P Coefficients of power series (in s) for iota-prime
298 ! = d(iota)/ds
299 ! sigma_iota_pmax Array (size nrad) of sigmas for target_iota_p as
300 ! upper bound on d-iota/ds as
301 ! sigma_iota_pmin Array (size nrad) of sigmas for target_iota_p as
302 ! lower bound on d-iota/ds as
303 ! Target_iota_min minimum iota value (as lower bound)
304 ! sigma_iota_min
305 ! Target_iota_max maximum iota value (as upper bound)
306 ! sigma_iota_max
307 ! Target_rmin minimum major radius over the boundary
308 ! sigma_rmin
309 ! Target_rmax maximum major radius over the boundary
310 ! sigma_rmax
311 ! Target_zmax maximum height over the boundary
312 ! sigma_zmax
313 ! Target_ellipticity desired elongation of phi=0 cross section
314 ! sigma_ellipticity
315 ! Target_kappa desired <kappa> (n=0 component of elongation)
316 ! sigma_kappa
317 ! Target_fluxp Minimum poloidal flux (Wb)
318 ! sigma_fluxp
319 ! sigma_curv Forces curvature kurtosis to zero at phi=0,90,180,270
320 !
321 ! Stability
322 !------------------------------------
323 ! Target_Well Coefficients Power series (in flux s)
324 ! for the magnetic well
325 ! [Vp(s) - Vp(0)]/Vp(0) [Replaced with Mercier criterion]
326 ! sigma_vp Array (nrad) of sigmas for well
327 ! sigma_Mercier Sigma for Mercier stability (not relative)
328 ! Target_balloon Real array (size=nrad) of ballooning eigenvalue (=0 for marginal stability)
329 ! sigma_balloon Real array (size=nrad)
330 ! sigma_pgrad Real array (size=nrad) forcing local pressure gradient to zero
331 ! sigma_pedge Real array (size=1) for forcing pressure value at edge to zero
332 ! Target_kink array of kink eigenvalues. Can be used to bias the chi-square
333 ! to achieve stability
334 ! sigma_kink Array of sigmas for full kink stability calc.,
335 ! The first sigma value is used in a call to xtprp/ft5tpr
336 ! the second value is used for xtprp2/ft5tpr2,and so-on for successive values.
337 ! This allows targetting of multiple mode families. The sigma values are *not relative*
338 !
339 ! Coils Currents
340 !------------------------------------
341 ! sigma_extcur Array (dim=nextcur) of sigmas for the coil-currents used for regularizing
342 ! (forcing to zero) the coil currents in the extcur array for which the mask array
343 ! lextcur = T
344 ! Target_rbtor The effective poloidal coil currents (R*Bt) used to constrain sum of varied external
345 ! coil currents ([T] - [m]). Only needed if lcoil_geom=F (fixed coil geometry); otherwise,
346 ! handled by xcoilgeom.
347 ! sigma_rbtor
348 ! oh_coefs Array (size=nextcur) for imposing a linear sum constraint on the coil currents,
349 ! e.g. for ensuring that a PF set does not generate net poloidal flux.
350 ! Constraint is sum_i (oh_coefs(i)*extcur(i))
351 ! sigma_oh sigma for the OH flux constraint (weighted linear sum
352 ! coil currents, targetted to zero)
353 !
354 ! NESCOIL current-sheet (lnescoil_opt=T)
355 !------------------------------------
356 ! Target_coil_complex desired maximum coil complexity measure (<M> for coils on sheet)
357 ! sigma_coil_complex
358 ! Target_coil_jmax desired maximum coil current density
359 ! sigma_coil_jmax
360 ! sigma_berr_ave forces NESCOIL berr to zero
361 !
362 ! COILOPT
363 !------------------------------------
364 !
365 ! Transport (see lfix_ntor, lfix_rhob, lbmn described above)
366 !------------------------------------
367 ! helicity If lbmn=T, used to select helicity of Boozer spectra that
368 ! influence symmetry hence transport properties.
369 ! For kh = real(helicity), lh = imag(helicity), then
370 ! kh = 0 => quasi-poloidal symmetry
371 ! lh = 0 => quasi-axisymmetry
372 ! m*kh+n*lh = 0 => quasi-helical symmetry (lu + kv)
373 ! sigma_bmn Real array (size=nrad) for forcing specific bmns to zero
374 ! (relative to largest bmn). Used to obtain quasi-symmetric spectra
375 ! in conjunction with helicity specification.
376 
377 
378 ! target_iota_max, sigma_iota_max
379 ! target_iota_min, sigma_iota_min
380 ! target_vv, sigma_vv
381 ! target_vv_rms, sigma_vv_rms
382 ! sigma_bootsj (sigma_boot)
383 ! sigma_pseudo
384 ! sigma_pseudo2
385 ! sigma_bal
386 ! sigma_vac_island,
387 ! sigma_jstar
388 ! sigma_jinvariant
389 ! sigma_jac
390 ! sigma_oh
391 ! sigma_bmin
392 ! sigma_bmax
393 ! sigma_ripple
394 ! sigma_curv
395 ! sigma_pgrad
396 ! sigma_pedge
397 ! sigma_neo
398 ! sigma_dsubr
399 ! sigma_orbit
400 ! sigma_dkes
401 ! shapeweight
402 ! wtheta_bw
403 ! wphi_bw
404 ! sigma_centering
405 !
406 ! Magnetic Diagnostics
407 !------------------------------------
408 ! lv3post =T, match diagnostic signals, =F, ignore diagnostic signals
409 ! in optimization
410 ! v3rfun_dir fully-qualified path to directory containing pre-computed
411 ! response tables for the diagnostic set used for matching
412 ! v3post_in fully-qualified name of v3post input namelist file
413 
414  CONTAINS
415 
416  SUBROUTINE read_optimum_namelist (iunit, istat)
417  INTEGER, INTENT(in) :: iunit
418  INTEGER, INTENT(inout) :: istat
419 
420  istat = 0
421 
422 !
423 ! DEFAULT VALUES
424 !
425  r00_opt = -1
426  r00_scale = 1
427  b00_scale = 1
428  kpp = 10 ; kjj = 10
429  lreconp = .false. ; lreconj = .false.
430  lp1zero = .false. ; lj1zero = .false.
431 
432  mboz_opt = 0; nboz_opt = 0; nbmn=0; nproc=0
433  opt_ext = 'none'
434  v3rfun_dir = ' '
435  v3post_in = ' '
436  lbeta_min = .false.
437  laspect_max = .false.
438  lcoil_geom = .false.
439  lvac_opt = .false.
440  lv3post = .false.
441  coil_separation = 0
442  numjstar = 0
443  numjinvariant = 0
444  target_iota_max = 1
445  target_iota_min = 1
446  sigma_iota_max = bigno
447  sigma_iota_min = bigno
448  sigma_iota = bigno
449  sigma_vp = bigno
450  sigma_mercier = bigno
451  target_kink = 0
452  sigma_kink = bigno
453  sigma_curv = bigno
454  sigma_aspect = bigno
455  sigma_coil_complex = bigno
456  sigma_maxcurrent = bigno
457  sigma_beta = bigno
458  sigma_centering = bigno
459  sigma_rmin = bigno
460  sigma_rmax = bigno
461  sigma_zmax = bigno
462  sigma_ellipticity = bigno
463  sigma_bmin = bigno
464  sigma_bmax = bigno
465  sigma_bmn = bigno
466  sigma_jstar = bigno
467  sigma_jinvariant = bigno
468  sigma_ripple = bigno
469  sigma_bootsj = bigno
470  sigma_boot = bigno
471  at = 0
472  sigma_jac = bigno
473  sigma_vac_island = bigno
474  sigma_diagno = bigno
475  data_diagno = 0
476  name_diagno = ""
477 
478 !
479 ! INITIALIZATION OBSOLETE VARS, TOO
480 !
481  lcurprof_opt = .false.; lcoil_opt = .false.; lboundary = .false.
482 
483  num_levmar_params = 1
484  num_processors = 1
485 
486 !
487 ! LPK ADDITIONS
488 !
489  sigma_fluxp = bigno
490  sigma_pseudo = bigno
491  sigma_pseudo2 = bigno
492  nproc = 1
493  lkink_opt = .false.
494  lbal_opt = .false.
495  lbootstrap = .false.
496  jboot = 0
497  fboot = 0
498  fboot(0) = 1
499  zeff_boot = 1
500  lseedcur = .false.
501  lpress_opt = .false.
502  lcoil_complex = .false.
503  lnescoil_opt = .false.
504  sigma_coil_jmax = bigno
505  sigma_berr_ave = bigno
506  target_coil_complex = 1
507  target_coil_jmax = 0
508  ldkes_opt = .false.
509  ldkes_mask = .false.
510  sigma_dkes = bigno
511  ndkes_mask = 0
512  dkes_efield = 0
513  dkes_nu = 0.001_dp
514  aseedcur = 0
515  target_rbtor = 1
516  sigma_rbtor = bigno
517 !!
518 !! NEO
519 !!
520  sigma_neo = bigno
521  lneo_opt = .false.
522  nneo_mask = 0
523  lneo_mask = .false.
524  ldiag_opt = .false.
525  lkeep_mins = .false.
526  ldsubr_opt = .false.
527  sigma_dsubr = bigno
528  lorbit_opt = .false.
529  sigma_orbit = bigno
530 !!
531 !! END LPK ADDITIONS
532 !!
533  target_aspectratio = 3
534  target_maxcurrent = 0
535  target_iota = 0
536  target_well = (/ 0.0_dp, -0.39_dp, 0.19_dp, (0.0_dp,istat=1,8) /)
537  niter_opt = 1
538  nopt_alg = 0
539  nopt_boundary = 0
540  lreset_opt = .true.
541  lcur_prof_opt = .false.
542  liota_prof_opt = .false.
543  ledge_current = .false.
544  lphiedge = .false.
545  lbmn = .false.
546  lj_star = .false.
547  lj_invariant = .false.
548  lprof_opt = .false.
549  lextcur = .false.
550  lbootsj_opt = .false.
551  lsurf_mask = .false.
552  lfix_ntor = .false.
553  lfix_rhob = .false.
554  phiedge_max = 0; phiedge_min = 0
555  nsurf_mask = 0
556  epsfcn = -1
557  helicity = cmplx(0._dp, 0._dp)
558  sym_type = 'NONE'
559 
560 !---------------------------------------------------------------------------------
561 ! CODE added by R.SANCHEZ (01/19/99): ballooning related variables and sigmas.
562 
563  target_balloon = 0
564  sigma_balloon = bigno
565  sigma_bal = bigno !Old style - LPK
566  sigma_pgrad = bigno
567  sigma_pedge = bigno
568  lballoon_opt = .false.
569  lballoon_mask = .false.
570  lpres_prof_opt = .false.
571  nballoon_mask = 0 !VMECCOBRA
572  l_legendre = .false. !LEGENDRE
573 
574 !------------------------------------------------------------------------------
575 ! initialize 3D boundary limiter parameters, RH & MZ June 2000
576 
577  target_vv = 0
578  target_vv_rms = 0
579  sigma_vv = bigno
580  sigma_vv_rms = bigno
581  rbc_vv = 0
582  zbs_vv = 0
583  mpol_vv = 0
584  ntor_vv = 0
585  nu_vv = 5
586  nv_vv = 2
587  shapeweight = .false.; amplw_bw = 0
588  theta0_bw(1) = 0 ; theta0_bw(2) = 0 ; theta0_bw(3) = 0
589  phi0_bw = 0 ; wtheta_bw = .5 ; wphi_bw = .5
590  planes_bw(1) = 0 ; planes_bw(2) = 1.5707 ; planes_bw(3) = 3.14159
591 
592 !------------------------------------------------------------------------------
593 
594  sigma_kappa = bigno
595  target_iota_p = 0
596  sigma_iota_pmax = bigno
597  sigma_iota_pmin = bigno
598  sigma_extcur = bigno
599  sigma_oh = bigno
600  oh_coefs = 0
601  bal_theta0 = 0; bal_zeta0 = 0
602 
603  READ (iunit, nml=optimum, iostat=istat)
604 
605  END SUBROUTINE read_optimum_namelist
606 
607  END MODULE optim_params