&sml_param
sml_node_file='d3d_132007-1298_xgc1.node'
sml_ele_file='d3d_132007-1298_xgc1.ele'
sml_surf_file='d3d_132007-1298_xgc1.flx.aif'
sml_sep_surf_index=999
sml_nsurf3=0
sml_bp_sign=-1D0
sml_bt_sign=-1D0
sml_special=0             ! 0: normal simulation, 1: single particle simulation
sml_dt=2.5D-4             ! delta-t for one time step - unit of toroidal transit time.
sml_mstep=3            ! total time step
sml_deltaf=.true.         ! delta-f simulation switch - incomplete
sml_deltaf_elec=.true.
sml_deltaf_f0_mode=-2
sml_dwdt_exb_only=.false.
sml_electron_on=.true.
sml_bounce=0              ! Particle motion boundary condition 
                          ! 1 for edge simulation (including open field line region)
                          ! 2 for core simulation (excluding open field line region)
sml_ff_order=4
sml_ff_step=2
sml_bounce_zero_weight=0  ! Set w1 to zero after bounce
sml_bounce_buffer=0.05D0
sml_inpsi=0.0D0            ! inner boundary of simulation - unit of eq_x_psi
sml_outpsi=1.23D0           ! outer boundary of simulation - unit of eq_x_psi
sml_outpsi_priv1=0.92
sml_restart_write_period=50
sml_restart=.false.
sml_initial_deltaf_noise=1D-15
sml_guess_table_size=200
sml_input_file_dir='./'
sml_00_npsi=150
sml_bd_ext_delta1=-0.01
sml_bd_ext_delta2=-0.02
sml_bd_ext_delta3=0.0 ! n=0 mode potential boundary (outer)
sml_bd_ext_delta4=0.04 ! n=0 mode charge boundary (outer)
sml_bd_ext_delta1H=0.01
sml_bd_ext_delta2H=0.02
sml_bd_ext_delta3H=0.04
sml_bd_ext_delta4H=0.12
sml_bd_ext_delta_ji=0.05
sml_bd_ext_delta_jo=0.12
sml_bd_ext_delta_Ai=0.04
sml_bd_ext_delta_Ao=0.04
 
sml_rhomax=2.1D-2
sml_grid_nrho=2
sml_ncycle_half=2
sml_sheath_mode=1
sml_sheath_adjust=.true.
sml_sheath_init_pot_factor=2.0D0
sml_sheath_adjust_factor=0.25D0
sml_poisson_solver_type=0
sml_iter_solver=.true.
sml_iter_solver_niter=10
sml_update_poisson_solver=.false.
sml_update_poisson_solver_nstep=1
sml_update_ampere_solver=.false.
sml_update_ampere_solver_nstep=1
sml_turb_efield=.true.
sml_00_efield=.true.
sml_exclude_private=.false.
sml_exclude_private_turb=.true.
sml_em_exclude_private=.true.
sml_no_turb=.false.

sml_mode_select_mode=5
sml_mode_select_n=1
sml_mode_select_nmin=1
sml_mode_select_nmax=7
sml_mode_select_nmin_real=6
sml_mode_select_nmax_real=255
sml_mode_select_cutoff=4
sml_mode_select_bands_on=.true.
sml_mode_select_inpsi=0.03D0
sml_mode_select_outpsi=1.01D0
sml_mode_select_bd_width=0.01D0
sml_mode_select_div_mix=.false.
sml_mode_select_no_m0=.true.
sml_mode_select_sol_mode=1

sml_f0_grid=.true.	 ! full-f mode
sml_f0_grid_alpha=0.000D0
sml_f0_grid_alpha_start=1000
sml_symmetric_f=.false.
sml_f_source_period=2
sml_pol_decomp=.true.
sml_nphi_total=4
sml_wedge_n=2
sml_max_imbalance=1.10D0

sml_neutral=.false.
sml_radiation=.false.
sml_source=.false.
sml_initial_flow=.true.

sml_flat_marker=.true.
sml_flat_marker_cutoff1=4.1D0
sml_flat_marker_decay_start1=4.0D0
sml_flat_marker_width1=0.05D0
sml_flat_marker_decay_start2=4.0D0
sml_use_loading_factor=.false.
sml_limit_marker_den=.true.
sml_min_loading_factor=0.05D0
sml_max_loading_factor=20D0

sml_monte_num=10000000

! collision load balancing
sml_max_imbalance=1.1
sml_f0_grid_lbal_period=5
sml_f0_grid_max_ptl_imbal=5
sml_f0_grid_min_ptl_imbal=1
sml_ptl_imbal_ion=6D0
sml_f0_grid_init_ptl_imbal=1.03

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! When setting sml_resamp_on to true,
!!! make sure to set sml_nphi_total=4
!!! and start with a total of ~6 million
!!! particles per species
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sml_resamp_on=.false.

sml_drift_on=.true.

sml_grad_psitheta=.true.

sml_node_vol_monte=.true.

sml_em_mixed_variable=.true.
sml_em_pullback_mode=4
sml_em_control_variate=.false.
sml_em_n0=.false.
sml_em_dasdt_filter_on=.true.
/

&ptl_param
ptl_mass_au=2D0         ! 1 for hydrogen, 2 for deutron
ptl_e_mass_au=5D-3 !5.454D-4  ! Electron mass relative to proton mass
ptl_charge_eu=1D0       ! ion charge
ptl_num=3500 !55000 !44000           ! number of particles per thread
ptl_maxnum=10000       ! max. number of ptl per thread
/

