Initialization¶
-
lcode.init(config)[source]¶ Initialize all the arrays needed for
stepandconfig.beam.This function performs quite a boring sequence of actions, outlined here for interlinking purposes:
- validates the oddity of
config.grid_steps[Fields and densities grid], - validates that
config.reflect_padding_stepsis large enough [Reflect and ‘plasma’ boundaries], - calculates the
reflect_boundaryand monkey-patches it back intoconfig, - initializes the
xandyarrays for use inconfig_example.beam(), - calculates the plasma placement boundary,
- immediately passes it to
make_plasma(), leaving it oblivious to the padding concerns, - performs the initial electrion deposition to obtain the background ions charge density [Background ions],
- groups the constant arrays into a
GPUArrayinstanceconst, and - groups the evolving arrays into a
GPUArrayinstancestate.
- validates the oddity of