&sml_param
sml_node_file='ECBC_0.50_rhoi_mesh.eqd.node'
sml_ele_file='ECBC_0.50_rhoi_mesh.eqd.ele'
sml_surf_file='ECBC_0.50_rhoi_mesh.eqd.flx.aif'
sml_special=0             ! 0: normal simulation, 1: single particle simulation
sml_dt=0.0002D0            ! delta-t for one time step - unit of toroidal transit time.
sml_mstep=4            ! total time step
sml_deltaf=.true.         ! delta-f simulation switch - incomplete
sml_deltaf_elec=.true.
sml_deltaf_f0_mode=-2
sml_dwdt_exb_only=.true.
sml_electron_on=.true.
sml_bounce=2              ! 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=0.90D0           ! outer boundary of simulation - unit of eq_x_psi
sml_restart_write_period=500
sml_restart=.false.
sml_initial_deltaf_noise=1D-5
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.03 ! n=0 mode charge boundary (outer)
sml_bd_ext_delta1H=0.05
sml_bd_ext_delta2H=0.07
sml_bd_ext_delta3H=0.05
sml_bd_ext_delta4H=0.07
sml_bd_ext_delta_ji=0.07
sml_bd_ext_delta_jo=0.07
sml_bd_ext_delta_Ai=0.05
sml_bd_ext_delta_Ao=0.05
 
sml_rhomax=8.0D-2
sml_grid_nrho=2
sml_ncycle_half=2
sml_sheath_mode=0
sml_sheath_adjust=.false.
sml_sheath_init_pot_factor=2.0D0
sml_sheath_adjust_factor=1.0D0
sml_poisson_solver_type=0
sml_iter_solver=.true.
sml_iter_solver_niter=10
sml_use_pade=.false.
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=.false.
sml_exclude_private=.true.
sml_exclude_private_turb=.true.

sml_mode_select_mode=5
sml_mode_select_n=1
sml_mode_select_nmin=1
sml_mode_select_nmax=1
sml_mode_select_nmin_real=1
sml_mode_select_nmax_real=255
sml_mode_select_no_m0=.true.
sml_mode_select_cutoff=4
sml_mode_select_inpsi=0.1D0
sml_mode_select_outpsi=0.8D0
sml_mode_select_bd_width=0.02D0
sml_mode_select_max_kth_rho=1D0

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

sml_neutral=.false.
sml_radiation=.false.
sml_source=.false.

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

sml_monte_num=5000000

! collision load balancing
sml_max_imbalance=1.1
sml_f0_grid_lbal_period=20
sml_f0_grid_max_ptl_imbal=5
sml_f0_grid_min_ptl_imbal=1
sml_ptl_imbal_ion=8D0
sml_f0_grid_init_ptl_imbal=1.1

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! 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=.false.


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

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

&f0_param
f0_nmu=44
f0_nvp=22
f0_smu_max=4.D0
f0_vp_max=4.D0
f0_update_analytic=.false.
f0_update_analytic_local=.false.
f0_update_analytic_alpha=0.005
/

&eq_param ! Initial equilibrium profile - Tanh profile
eq_filename='ECBC_151x151.eqd'
eq_den_shape=-1
eq_tempi_shape=-1
eq_tempe_shape=-1
eq_den_file='ECBC_den_bet00p500.dat'
eq_tempi_file='ECBC_ti.dat'
eq_tempe_file='ECBC_te.dat'

! Used for normalization only in this case-->
eq_den_v1=3.5D19
eq_tempi_v1=0.85D3
eq_tempe_v1=0.85D3

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=10
diag_1d_on=.true.
diag_1d_period=10
diag_3d_period=10
diag_f3d_period=10
diag_3d_on=.true.
diag_weight_stats=.true.
diag_f0_df_on=.true.
diag_f0_df_period=10
diag_f0_period=100
diag_heat_on=.false.
diag_heat_mode=2
diag_heat_nphi=1
/

&neu_param            ! neutral collision
/

&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.2D0
smooth_sol_filt_width=0.05D0
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
/

&cce_surfaces
/
