saveamrfile Subroutine

public subroutine saveamrfile(ifile)

Uses

  • proc~~saveamrfile~~UsesGraph proc~saveamrfile saveamrfile mod_physics mod_physics proc~saveamrfile->mod_physics module~mod_collapse mod_collapse proc~saveamrfile->module~mod_collapse module~mod_convert_files mod_convert_files proc~saveamrfile->module~mod_convert_files module~mod_geometry mod_geometry proc~saveamrfile->module~mod_geometry module~mod_ghostcells_update mod_ghostcells_update proc~saveamrfile->module~mod_ghostcells_update module~mod_global_parameters mod_global_parameters proc~saveamrfile->module~mod_global_parameters module~mod_particles mod_particles proc~saveamrfile->module~mod_particles module~mod_slice mod_slice proc~saveamrfile->module~mod_slice module~mod_usr_methods mod_usr_methods proc~saveamrfile->module~mod_usr_methods module~mod_collapse->module~mod_global_parameters module~mod_comm_lib mod_comm_lib module~mod_collapse->module~mod_comm_lib module~mod_convert_files->module~mod_comm_lib module~mod_mpi_wrapper mod_mpi_wrapper module~mod_convert_files->module~mod_mpi_wrapper module~mod_geometry->module~mod_comm_lib module~mod_ghostcells_update->module~mod_mpi_wrapper module~mod_basic_types mod_basic_types module~mod_global_parameters->module~mod_basic_types module~mod_connectivity mod_connectivity module~mod_global_parameters->module~mod_connectivity module~mod_constants mod_constants module~mod_global_parameters->module~mod_constants module~mod_physicaldata mod_physicaldata module~mod_global_parameters->module~mod_physicaldata module~mod_variables mod_variables module~mod_global_parameters->module~mod_variables mpi mpi module~mod_global_parameters->mpi module~mod_particle_advect mod_particle_advect module~mod_particles->module~mod_particle_advect module~mod_particle_base mod_particle_base module~mod_particles->module~mod_particle_base module~mod_particle_gca mod_particle_gca module~mod_particles->module~mod_particle_gca module~mod_particle_lorentz mod_particle_lorentz module~mod_particles->module~mod_particle_lorentz module~mod_particle_sample mod_particle_sample module~mod_particles->module~mod_particle_sample module~mod_slice->module~mod_basic_types module~mod_slice->module~mod_comm_lib module~mod_slice->module~mod_mpi_wrapper module~mod_mpi_wrapper->mpi module~mod_particle_advect->module~mod_particle_base module~mod_particle_base->mod_physics module~mod_particle_base->module~mod_global_parameters module~mod_particle_base->module~mod_comm_lib module~mod_particle_base->module~mod_constants module~mod_particle_base->module~mod_mpi_wrapper module~mod_random mod_random module~mod_particle_base->module~mod_random module~mod_particle_gca->module~mod_particle_base module~mod_particle_lorentz->module~mod_particle_base module~mod_particle_sample->module~mod_particle_base module~mod_variables->module~mod_basic_types

Arguments

Type IntentOptional Attributes Name
integer :: ifile

Calls

