def receive_data_from_gpu(simulation):
    """
    Receive the simulation data from the GPU.
    Calls the functions of the particle and field package
    that receive the data from the GPU.

    Parameters :
    ------------
    simulation : object
        A simulation object that contains the particle
        (ptcl) and field object (fld)
    """
    for species in simulation.ptcl:
        if species.use_cuda:
            species.receive_particles_from_gpu()
    simulation.fld.receive_fields_from_gpu()
