Routine handles the particle evolution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | end_time |
Advance at most up to this time |
||
| integer, | intent(out) | :: | steps_taken |
subroutine advance_particles(end_time, steps_taken) use mod_timing use mod_global_parameters double precision, intent(in) :: end_time !< Advance at most up to this time integer, intent(out) :: steps_taken integer :: n_active steps_taken = 0 do call select_active_particles(end_time) ! Determine total number of active particles call MPI_ALLREDUCE(nparticles_active_on_mype, n_active, 1, MPI_INTEGER,& MPI_SUM, icomm, ierrmpi) if (n_active == 0) exit tpartc_int_0=MPI_WTIME() call particles_integrate(end_time) steps_taken = steps_taken + 1 tpartc_int=tpartc_int+(MPI_WTIME()-tpartc_int_0) tpartc_com0=MPI_WTIME() call comm_particles() tpartc_com=tpartc_com + (MPI_WTIME()-tpartc_com0) it_particles = it_particles + 1 end do end subroutine advance_particles