This class should consist of precisely what is needed in order to completely specify the state of this the system. No less and no more. This means that it should contain the 5×N phase space coordinates of the particles and the 3×nx×ny values of the magnetic field at each grid location.
This class should not contain the electric field, as that can be obtained from the particle positions in the electrostatic case (through Poisson's equation) and from the particle positions and velocities and the magnetic field in the hybrid case (through Ohm's law). Due to time staggering this will require iteration (but that's okay).
The state of the system is what should be passed as argument to an initial condition routine as well as to an I/O routine that writes out a restart file in order to continue a simulation at a later time.
This class should consist of precisely what is needed in order to completely specify the state of this the system. No less and no more. This means that it should contain the 5×N phase space coordinates of the particles and the 3×nx×ny values of the magnetic field at each grid location.
This class should not contain the electric field, as that can be obtained from the particle positions in the electrostatic case (through Poisson's equation) and from the particle positions and velocities and the magnetic field in the hybrid case (through Ohm's law). Due to time staggering this will require iteration (but that's okay).
The state of the system is what should be passed as argument to an initial condition routine as well as to an I/O routine that writes out a restart file in order to continue a simulation at a later time.