SUBROUTINE stepon ! ! Advance one time step ! USE basic USE constants USE fields USE beam USE maxwellsource INTEGER:: i ! The particles are injected by the source IF (nlmaxwellsource) CALL maxwellsource_inject(time) DO i=1,nbspecies ! Boundary conditions for plasma particles outside the plasam region CALL bound(partslist(i)) ! Localisation of particles in cells CALL localisation(partslist(i)) ! Assemble right hand side CALL rhscon(partslist(i)) END DO ! Solve Poisson equation CALL poisson DO i=1,nbspecies ! Compute the electric field at the particle position CALL EFieldscompatparts(partslist(i)) ! Solve Newton eq. and advance velocity by delta t CALL comp_velocity(partslist(i)) ! Calculate new positions of particles CALL push(partslist(i)) END DO ! Calculate main physical quantities CALL diagnostics END SUBROUTINE stepon