# GVEC parameter file for W7x
# with current refinement
ProjectName = "W7X"
init_LA = true
PHIEDGE = 2.15
whichInitEquilibrium = 0
which_hmap = 1

X1X2_deg = 5
LA_deg = 5
degGP = 8

nfp = 5
LA_mn_max = [9, 10]
LA_sin_cos = "_sin_"
X1_mn_max = [9, 10]
X1_sin_cos = "_cos_"
X2_mn_max = [9, 10]
X2_sin_cos = "_sin_"

MinimizerType = 10
PrecondType = 1
start_dt = 0.5
maxIter = 10000


# Run GVEC in several stages, decreasing targeted tolerances.
# each stage overrides specified parameters
stages = [
    {minimize_tol = 1e-3, sgrid.nElems = 3},
    {minimize_tol = 1e-5, sgrid.nElems = 10},
    {minimize_tol = 1e-6, sgrid.nElems = 20},
]

[iota]
type = "polynomial"
coefs = [
    -0.8625290502868942, 0.08116648327976568, -0.3057372847655277,
    0.4672872124759052, -0.23677929291598848, -3.126329344369636,
    10.14720008596784, -14.253993484428593, 9.742801872387513,
    -2.657588003523321
    ]

[sgrid]
grid_type = 4
# nElems

[pres]
type = "polynomial"
coefs = [283943.0429001297, -383068.22871426406, 51821.46263165031, 41925.29538667481, 11968.151280591173, -6589.858465976756]

[X1_a_cos]
"(0,  0)" = 5.59625
"(0,  1)" = 0.3586
"(0,  2)" = 0.02013

[X1_b_cos]
"(0,  0)" = 5.5
"(0,  1)" = 0.2354
"(0,  2)" = 0.01265
"(0,  3)" = 0.00198
"(1, -2)" = -0.03135
"(1, -1)" = -0.2233
"(1,  0)" = 0.47685
"(1,  1)" = -0.0121
"(1,  2)" = -0.001705
"(2, -4)" = -0.00176
"(2, -3)" = -0.00187
"(2, -2)" = 0.055
"(2, -1)" = 0.10065
"(2,  0)" = 0.0616
"(2,  1)" = 0.001375
"(3, -4)" = 0.001265
"(3, -3)" = -0.006765
"(3, -2)" = 0.006435
"(3, -1)" = 0.011165
"(3,  0)" = 0.0002035
"(4, -3)" = -0.002739
"(4, -2)" = -0.006875

[X2_a_sin]
"(0,  1)" = 0.28765
"(0,  2)" = 0.02035

[X2_b_sin]
"(0,  1)" = 0.1155
"(0,  2)" = 0.01265
"(0,  3)" = 0.00198
"(1, -2)" = 0.03135
"(1, -1)" = 0.2233
"(1,  0)" = 0.62315
"(1,  1)" = -0.0121
"(1,  2)" = -0.001705
"(2, -4)" = 0.00176
"(2, -3)" = 0.00176
"(2, -2)" = -0.055
"(2, -1)" = 0.132
"(2,  0)" = 0.06435
"(2,  1)" = 0.001375
"(3, -4)" = -0.001265
"(3, -3)" = 0.006765
"(3, -2)" = 0.006435
"(3, -1)" = -0.011165
"(3,  0)" = 0.0002035
"(4, -3)" = 0.002739
"(4, -2)" = -0.006875
