data_out Subroutine

subroutine data_out()

Arguments

None

Calls

proc~~data_out~~CallsGraph proc~data_out data_out create_timestep_folder create_timestep_folder proc~data_out->create_timestep_folder proc~part_pdata_out part_pdata_out proc~data_out->proc~part_pdata_out proc~prl_den_energy_interp prl_den_energy_interp proc~data_out->proc~prl_den_energy_interp proc~env_two_fields_out env_two_fields_out proc~data_out->proc~env_two_fields_out proc~envar Envar proc~data_out->proc~envar proc~env_fields_out env_fields_out proc~data_out->proc~env_fields_out proc~fields_out_new fields_out_new proc~data_out->proc~fields_out_new proc~den_energy_out den_energy_out proc~data_out->proc~den_energy_out proc~fields_out fields_out proc~data_out->proc~fields_out proc~fluid_den_mom_out fluid_den_mom_out proc~data_out->proc~fluid_den_mom_out proc~endian endian proc~part_pdata_out->proc~endian loc_npart loc_npart proc~part_pdata_out->loc_npart proc~intvec_distribute intvec_distribute proc~part_pdata_out->proc~intvec_distribute proc~mpi_write_part mpi_write_part proc~part_pdata_out->proc~mpi_write_part loc_yg loc_yg proc~prl_den_energy_interp->loc_yg loc_zg loc_zg proc~prl_den_energy_interp->loc_zg jc jc proc~prl_den_energy_interp->jc proc~prl_den_energy_interp->loc_npart spec spec proc~prl_den_energy_interp->spec proc~den_zyxbd den_zyxbd proc~prl_den_energy_interp->proc~den_zyxbd mass mass proc~prl_den_energy_interp->mass env env proc~prl_den_energy_interp->env proc~exchange_pdata exchange_pdata proc~env_two_fields_out->proc~exchange_pdata proc~enb_bunch enb_bunch proc~envar->proc~enb_bunch proc~allreduce_dpreal allreduce_dpreal proc~envar->proc~allreduce_dpreal proc~envar->loc_npart proc~envelope_struct_data envelope_struct_data proc~envar->proc~envelope_struct_data proc~envar->mass proc~env_fields_out->proc~exchange_pdata proc~fields_out_new->proc~endian proc~mpi_write_field mpi_write_field proc~fields_out_new->proc~mpi_write_field proc~den_energy_out->proc~endian proc~den_energy_out->proc~exchange_pdata proc~fields_out->proc~endian proc~fields_out->proc~exchange_pdata proc~fluid_den_mom_out->proc~endian proc~fluid_den_mom_out->proc~exchange_pdata proc~enb_bunch->proc~allreduce_dpreal proc~enb_bunch->loc_npart proc~bunch_corr bunch_corr proc~enb_bunch->proc~bunch_corr mpi_allreduce mpi_allreduce proc~allreduce_dpreal->mpi_allreduce mpi_file_set_view mpi_file_set_view proc~mpi_write_field->mpi_file_set_view mpi_file_close mpi_file_close proc~mpi_write_field->mpi_file_close mpi_file_open mpi_file_open proc~mpi_write_field->mpi_file_open mpi_file_write mpi_file_write proc~mpi_write_field->mpi_file_write proc~envelope_struct_data->proc~allreduce_dpreal mpi_recv mpi_recv proc~intvec_distribute->mpi_recv mpi_bcast mpi_bcast proc~intvec_distribute->mpi_bcast mpi_send mpi_send proc~intvec_distribute->mpi_send proc~mpi_write_part->mpi_file_set_view proc~mpi_write_part->mpi_file_close proc~mpi_write_part->mpi_file_open proc~mpi_write_part->mpi_file_write proc~bunch_corr->proc~allreduce_dpreal

Called by

proc~~data_out~~CalledByGraph proc~data_out data_out proc~lp_cycle Lp_cycle proc~lp_cycle->proc~data_out proc~env_cycle Env_cycle proc~env_cycle->proc~data_out program~aladyn aladyn program~aladyn->proc~lp_cycle program~aladyn->proc~env_cycle

Contents

Source Code


Source Code

  subroutine data_out
   integer :: i, iic, idata

   idata = iout
   if (diag) then
    if (tnow >= tdia) then
     ienout = ienout + 1
     call Envar(ienout)
     tdia = tdia + dtdia
     if (pe0) then
      write (6, '(a10,i3,a10,e11.4)') ' rms data ', ienout, &
       ' at time =', tnow
      write (6, *) '=========================='
     endif
    end if
   end if

   if (tnow >= tout) then
    call create_timestep_folder(iout)
    tout = tout + dtout
    if (diag) then
     if (pe0) call en_data(ienout, iter, idata)
    end if
    !==================
    if (nvout > 0) then
     if (mod_ord == 2) then
      if (L_env_modulus) then
       i = 0
       call env_fields_out(env, i)
       if (Two_color) call env_fields_out(env1, -1) !EXIT |A|
      else
       if (Two_color) then
        do i = 1, 2
         call env_two_fields_out(env, env1, i)
        end do
       else
        do i = 1, 2
         call env_fields_out(env, i) !EXIT [Ar,Ai]
        end do
       end if
      end if
     end if
     do i = 1, nvout
      if (l_force_singlefile_output) then
       call fields_out(ebf, i, i) !i to label field name
      else
       call fields_out_new(ebf, i, i)
      end if
     end do
    end if
    if (nden > 0) then
     do i = 1, nsp
      call prl_den_energy_interp(i, nden)
      do iic = 1, min(2, nden)
       call den_energy_out(i, iic, iic)
      end do
     end do
    end if
    if (hybrid) then
     do i = 1, nfcomp
      call fluid_den_mom_out(up, i, nfcomp)
     end do
    end if
    if (ionization) call part_ionz_out(tnow)
    if (gam_min > 1.) call part_high_gamma_out(gam_min, tnow)
    if (npout > 0) then
     iic = npout
     if (iic <= nsp) then
      call part_pdata_out(tnow, xp0_out, xp1_out, yp_out, iic, pjump)
     else
      do i = 1, nsp
       call part_pdata_out(tnow, xp0_out, xp1_out, yp_out, i, pjump)
      end do
     end if
    end if

    call CPU_TIME(unix_time_now)

    if (pe0) then
     write (6, '(a10,i6,a10,e11.4,a10,e11.4)') 'iter = ', iter, ' t = ', &
      tnow, ' dt = ', dt_loc
     write (6, *) ' END DATA WRITE'
     write (6, '(a16,f12.3)') ' Time elapsed = ', &
      unix_time_now - unix_time_begin
    end if
    if (dump > 0 .and. time_interval_dumps < 0.0) then
     if (iter > 0) call dump_data(iter, tnow)
    endif
    iout = iout + 1
   end if

   call CPU_TIME(unix_time_now)

   !if((unix_time_now - unix_time_last_dump) > time_interval_dumps .and. time_interval_dumps > 0.0) then
   ! call dump_data(iter,tnow)
   !endif

  end subroutine data_out