sim.name = "scatterer" -- simulation name sim.dt = 1e-12 -- timestep size sim.timesteps = 10001 -- num of iterations sim.gmsh_model = "scatterer.geo" -- gmsh model filename sim.use_gpu = 0 -- 0: cpu, 1: gpu sim.approx_order = 1 -- approximation order sim.time_integrator = "rk4" -- time integration method postpro.silo_output_rate = 10 -- rate at which to write silo files postpro.cycle_print_rate = 10 -- console print rate local air = {1} for i,v in ipairs(air) do materials[v] = {} materials[v].epsilon = 1 materials[v].mu = 1 materials[v].sigma = 0 end -- ** Boundary conditions ** local absorbing_bcs = {17, 18, 19, 20, 21} for i,v in ipairs(absorbing_bcs) do bndconds[v] = {} bndconds[v].kind = "impedance" end local pmc = {13,14} for i,v in ipairs(pmc) do bndconds[v] = {} bndconds[v].kind = "pmc" end local freq = 3e9; function srcfun(tag, x, y, z, t) Ez = math.sin(2*math.pi*freq*t) return 0,0,Ez end local source = {12} for i,v in ipairs(source) do bndconds[v] = {} bndconds[v].kind = "plane_wave_E" bndconds[v].source = srcfun; end