#################################
####### GENERAL PARAMETERS ######
#################################
max_step = 10000
amr.n_cell = 5120
amr.max_grid_size = 1024  # maximum size of each AMReX box, used to decompose the domain
amr.blocking_factor = 1024 # minimum size of each AMReX box, used to decompose the domain
geometry.dims = 1
geometry.prob_lo     =  -120.e-6    # physical domain
geometry.prob_hi     =   0.e-6
amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)

#################################
####### Boundary condition ######
#################################
boundary.field_lo = pec
boundary.field_hi = pec

#################################
############ NUMERICS ###########
#################################
warpx.verbose = 1
warpx.do_dive_cleaning = 0
warpx.use_filter = 0
warpx.cfl = 0.45 #Fluid CFL < 0.5
warpx.do_moving_window = 1
warpx.moving_window_dir = z
warpx.moving_window_v = 1.0 # units of speed of light
warpx.do_dynamic_scheduling = 0
warpx.serialize_initial_conditions = 1

### BOOST ###
warpx.gamma_boost = 1.5
warpx.boost_direction = z

#################################
############ PLASMA #############
#################################
fluids.species_names = electrons ions

electrons.species_type = electron
electrons.profile = parse_density_function
electrons.density_function(x,y,z) = "1.0e10 + 20.e23*((z*5.e4 + -0.5)*(z>10.e-6)*(z<30.e-6)) + 20.e23*((z>30.e-6))"
electrons.momentum_distribution_type = "at_rest"

ions.charge = q_e
ions.mass = m_p
ions.profile = parse_density_function
ions.density_function(x,y,z) = "1.0e10 + 20.e23*((z*5.e4 + -0.5)*(z>10.e-6)*(z<30.e-6)) + 20.e23*((z>30.e-6))"
ions.momentum_distribution_type = "at_rest"

# Order of particle shape factors
algo.particle_shape = 3

#################################
############ LASER ##############
#################################
lasers.names        = laser1
laser1.profile      = Gaussian
laser1.position     = 0. 0. -11.e-6        # This point is on the laser plane
laser1.direction    = 0. 0. 1.           # The plane normal direction
laser1.polarization = 0. 1. 0.           # The main polarization vector
laser1.e_max        = 10.e12             # Maximum amplitude of the laser field (in V/m)
laser1.profile_waist = 5.e-6             # The waist of the laser (in m)
laser1.profile_duration = 15.e-15        # The duration of the laser (in s)
laser1.profile_t_peak = 30.e-15          # Time at which the laser reaches its peak (in s)
laser1.profile_focal_distance = 100.e-6  # Focal distance from the antenna (in m)
laser1.wavelength = 0.8e-6               # The wavelength of the laser (in m)

# Diagnostics
diagnostics.diags_names = diag1


# BOOST
diag1.diag_type = BackTransformed
diag1.do_back_transformed_fields = 1
diag1.num_snapshots_lab = 2
diag1.dt_snapshots_lab = 6.e-13
diag1.fields_to_plot = Ex Ey Ez Bx By Bz jx jy jz rho