&f0_param
f0_nmu=38
f0_nvp=19

f0_smu_max=4.D0
f0_vp_max=4.D0
f0_update_analytic=.false.
f0_update_analytic_local=.true.
f0_update_analytic_alpha=0.001
/

&eq_param ! Initial equilibrium profile - Tanh profile
eq_filename='d3d_132007-1298.eqd'
eq_den_shape=-1
eq_tempi_shape=-1
eq_tempe_shape=-1
eq_flowi_shape=-1
eq_flowe_shape=-1
eq_den_file='d3d_132007-01298_den.dat'
eq_tempi_file='d3d_132007-01298_ti.dat'
eq_tempe_file='d3d_132007-01298_te.dat'
eq_flowi_file='d3d_132007-01298_om.dat'
eq_flowe_file='d3d_132007-01298_om.dat'

! Used for normalization only in this case-->
eq_den_v1=2.78D19
eq_tempi_v1=0.411D3
eq_tempe_v1=0.287D3

eq_out_decay_factor=1D0
eq_priv_flux_decay_factor=1D0
/

&col_param  ! Collision
col_mode=0  ! 0 : off , 1 monte-carlo (non-conserving) 2: monte-carlo (conserving)
col_f_nthreads=1
/

&ptb_3db_param ! perturbed magnetic field
ptb_3db_on=.false. !< Switch 3D perturbed field on (.true.) and off (.false.)
/

&diag_param ! diagnosis
diag_tracer_n=0
diag_tracer_period=10
diag_rmp_period=50
diag_1d_on=.true.
diag_1d_period=20
diag_3d_period=20
diag_f3d_period=20
diag_3d_on=.true.
diag_weight_stats=.true.
diag_f0_df_on=.true.
diag_f0_df_period=20
diag_f0_period=100
diag_heat_on=.false.
diag_heat_mode=2
diag_heat_nphi=1
diag_heat_spacing=2D-3
/

&neu_param            ! neutral collision
neu_num=1000
neu_recycle_rate=0.5
!neu_start_time=1
!! new model -->
neu_full_grid=.true.
neu_background_period=100
/

&src_param
! !
! ! Total heating power: 2.0 MW (ions+electrons)
! ! Ion torque: 1.5 Nm
! ! Distributing heating power equally to ions and elecs
! ! --> have to divide heat and torque by sml_wedge_n=1 for
! !     normalization
! ! --> ~1 MW for ions and 1 MW for electrons
! ! --> ~0.5 MW SOL cooling for electrons
! ! --> ~1.5 Nm torque for ions
! ! --> Spread heating between 0.6 < psi < 0.9.
! !

src_narea=2
src_heat_power1=0.5D6 !0.33D6
src_pin1=0.2D0
src_pout1=0.7D0
src_decay_width1=0.20

src_pin2=0.20D0
src_pout2=0.7D0
src_decay_width2=0.2D0
src_heat_power2=0D0
src_torque2=0.7D0  !!0.4667D0

src_narea_e=2
src_heat_power1_e=0.5D6 !0.33D6
src_pin1_e=0.2D0
src_pout1_e=0.7D0
src_decay_width1_e=0.2D0

src_pin2_e=0.995D0
src_pout2_e=1.08D0
src_decay_width2_e=0.050
src_heat_power2_e=-0.25D0 !-0.1667D0
/

&smooth_param
smooth_pol_efield=.true.
smooth_pol_width=8
smooth_pol_d0=3.0D0
smooth_rad_efield=.false.

smooth_fourier_filt_on=.true.
smooth_sol_filt_lp0=0.10D0
smooth_sol_filt_width=0.025D0
smooth_fourier_filt_maxm=25
smooth_fourier_filt_minm=0
/

&src_param
/

&mon_param
!mon_flush_count=120
mon_flush_freq=20
/

&rad_param
/

&adios_param
/

&coupling_param
sml_coupling_on=.false.
/

&diff_param
diff_on=.false.
/

&resamp_param
resamp_rate=20
resamp_min_ratio=0.90D0
resamp_max_ratio=1.05D0
resamp_max_target=30
resamp_var = 1.0D-2                      !< threshold for relative standard deviation in bin for auto-resample
resamp_tile_size = 2                     !< Bin size on the velocity space grid in cells (not vertices)
resamp_ineq_tol = 1D-5                   !< Threshold for relative error in the inequality constraints in the QP optimization
resamp_retry = .false.                   !< Retry QP optimization for failed bins with relaxed inequality constraints
resamp_ineq_tol_max = 1D-4               !< Maximal threshold for relative error in inequality constraints for retried bins
resamp_highv_max = 10D0                  !< energy cutoff of the high velocity bins v_para>f0_vp_max and v_perp>f0_smu_max
resamp_highv_max_ratio = 4D0             !< Downsampling threshold for high-velocity bins
resamp_fill_empty=.false.                !< Whether to fill empty bins
resamp_fullf_on=.true.                  !< Whether to resample the full-f weights in addition to delta-f weights
resamp_grid_ineq_on=.false.              !< Switch for using inequality constraints for the grid charge for resampling
/

&cce_fcoupling
/

&cce_phicoupling
/
