plt.rc('font', family='serif', size=12) plt.rc('xtick') plt.rc('ytick') gs = plt.GridSpec(2, 1) gs.update(hspace=0.5) axs = [] axs.append(plt.subplot(gs[0])) axs.append(plt.subplot(gs[1])) ################################################## #initialize node conf = Conf() node = plasma.Grid(conf.Nx, conf.Ny) node.setGridLims(conf.xmin, conf.xmax, conf.ymin, conf.ymax) #node.initMpi() #loadMpiXStrides(node) loadCells(node, conf) #insert initial current into the grid injectRingCurrent(node, conf) updateBoundaries(node) #plot initial condition plotNode(axs[0], node, conf) plotEfield(axs[1], node, conf) saveVisz(0, node, conf)
# Timer for profiling timer = Timer(["total", "init", "step", "io"]) timer.start("total") timer.start("init") ################################################## #initialize grid conf = Configuration('config-landau.ini') #conf = Configuration('config-twostream.ini') #conf = Configuration('config-twostream-fast.ini') #conf = Configuration('config-bump-on-tail.ini') #conf = Configuration('config-twostream-relativistic.ini') #conf = Configuration('config-plasmaosc.ini') #conf = Configuration('config-dispersion.ini') grid = plasma.Grid(conf.Nx, conf.Ny) xmin = 0.0 xmax = conf.dx * conf.Nx * conf.NxMesh ymin = 0.0 ymax = conf.dy * conf.Ny * conf.NyMesh grid.set_grid_lims(xmin, xmax, ymin, ymax) #grid.initMpi() #loadMpiXStrides(grid) init.loadCells(grid, conf) ################################################## # Path to be created