proc~~saveamrfile~~CallsGraph proc~saveamrfile saveamrfile proc~generate_plotfile generate_plotfile proc~saveamrfile->proc~generate_plotfile proc~getbc getbc proc~saveamrfile->proc~getbc proc~mpistop mpistop proc~saveamrfile->proc~mpistop proc~printlog_default printlog_default proc~saveamrfile->proc~printlog_default proc~printlog_regression_test printlog_regression_test proc~saveamrfile->proc~printlog_regression_test proc~sync_geometry_host sync_geometry_host proc~saveamrfile->proc~sync_geometry_host proc~write_collapsed write_collapsed proc~saveamrfile->proc~write_collapsed proc~write_particles_snapshot write_particles_snapshot proc~saveamrfile->proc~write_particles_snapshot proc~write_slice write_slice proc~saveamrfile->proc~write_slice proc~write_snapshot write_snapshot proc~saveamrfile->proc~write_snapshot proc~generate_plotfile->proc~mpistop phys_te_images phys_te_images proc~generate_plotfile->phys_te_images proc~imagedatavtk_mpi ImageDataVtk_mpi proc~generate_plotfile->proc~imagedatavtk_mpi proc~oneblock oneblock proc~generate_plotfile->proc~oneblock proc~onegrid onegrid proc~generate_plotfile->proc~onegrid proc~punstructuredvtk_mpi punstructuredvtk_mpi proc~generate_plotfile->proc~punstructuredvtk_mpi proc~punstructuredvtkb_mpi punstructuredvtkB_mpi proc~generate_plotfile->proc~punstructuredvtkb_mpi proc~tecplot tecplot proc~generate_plotfile->proc~tecplot proc~tecplot_mpi tecplot_mpi proc~generate_plotfile->proc~tecplot_mpi proc~unstructuredvtk unstructuredvtk proc~generate_plotfile->proc~unstructuredvtk proc~unstructuredvtk_mpi unstructuredvtk_mpi proc~generate_plotfile->proc~unstructuredvtk_mpi proc~unstructuredvtkb unstructuredvtkB proc~generate_plotfile->proc~unstructuredvtkb proc~unstructuredvtkb64 unstructuredvtkB64 proc~generate_plotfile->proc~unstructuredvtkb64 mpi_waitall mpi_waitall proc~getbc->mpi_waitall mpi_wtime mpi_wtime proc~getbc->mpi_wtime phys_boundary_adjust phys_boundary_adjust proc~getbc->phys_boundary_adjust proc~fill_boundary_after_gc fill_boundary_after_gc proc~getbc->proc~fill_boundary_after_gc proc~fill_boundary_before_gc fill_boundary_before_gc proc~getbc->proc~fill_boundary_before_gc proc~fill_coarse_boundary fill_coarse_boundary proc~getbc->proc~fill_coarse_boundary proc~getintbc getintbc proc~getbc->proc~getintbc proc~idecode~2 idecode proc~getbc->proc~idecode~2 proc~mpi_irecv_wrapper mpi_irecv_wrapper proc~getbc->proc~mpi_irecv_wrapper proc~mpi_isend_wrapper mpi_isend_wrapper proc~getbc->proc~mpi_isend_wrapper proc~nvtxendrange~2 nvtxEndRange proc~getbc->proc~nvtxendrange~2 proc~nvtxstartrange~2 nvtxStartRange proc~getbc->proc~nvtxstartrange~2 proc~skip_direction skip_direction proc~getbc->proc~skip_direction mpi_abort mpi_abort proc~mpistop->mpi_abort mpi_file_open mpi_file_open proc~printlog_default->mpi_file_open mpi_file_write mpi_file_write proc~printlog_default->mpi_file_write proc~printlog_default->mpi_wtime proc~get_volume_average get_volume_average proc~printlog_default->proc~get_volume_average proc~get_volume_coverage get_volume_coverage proc~printlog_default->proc~get_volume_coverage proc~printlog_regression_test->mpi_file_open proc~printlog_regression_test->mpi_file_write proc~printlog_regression_test->proc~get_volume_average proc~put_collapse put_collapse proc~write_collapsed->proc~put_collapse proc~append_to_snapshot append_to_snapshot proc~write_particles_snapshot->proc~append_to_snapshot proc~mpi_recv_wrapper mpi_recv_wrapper proc~write_particles_snapshot->proc~mpi_recv_wrapper proc~mpi_send_wrapper mpi_send_wrapper proc~write_particles_snapshot->proc~mpi_send_wrapper proc~put_slice put_slice proc~write_slice->proc~put_slice mpi_barrier mpi_barrier proc~write_snapshot->mpi_barrier mpi_file_close mpi_file_close proc~write_snapshot->mpi_file_close mpi_file_get_position mpi_file_get_position proc~write_snapshot->mpi_file_get_position mpi_file_seek mpi_file_seek proc~write_snapshot->mpi_file_seek proc~write_snapshot->mpi_file_write proc~block_shape_io block_shape_io proc~write_snapshot->proc~block_shape_io proc~count_ix count_ix proc~write_snapshot->proc~count_ix proc~create_output_file create_output_file proc~write_snapshot->proc~create_output_file proc~mpi_file_write_wrapper mpi_file_write_wrapper proc~write_snapshot->proc~mpi_file_write_wrapper proc~write_snapshot->proc~mpi_recv_wrapper proc~write_snapshot->proc~mpi_send_wrapper proc~snapshot_write_header snapshot_write_header proc~write_snapshot->proc~snapshot_write_header proc~write_forest write_forest proc~write_snapshot->proc~write_forest proc~block_shape_io->proc~count_ix proc~create_output_file->proc~mpistop proc~create_output_file->mpi_file_open proc~bc_phys bc_phys proc~fill_boundary_after_gc->proc~bc_phys proc~fill_boundary_before_gc->proc~bc_phys proc~fill_coarse_boundary->proc~bc_phys mpi_allreduce mpi_allreduce proc~get_volume_average->mpi_allreduce proc~get_volume_coverage->mpi_allreduce proc~sync_positions_host sync_positions_host proc~getintbc->proc~sync_positions_host proc~imagedatavtk_mpi->proc~mpistop proc~imagedatavtk_mpi->mpi_barrier proc~imagedatavtk_mpi->proc~mpi_recv_wrapper proc~imagedatavtk_mpi->proc~mpi_send_wrapper proc~imagedatavtk_mpi->mpi_allreduce proc~calc_grid calc_grid proc~imagedatavtk_mpi->proc~calc_grid proc~calc_x calc_x proc~imagedatavtk_mpi->proc~calc_x proc~getheadernames getheadernames proc~imagedatavtk_mpi->proc~getheadernames proc~write_vti write_vti proc~imagedatavtk_mpi->proc~write_vti proc~mpi_file_write_wrapper->mpi_file_write mpi_irecv mpi_irecv proc~mpi_irecv_wrapper->mpi_irecv mpi_isend mpi_isend proc~mpi_isend_wrapper->mpi_isend mpi_recv mpi_recv proc~mpi_recv_wrapper->mpi_recv mpi_send mpi_send proc~mpi_send_wrapper->mpi_send proc~oneblock->proc~mpistop phys_to_primitive phys_to_primitive proc~oneblock->phys_to_primitive proc~oneblock->proc~getheadernames proc~onegrid->proc~mpistop proc~onegrid->mpi_barrier proc~onegrid->proc~mpi_recv_wrapper proc~onegrid->proc~mpi_send_wrapper proc~onegrid->phys_to_primitive proc~onegrid->proc~getheadernames proc~punstructuredvtk_mpi->mpi_barrier proc~punstructuredvtk_mpi->proc~calc_grid proc~punstructuredvtk_mpi->proc~calc_x proc~punstructuredvtk_mpi->proc~getheadernames proc~write_pvtu write_pvtu proc~punstructuredvtk_mpi->proc~write_pvtu proc~write_vtk write_vtk proc~punstructuredvtk_mpi->proc~write_vtk proc~punstructuredvtkb_mpi->proc~calc_grid proc~punstructuredvtkb_mpi->proc~calc_x proc~punstructuredvtkb_mpi->proc~getheadernames proc~punstructuredvtkb_mpi->proc~write_pvtu proc~put_collapse->proc~mpistop proc~put_collapse->mpi_barrier mpi_reduce mpi_reduce proc~put_collapse->mpi_reduce proc~alloc_subnode alloc_subnode proc~put_collapse->proc~alloc_subnode proc~allocate_collapsed allocate_collapsed proc~put_collapse->proc~allocate_collapsed proc~collapse_subnode collapse_subnode proc~put_collapse->proc~collapse_subnode proc~dealloc_subnode dealloc_subnode proc~put_collapse->proc~dealloc_subnode proc~integrate_subnode integrate_subnode proc~put_collapse->proc~integrate_subnode proc~output_collapsed_csv output_collapsed_csv proc~put_collapse->proc~output_collapsed_csv proc~output_collapsed_vti output_collapsed_vti proc~put_collapse->proc~output_collapsed_vti proc~put_slice->proc~mpistop proc~put_slice->mpi_barrier proc~put_slice->mpi_file_close proc~put_slice->mpi_file_get_position proc~put_slice->mpi_file_open proc~put_slice->mpi_file_seek proc~put_slice->mpi_file_write proc~put_slice->mpi_waitall proc~put_slice->proc~mpi_recv_wrapper proc~put_slice->proc~mpi_send_wrapper mpi_bcast mpi_bcast proc~put_slice->mpi_bcast mpi_file_iwrite_at mpi_file_iwrite_at proc~put_slice->mpi_file_iwrite_at mpi_type_commit mpi_type_commit proc~put_slice->mpi_type_commit mpi_type_create_subarray mpi_type_create_subarray proc~put_slice->mpi_type_create_subarray mpi_type_free mpi_type_free proc~put_slice->mpi_type_free phys_write_info phys_write_info proc~put_slice->phys_write_info proc~put_slice->proc~alloc_subnode proc~put_slice->proc~dealloc_subnode proc~put_slice->proc~getheadernames proc~roundoff_minmax roundoff_minmax proc~put_slice->proc~roundoff_minmax proc~select_slice select_slice proc~put_slice->proc~select_slice proc~snapshot_write_header1 snapshot_write_header1 proc~snapshot_write_header->proc~snapshot_write_header1 proc~tecplot->proc~mpistop proc~tecplot->proc~calc_grid proc~tecplot->proc~calc_x proc~tecplot->proc~getheadernames proc~save_conntec save_conntec proc~tecplot->proc~save_conntec proc~tecplot_mpi->proc~mpistop proc~tecplot_mpi->mpi_barrier proc~tecplot_mpi->proc~mpi_recv_wrapper proc~tecplot_mpi->proc~mpi_send_wrapper proc~tecplot_mpi->mpi_allreduce proc~tecplot_mpi->proc~calc_grid proc~tecplot_mpi->proc~calc_x proc~tecplot_mpi->proc~getheadernames proc~tecplot_mpi->proc~save_conntec proc~unstructuredvtk->proc~mpistop proc~unstructuredvtk->proc~calc_grid proc~unstructuredvtk->proc~calc_x proc~unstructuredvtk->proc~getheadernames proc~save_connvtk save_connvtk proc~unstructuredvtk->proc~save_connvtk proc~unstructuredvtk_mpi->proc~mpistop proc~unstructuredvtk_mpi->mpi_barrier proc~unstructuredvtk_mpi->proc~mpi_recv_wrapper proc~unstructuredvtk_mpi->proc~mpi_send_wrapper proc~unstructuredvtk_mpi->proc~calc_grid proc~unstructuredvtk_mpi->proc~calc_x proc~unstructuredvtk_mpi->proc~getheadernames proc~unstructuredvtk_mpi->proc~write_vtk proc~unstructuredvtkb->mpi_barrier proc~unstructuredvtkb->proc~mpi_recv_wrapper proc~unstructuredvtkb->proc~mpi_send_wrapper proc~unstructuredvtkb->mpi_allreduce proc~unstructuredvtkb->proc~calc_grid proc~unstructuredvtkb->proc~calc_x proc~unstructuredvtkb->proc~getheadernames proc~unstructuredvtkb64->mpi_barrier proc~unstructuredvtkb64->proc~mpi_recv_wrapper proc~unstructuredvtkb64->proc~mpi_send_wrapper proc~unstructuredvtkb64->mpi_allreduce proc~unstructuredvtkb64->proc~calc_grid proc~unstructuredvtkb64->proc~calc_x proc~unstructuredvtkb64->proc~getheadernames proc~write_forest->mpi_file_write proc~alloc_subnode->proc~mpistop proc~allocate_collapsed->proc~mpistop specialbound_usr specialbound_usr proc~bc_phys->specialbound_usr proc~calc_grid->proc~mpistop proc~calc_grid->phys_to_primitive proc~to_cartesian to_cartesian proc~calc_grid->proc~to_cartesian proc~collapse_subnode->proc~mpistop proc~collapse_subnode->proc~calc_grid proc~collapse_subnode->proc~calc_x proc~dealloc_subnode->proc~mpistop proc~getheadernames->proc~mpistop proc~integrate_subnode->proc~mpistop proc~output_collapsed_csv->proc~mpistop proc~output_collapsed_csv->proc~getheadernames proc~output_collapsed_vti->proc~mpistop proc~output_collapsed_vti->proc~getheadernames proc~nodenumbertec3d nodenumbertec3D proc~save_conntec->proc~nodenumbertec3d proc~select_slice->proc~mpistop proc~select_slice->mpi_allreduce mpi_gather mpi_gather proc~select_slice->mpi_gather proc~fill_subnode fill_subnode proc~select_slice->proc~fill_subnode proc~get_igslice get_igslice proc~select_slice->proc~get_igslice proc~quicksort_integer quicksort_integer proc~select_slice->proc~quicksort_integer proc~snapshot_write_header1->mpi_file_write proc~snapshot_write_header1->phys_write_info proc~write_pvtu->proc~getheadernames proc~write_vtk->proc~save_connvtk proc~fill_subnode->proc~mpistop proc~fill_subnode->proc~alloc_subnode proc~fill_subnode->proc~calc_grid proc~fill_subnode->proc~calc_x proc~fill_subnode_info fill_subnode_info proc~fill_subnode->proc~fill_subnode_info proc~get_igslice->proc~mpistop proc~nodenumbertec3d->proc~mpistop proc~quicksort_integer->proc~quicksort_integer proc~fill_subnode_info->proc~mpistop

Called by

proc~~saveamrfile~~CalledByGraph proc~saveamrfile saveamrfile proc~timeintegration timeintegration proc~timeintegration->proc~saveamrfile proc~main main proc~main->proc~timeintegration program~agile agile program~agile->proc~main

Source Code

  subroutine saveamrfile(ifile)

    use mod_usr_methods, only: usr_print_log, usr_write_analysis
    use mod_global_parameters
    use mod_particles, only: write_particles_snapshot
    use mod_slice, only: write_slice
    use mod_collapse, only: write_collapsed
    use mod_convert_files, only: generate_plotfile
    use mod_physics, only: phys_req_diagonal
    use mod_ghostcells_update
    use mod_geometry, only: sync_geometry_host
    integer:: ifile, iigrid, igrid

    ! update (diagonal) ghostcells before moving to host:
    if(.not. phys_req_diagonal) then
      call getbc(global_time,0.d0,ps,iwstart,nwgc)
    end if

    

    ! Same idea for the cell metrics: everything below here that weights by
    ! dvolume, or builds corner positions from dx, reads them on the host.
    call sync_geometry_host()

    select case (ifile)
    case (fileout_)
       ! Write .dat snapshot
       call write_snapshot()

       ! Generate formatted output (e.g., VTK)
       if(autoconvert) call generate_plotfile

       if(use_particles) call write_particles_snapshot()

       snapshotnext = snapshotnext + 1
    case (fileslice_)
       call write_slice
    case (filecollapse_)
       call write_collapsed
    case (filelog_)
       select case (typefilelog)
       case ('default')
          call printlog_default
       case ('regression_test')
          call printlog_regression_test()
       case ('special')
          if (.not. associated(usr_print_log)) then
             call mpistop("usr_print_log not defined")
          else
             call usr_print_log()
          end if
       case default
          call mpistop("Error in SaveFile: Unknown typefilelog")
       end select
    case (fileanalysis_)
       if (associated(usr_write_analysis)) then
          call usr_write_analysis()
       end if
    case default
       write(*,*) 'No save method is defined for ifile=',ifile
       call mpistop("")
    end select

    ! opedit: Flush stdout and stderr from time to time.
    flush(unit=unitterm)

  end subroutine saveamrfile