timeintegration Subroutine

subroutine timeintegration(time0)

Uses

  • proc~~timeintegration~~UsesGraph proc~timeintegration timeintegration mod_dt mod_dt proc~timeintegration->mod_dt module~mod_advance mod_advance proc~timeintegration->module~mod_advance module~mod_amr_grid mod_amr_grid proc~timeintegration->module~mod_amr_grid module~mod_forest mod_forest proc~timeintegration->module~mod_forest module~mod_geometry mod_geometry proc~timeintegration->module~mod_geometry module~mod_ghostcells_update mod_ghostcells_update proc~timeintegration->module~mod_ghostcells_update module~mod_global_parameters mod_global_parameters proc~timeintegration->module~mod_global_parameters module~mod_input_output mod_input_output proc~timeintegration->module~mod_input_output module~mod_input_output_helper mod_input_output_helper proc~timeintegration->module~mod_input_output_helper module~mod_multigrid_coupling mod_multigrid_coupling proc~timeintegration->module~mod_multigrid_coupling module~mod_nvtx mod_nvtx proc~timeintegration->module~mod_nvtx module~mod_particles mod_particles proc~timeintegration->module~mod_particles module~mod_timing mod_timing proc~timeintegration->module~mod_timing module~mod_usr_methods mod_usr_methods proc~timeintegration->module~mod_usr_methods module~mod_comm_lib mod_comm_lib module~mod_geometry->module~mod_comm_lib module~mod_mpi_wrapper mod_mpi_wrapper 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_input_output->module~mod_comm_lib module~mod_input_output->module~mod_mpi_wrapper module~m_octree_mg_3d m_octree_mg_3d module~mod_multigrid_coupling->module~m_octree_mg_3d iso_c_binding iso_c_binding module~mod_nvtx->iso_c_binding 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~m_octree_mg_3d->module~mod_mpi_wrapper module~m_octree_mg_3d->mpi module~mod_mpi_wrapper->mpi module~mod_particle_advect->module~mod_particle_base 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 mod_physics mod_physics module~mod_particle_base->mod_physics 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
double precision, intent(in) :: time0

Calls

proc~~timeintegration~~CallsGraph proc~timeintegration timeintegration mpi_bcast mpi_bcast proc~timeintegration->mpi_bcast mpi_file_close mpi_file_close proc~timeintegration->mpi_file_close mpi_file_delete mpi_file_delete proc~timeintegration->mpi_file_delete mpi_wtime mpi_wtime proc~timeintegration->mpi_wtime proc~advance advance proc~timeintegration->proc~advance proc~finish_gridvars finish_gridvars proc~timeintegration->proc~finish_gridvars proc~fixgrid fixgrid proc~timeintegration->proc~fixgrid proc~mg_timers_show~3 mg_timers_show proc~timeintegration->proc~mg_timers_show~3 proc~nvtxendrange~2 nvtxEndRange proc~timeintegration->proc~nvtxendrange~2 proc~nvtxstartrange~2 nvtxStartRange proc~timeintegration->proc~nvtxstartrange~2 proc~process process proc~timeintegration->proc~process proc~process_advanced process_advanced proc~timeintegration->proc~process_advanced proc~resettree resettree proc~timeintegration->proc~resettree proc~saveamrfile saveamrfile proc~timeintegration->proc~saveamrfile proc~sync_positions_host sync_positions_host proc~timeintegration->proc~sync_positions_host proc~time_spent_on_particles time_spent_on_particles proc~timeintegration->proc~time_spent_on_particles proc~timetosave timetosave proc~timeintegration->proc~timetosave setdt setdt proc~timeintegration->setdt add_split_source add_split_source proc~advance->add_split_source proc~advect advect proc~advance->proc~advect proc~handle_particles handle_particles proc~advance->proc~handle_particles mpi_reduce mpi_reduce proc~mg_timers_show~3->mpi_reduce proc~process->proc~sync_positions_host proc~getbc getbc proc~process->proc~getbc proc~process_advanced->proc~sync_positions_host proc~process_advanced->proc~getbc proc~resettree->proc~finish_gridvars proc~amr_coarsen_refine amr_coarsen_refine proc~resettree->proc~amr_coarsen_refine proc~errest errest proc~resettree->proc~errest proc~init_gridvars init_gridvars proc~resettree->proc~init_gridvars proc~generate_plotfile generate_plotfile proc~saveamrfile->proc~generate_plotfile 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~time_spent_on_particles->mpi_reduce proc~advect->proc~mpistop proc~advect1 advect1 proc~advect->proc~advect1 proc~init_comm_fix_conserve init_comm_fix_conserve proc~advect->proc~init_comm_fix_conserve proc~amr_coarsen_refine->proc~getbc getnode getnode proc~amr_coarsen_refine->getnode mpi_barrier mpi_barrier proc~amr_coarsen_refine->mpi_barrier mpi_waitall mpi_waitall proc~amr_coarsen_refine->mpi_waitall proc~amr_morton_order amr_Morton_order proc~amr_coarsen_refine->proc~amr_morton_order proc~build_connectivity build_connectivity proc~amr_coarsen_refine->proc~build_connectivity proc~coarsen_grid_siblings coarsen_grid_siblings proc~amr_coarsen_refine->proc~coarsen_grid_siblings proc~coarsen_tree_leaf coarsen_tree_leaf proc~amr_coarsen_refine->proc~coarsen_tree_leaf proc~comm_faces comm_faces proc~amr_coarsen_refine->proc~comm_faces proc~end_comm_faces end_comm_faces proc~amr_coarsen_refine->proc~end_comm_faces proc~exchange_coarsened_blocks exchange_coarsened_blocks proc~amr_coarsen_refine->proc~exchange_coarsened_blocks proc~get_level_range get_level_range proc~amr_coarsen_refine->proc~get_level_range proc~getigrids getigrids proc~amr_coarsen_refine->proc~getigrids proc~load_balance load_balance proc~amr_coarsen_refine->proc~load_balance proc~mg_update_refinement mg_update_refinement proc~amr_coarsen_refine->proc~mg_update_refinement proc~proper_nesting proper_nesting proc~amr_coarsen_refine->proc~proper_nesting proc~refine_grids refine_grids proc~amr_coarsen_refine->proc~refine_grids proc~refine_tree_leaf refine_tree_leaf proc~amr_coarsen_refine->proc~refine_tree_leaf proc~selectgrids selectgrids proc~amr_coarsen_refine->proc~selectgrids proc~store_faces store_faces proc~amr_coarsen_refine->proc~store_faces putnode putnode proc~amr_coarsen_refine->putnode proc~errest->proc~mpistop proc~forcedrefine_grid forcedrefine_grid proc~errest->proc~forcedrefine_grid proc~lohner_grid lohner_grid proc~errest->proc~lohner_grid 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 proc~getbc->mpi_wtime proc~getbc->proc~nvtxendrange~2 proc~getbc->proc~nvtxstartrange~2 proc~getbc->mpi_waitall 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~skip_direction skip_direction proc~getbc->proc~skip_direction proc~handle_particles->mpi_wtime proc~handle_particles->proc~mpistop mpi_allreduce mpi_allreduce proc~handle_particles->mpi_allreduce proc~advance_particles advance_particles proc~handle_particles->proc~advance_particles proc~comm_particles_global comm_particles_global proc~handle_particles->proc~comm_particles_global proc~set_neighbor_ipe set_neighbor_ipe proc~handle_particles->proc~set_neighbor_ipe proc~update_gridvars update_gridvars proc~handle_particles->proc~update_gridvars proc~write_particle_output write_particle_output proc~handle_particles->proc~write_particle_output proc~init_gridvars->mpi_wtime mpi_abort mpi_abort proc~mpistop->mpi_abort proc~printlog_default->mpi_wtime 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~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 proc~write_snapshot->mpi_file_close proc~write_snapshot->mpi_barrier 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~advance_particles->mpi_wtime proc~advance_particles->mpi_allreduce proc~comm_particles comm_particles proc~advance_particles->proc~comm_particles proc~select_active_particles select_active_particles proc~advance_particles->proc~select_active_particles proc~advect1->proc~getbc finite_volume_local finite_volume_local proc~advect1->finite_volume_local proc~fix_conserve fix_conserve proc~advect1->proc~fix_conserve proc~recvflux recvflux proc~advect1->proc~recvflux proc~sendflux sendflux proc~advect1->proc~sendflux proc~amr_morton_order->proc~mpistop proc~block_shape_io->proc~count_ix proc~add_to_c nbprocs_info_t%add_to_c proc~build_connectivity->proc~add_to_c proc~add_to_f nbprocs_info_t%add_to_f proc~build_connectivity->proc~add_to_f proc~add_to_srl nbprocs_info_t%add_to_srl proc~build_connectivity->proc~add_to_srl proc~alloc_buffers_c nbprocs_info_t%alloc_buffers_c proc~build_connectivity->proc~alloc_buffers_c proc~alloc_buffers_f nbprocs_info_t%alloc_buffers_f proc~build_connectivity->proc~alloc_buffers_f proc~alloc_buffers_srl nbprocs_info_t%alloc_buffers_srl proc~build_connectivity->proc~alloc_buffers_srl proc~find_neighbor find_neighbor proc~build_connectivity->proc~find_neighbor proc~identifyphysbound_connectivity identifyphysbound_connectivity proc~build_connectivity->proc~identifyphysbound_connectivity proc~reset nbprocs_info_t%reset proc~build_connectivity->proc~reset proc~coarsen_grid_siblings->proc~mpistop proc~coarsen_grid_siblings->proc~mpi_irecv_wrapper proc~coarsen_grid_siblings->proc~mpi_isend_wrapper alloc_node alloc_node proc~coarsen_grid_siblings->alloc_node proc~coarsen_grid coarsen_grid proc~coarsen_grid_siblings->proc~coarsen_grid proc~initial_condition initial_condition proc~coarsen_grid_siblings->proc~initial_condition proc~add_to_linked_list add_to_linked_list proc~coarsen_tree_leaf->proc~add_to_linked_list proc~delete_from_linked_list delete_from_linked_list proc~coarsen_tree_leaf->proc~delete_from_linked_list proc~comm_faces->mpi_waitall proc~comm_faces->proc~mpi_irecv_wrapper proc~comm_faces->proc~mpi_isend_wrapper proc~comm_particles_global->proc~mpistop proc~comm_particles_global->mpi_waitall proc~comm_particles_global->proc~mpi_irecv_wrapper proc~comm_particles_global->proc~mpi_isend_wrapper proc~comm_particles_global->proc~mpi_recv_wrapper proc~comm_particles_global->proc~mpi_send_wrapper proc~find_particle_ipe find_particle_ipe proc~comm_particles_global->proc~find_particle_ipe proc~pull_particle_from_particles_on_mype pull_particle_from_particles_on_mype proc~comm_particles_global->proc~pull_particle_from_particles_on_mype proc~push_particle_into_particles_on_mype push_particle_into_particles_on_mype proc~comm_particles_global->proc~push_particle_into_particles_on_mype proc~create_output_file->proc~mpistop proc~create_output_file->mpi_file_open proc~exchange_coarsened_blocks->proc~mpistop proc~exchange_coarsened_blocks->mpi_waitall proc~exchange_coarsened_blocks->proc~mpi_irecv_wrapper proc~exchange_coarsened_blocks->proc~mpi_isend_wrapper mpi_get_count mpi_get_count proc~exchange_coarsened_blocks->mpi_get_count proc~layout_runs layout_runs proc~exchange_coarsened_blocks->proc~layout_runs 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 usr_refine_grid usr_refine_grid proc~forcedrefine_grid->usr_refine_grid proc~get_volume_average->mpi_allreduce proc~get_volume_coverage->mpi_allreduce proc~getintbc->proc~sync_positions_host proc~imagedatavtk_mpi->proc~mpistop proc~imagedatavtk_mpi->mpi_allreduce proc~imagedatavtk_mpi->mpi_barrier proc~imagedatavtk_mpi->proc~mpi_recv_wrapper proc~imagedatavtk_mpi->proc~mpi_send_wrapper 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~init_comm_fix_conserve->proc~mpistop proc~build_message_layout build_message_layout proc~init_comm_fix_conserve->proc~build_message_layout proc~load_balance->getnode proc~load_balance->mpi_waitall proc~load_balance->proc~amr_morton_order proc~load_balance->putnode proc~change_ipe_tree_leaf change_ipe_tree_leaf proc~load_balance->proc~change_ipe_tree_leaf proc~exchange_migrated_blocks exchange_migrated_blocks proc~load_balance->proc~exchange_migrated_blocks proc~get_morton_range get_Morton_range proc~load_balance->proc~get_morton_range proc~lb_recv lb_recv proc~load_balance->proc~lb_recv proc~lb_send lb_send proc~load_balance->proc~lb_send proc~mg_deallocate_storage~3 mg_deallocate_storage proc~mg_update_refinement->proc~mg_deallocate_storage~3 proc~mg_tree_from_amrvac mg_tree_from_amrvac proc~mg_update_refinement->proc~mg_tree_from_amrvac 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~proper_nesting->mpi_allreduce mpi_allgather mpi_allgather proc~proper_nesting->mpi_allgather proc~proper_nesting->proc~find_neighbor 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->mpi_reduce proc~put_collapse->proc~mpistop proc~put_collapse->mpi_barrier 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->mpi_bcast proc~put_slice->mpi_file_close proc~put_slice->proc~mpistop proc~put_slice->mpi_barrier 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_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~refine_grids->alloc_node dealloc_node dealloc_node proc~refine_grids->dealloc_node proc~refine_grids->proc~initial_condition proc~prolong_grid prolong_grid proc~refine_grids->proc~prolong_grid proc~refine_tree_leaf->proc~delete_from_linked_list proc~refine_tree_leaf->proc~find_neighbor proc~init_tree_leaf init_tree_leaf proc~refine_tree_leaf->proc~init_tree_leaf proc~gather_isafety gather_isafety proc~selectgrids->proc~gather_isafety proc~igrid_active igrid_active proc~selectgrids->proc~igrid_active proc~ipe_cf ipe_cf proc~set_neighbor_ipe->proc~ipe_cf proc~ipe_fc ipe_fc proc~set_neighbor_ipe->proc~ipe_fc proc~ipe_srl ipe_srl proc~set_neighbor_ipe->proc~ipe_srl 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_allreduce proc~tecplot_mpi->mpi_barrier proc~tecplot_mpi->proc~mpi_recv_wrapper proc~tecplot_mpi->proc~mpi_send_wrapper 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_allreduce proc~unstructuredvtkb->mpi_barrier proc~unstructuredvtkb->proc~mpi_recv_wrapper proc~unstructuredvtkb->proc~mpi_send_wrapper proc~unstructuredvtkb->proc~calc_grid proc~unstructuredvtkb->proc~calc_x proc~unstructuredvtkb->proc~getheadernames proc~unstructuredvtkb64->mpi_allreduce proc~unstructuredvtkb64->mpi_barrier proc~unstructuredvtkb64->proc~mpi_recv_wrapper proc~unstructuredvtkb64->proc~mpi_send_wrapper proc~unstructuredvtkb64->proc~calc_grid proc~unstructuredvtkb64->proc~calc_x proc~unstructuredvtkb64->proc~getheadernames proc~update_gridvars->mpi_wtime proc~write_forest->mpi_file_write proc~output_ensemble output_ensemble proc~write_particle_output->proc~output_ensemble proc~output_individual output_individual proc~write_particle_output->proc~output_individual proc~add_igrid_to_c nbprocs_info_t%add_igrid_to_c proc~add_to_c->proc~add_igrid_to_c proc~add_igrid_to_f nbprocs_info_t%add_igrid_to_f proc~add_to_f->proc~add_igrid_to_f proc~add_igrid_to_srl nbprocs_info_t%add_igrid_to_srl proc~add_to_srl->proc~add_igrid_to_srl proc~idecode nbprocs_info_t%idecode proc~alloc_buffers_srl->proc~idecode proc~alloc_subnode->proc~mpistop proc~allocate_collapsed->proc~mpistop specialbound_usr specialbound_usr proc~bc_phys->specialbound_usr proc~build_message_layout->proc~mpistop proc~build_message_layout->proc~layout_runs 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~comm_particles->proc~mpistop proc~comm_particles->mpi_waitall proc~comm_particles->proc~mpi_irecv_wrapper proc~comm_particles->proc~mpi_isend_wrapper proc~comm_particles->proc~find_particle_ipe proc~comm_particles->proc~pull_particle_from_particles_on_mype proc~comm_particles->proc~push_particle_into_particles_on_mype proc~apply_periodb apply_periodB proc~comm_particles->proc~apply_periodb proc~destroy_particles destroy_particles proc~comm_particles->proc~destroy_particles proc~particle_in_igrid particle_in_igrid proc~comm_particles->proc~particle_in_igrid proc~dealloc_subnode->proc~mpistop proc~exchange_migrated_blocks->proc~mpistop proc~exchange_migrated_blocks->mpi_waitall proc~exchange_migrated_blocks->proc~mpi_irecv_wrapper proc~exchange_migrated_blocks->proc~mpi_isend_wrapper proc~exchange_migrated_blocks->mpi_get_count proc~exchange_migrated_blocks->proc~layout_runs proc~find_root_neighbor find_root_neighbor proc~find_neighbor->proc~find_root_neighbor proc~get_igslice get_igslice proc~find_particle_ipe->proc~get_igslice proc~particle_in_domain particle_in_domain proc~find_particle_ipe->proc~particle_in_domain proc~fix_conserve->proc~mpistop proc~fix_conserve->mpi_waitall proc~fix_conserve->mpi_get_count proc~gather_isafety->proc~mpistop mpi_allgatherv mpi_allgatherv proc~gather_isafety->mpi_allgatherv proc~getheadernames->proc~mpistop proc~init_tree_leaf->proc~add_to_linked_list proc~initial_condition->proc~sync_positions_host proc~initial_condition->proc~mpistop proc~integrate_subnode->proc~mpistop proc~rank_keys rank_keys proc~layout_runs->proc~rank_keys proc~lb_recv->proc~mpistop proc~lb_recv->proc~mpi_irecv_wrapper proc~lb_recv->alloc_node proc~lb_send->proc~mpistop proc~lb_send->proc~mpi_isend_wrapper proc~mg_add_children~3 mg_add_children proc~mg_tree_from_amrvac->proc~mg_add_children~3 proc~mg_allocate_storage~3 mg_allocate_storage proc~mg_tree_from_amrvac->proc~mg_allocate_storage~3 proc~mg_build_rectangle~3 mg_build_rectangle proc~mg_tree_from_amrvac->proc~mg_build_rectangle~3 proc~mg_load_balance_parents~3 mg_load_balance_parents proc~mg_tree_from_amrvac->proc~mg_load_balance_parents~3 proc~mg_set_leaves_parents~3 mg_set_leaves_parents proc~mg_tree_from_amrvac->proc~mg_set_leaves_parents~3 proc~mg_set_neighbors_lvl~3 mg_set_neighbors_lvl proc~mg_tree_from_amrvac->proc~mg_set_neighbors_lvl~3 proc~mg_set_next_level_ids~3 mg_set_next_level_ids proc~mg_tree_from_amrvac->proc~mg_set_next_level_ids~3 proc~mg_set_refinement_boundaries~3 mg_set_refinement_boundaries proc~mg_tree_from_amrvac->proc~mg_set_refinement_boundaries~3 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~output_ensemble->proc~mpi_recv_wrapper proc~output_ensemble->proc~mpi_send_wrapper proc~output_ensemble->mpi_allgather proc~output_particle output_particle proc~output_ensemble->proc~output_particle proc~output_individual->proc~output_particle proc~prolong_grid->proc~sync_positions_host proc~prolong_grid->phys_to_primitive phys_to_conserved phys_to_conserved proc~prolong_grid->phys_to_conserved proc~old_neighbors old_neighbors proc~prolong_grid->proc~old_neighbors proc~prolong_2nd prolong_2nd proc~prolong_grid->proc~prolong_2nd proc~recvflux->proc~mpi_irecv_wrapper proc~nodenumbertec3d nodenumbertec3D proc~save_conntec->proc~nodenumbertec3d proc~select_active_particles->mpi_allreduce 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~select_slice->proc~get_igslice proc~quicksort_integer quicksort_integer proc~select_slice->proc~quicksort_integer proc~sendflux->proc~mpi_isend_wrapper 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~init_cf_info nbinfo_cf_t%init_cf_info proc~add_igrid_to_c->proc~init_cf_info proc~add_igrid_to_f->proc~init_cf_info proc~iencode nbprocs_info_t%iencode proc~add_igrid_to_srl->proc~iencode proc~init_srl_info init_srl_info proc~add_igrid_to_srl->proc~init_srl_info proc~apply_periodb->proc~find_particle_ipe proc~destroy_particles->mpi_allreduce proc~destroy_particles->proc~output_ensemble proc~destroy_particles->proc~pull_particle_from_particles_on_mype 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~mg_ghost_cell_buffer_size~3 mg_ghost_cell_buffer_size proc~mg_allocate_storage~3->proc~mg_ghost_cell_buffer_size~3 proc~mg_prolong_buffer_size~3 mg_prolong_buffer_size proc~mg_allocate_storage~3->proc~mg_prolong_buffer_size~3 proc~mg_restrict_buffer_size~3 mg_restrict_buffer_size proc~mg_allocate_storage~3->proc~mg_restrict_buffer_size~3 proc~mg_build_rectangle~3->proc~mg_add_children~3 proc~mg_build_rectangle~3->proc~mg_set_leaves_parents~3 proc~mg_build_rectangle~3->proc~mg_set_neighbors_lvl~3 proc~mg_build_rectangle~3->proc~mg_set_next_level_ids~3 proc~add_single_child~3 add_single_child proc~mg_build_rectangle~3->proc~add_single_child~3 proc~most_popular~3 most_popular proc~mg_load_balance_parents~3->proc~most_popular~3 proc~update_lvl_info~3 update_lvl_info proc~mg_load_balance_parents~3->proc~update_lvl_info~3 proc~mg_has_children~3 mg_has_children proc~mg_set_leaves_parents~3->proc~mg_has_children~3 proc~set_neighbs~3 set_neighbs proc~mg_set_neighbors_lvl~3->proc~set_neighbs~3 proc~mg_set_refinement_boundaries~3->proc~mg_has_children~3 proc~nodenumbertec3d->proc~mpistop proc~partcoord_to_cartesian partcoord_to_cartesian proc~output_particle->proc~partcoord_to_cartesian proc~prolong_2nd->proc~sync_positions_host proc~prolong_2nd->phys_to_conserved proc~already_fine already_fine proc~prolong_2nd->proc~already_fine proc~prolong_2nd_stg prolong_2nd_stg proc~prolong_2nd->proc~prolong_2nd_stg proc~quicksort_integer->proc~quicksort_integer proc~fill_subnode_info->proc~mpistop proc~buffer_ghost_cells~3 buffer_ghost_cells proc~mg_ghost_cell_buffer_size~3->proc~buffer_ghost_cells~3 proc~buffer_refinement_boundaries~3 buffer_refinement_boundaries proc~mg_ghost_cell_buffer_size~3->proc~buffer_refinement_boundaries~3 proc~set_ghost_cells~3 set_ghost_cells proc~mg_ghost_cell_buffer_size~3->proc~set_ghost_cells~3 phys_face_to_center phys_face_to_center proc~prolong_2nd_stg->phys_face_to_center proc~find_neighb~3 find_neighb proc~set_neighbs~3->proc~find_neighb~3 proc~buffer_for_nb~3 buffer_for_nb proc~buffer_ghost_cells~3->proc~buffer_for_nb~3 proc~buffer_refinement_boundaries~3->proc~mg_has_children~3 proc~buffer_for_fine_nb~3 buffer_for_fine_nb proc~buffer_refinement_boundaries~3->proc~buffer_for_fine_nb~3 proc~mg_ix_to_ichild~3 mg_ix_to_ichild proc~find_neighb~3->proc~mg_ix_to_ichild~3 proc~bc_to_gc~3 bc_to_gc proc~set_ghost_cells~3->proc~bc_to_gc~3 proc~box_get_gc~3 box_get_gc proc~set_ghost_cells~3->proc~box_get_gc~3 proc~box_set_gc~3 box_set_gc proc~set_ghost_cells~3->proc~box_set_gc~3 proc~copy_from_nb~3 copy_from_nb proc~set_ghost_cells~3->proc~copy_from_nb~3 proc~fill_buffered_nb~3 fill_buffered_nb proc~set_ghost_cells~3->proc~fill_buffered_nb~3 proc~fill_refinement_bnd~3 fill_refinement_bnd proc~set_ghost_cells~3->proc~fill_refinement_bnd~3 proc~box_gc_for_fine_neighbor~3 box_gc_for_fine_neighbor proc~buffer_for_fine_nb~3->proc~box_gc_for_fine_neighbor~3 proc~mg_get_child_offset~3 mg_get_child_offset proc~buffer_for_fine_nb~3->proc~mg_get_child_offset~3 proc~box_gc_for_neighbor~3 box_gc_for_neighbor proc~buffer_for_nb~3->proc~box_gc_for_neighbor~3 proc~copy_from_nb~3->proc~box_set_gc~3 proc~copy_from_nb~3->proc~box_gc_for_neighbor~3 proc~fill_buffered_nb~3->proc~box_set_gc~3 proc~fill_refinement_bnd~3->proc~box_gc_for_fine_neighbor~3 proc~fill_refinement_bnd~3->proc~mg_get_child_offset~3 proc~sides_rb~3 sides_rb proc~fill_refinement_bnd~3->proc~sides_rb~3

Called by

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

Source Code

  subroutine timeintegration(time0)
    use mod_nvtx
    use mod_timing
    use mod_advance, only: advance, process, process_advanced
    use mod_amr_grid, only: resettree, settree, resettree_convert
    use mod_forest, only: nleafs_active
    use mod_global_parameters
    use mod_input_output, only: saveamrfile
    use mod_input_output_helper, only: save_now
    use mod_ghostcells_update
    use mod_multigrid_coupling
    use mod_dt, only: setdt
    use mod_particles
    use mod_usr_methods
    use mod_geometry, only: sync_positions_host

    double precision, intent(in) :: time0

    integer :: level, ifile, fixcount, ncells_block, igrid, iigrid, itimelevel
    integer(kind=8) ncells_update
    logical :: crashall
    double precision :: time_last_print, time_write0, time_write,&
        time_before_advance, dt_loop

    time_in=MPI_WTIME()
    time_last_print = -bigdouble
    fixcount=1

    n_saves(filelog_:fileout_) = snapshotini

    do ifile=nfile,1,-1
       if(resume_previous_run) then
         tsavelast(ifile)=aint((global_time+&
            smalldouble)/dtsave(ifile))*dtsave(ifile)
         itsavelast(ifile)=it/ditsave(ifile)*ditsave(ifile)
       else
         tsavelast(ifile)=global_time
         itsavelast(ifile)=it
       end if
    end do

    ! the next two are used to keep track of the performance during runtime:
    itTimeLast=it
    timeLast=MPI_WTIME()

    !  ------ start of integration loop. ------------------
    if (mype==0) then
      write(*, '(A,ES9.2,A)') ' Start integrating, print status every ',&
          time_between_print, ' seconds'
      write(*, '(A4,A10,A12,A12,A12)') '  #', 'it', 'time', 'dt', 'wc-time(s)'
    end if

    timeloop0=MPI_WTIME()
    time_bc=0.d0
    time_write=0.d0
    ncells_block=(ixGhi1-2*nghostcells)*(ixGhi2-2*nghostcells)*(ixGhi3-&
       2*nghostcells)
    ncells_update=0
    dt_loop=0.d0

    time_advance=.true.
    

    time_evol : do

       time_before_advance=MPI_WTIME()
       ! set time step
       call nvtxStartRange("setdt");       call setdt()
       call nvtxEndRange

       
       ! Optionally call a user method that can modify the grid variables at the
       ! beginning of a time step
       if (associated(usr_process_grid) .or. associated(usr_process_global)) &
          then
          call process(it,global_time)
       end if

       ! Check if output needs to be written
       do ifile=nfile,1,-1
         save_file(ifile) = timetosave(ifile)
       end do

       timeio0=MPI_WTIME()

       if (timeio0 - time_last_print > time_between_print) then
         time_last_print = timeio0
         if (mype == 0) then
           write(*, '(A4,I10,ES12.4,ES12.4,ES12.4)') " #", it, global_time, dt,&
               timeio0 - time_in
         end if
       end if

       ! output data
       if (any(save_file)) then
         if(associated(usr_modify_output)) then
           ! Users can modify or set variables before output is written
           ! (usr_modify_output reads ps(igrid)%x on the host)
           call sync_positions_host()
           do iigrid=1,igridstail; igrid=igrids(iigrid);
             dxlevel(1)=rnode(rpdx1_,igrid);dxlevel(2)=rnode(rpdx2_,igrid)
             dxlevel(3)=rnode(rpdx3_,igrid);
             block=>ps(igrid)
             call usr_modify_output(ixGlo1,ixGlo2,ixGlo3,ixGhi1,ixGhi2,ixGhi3,&
                ixMlo1,ixMlo2,ixMlo3,ixMhi1,ixMhi2,ixMhi3,global_time,&
                ps(igrid)%w,ps(igrid)%x)
           end do
         end if
         time_write=0.d0
         do ifile=nfile,1,-1
           if (save_file(ifile)) then
             time_write0=MPI_WTIME()
             call saveamrfile(ifile)
             time_write=time_write+MPI_WTIME()-time_write0
           end if
         end do
       end if


       ! output a snapshot when user write a file named 'savenow' in the same
       ! folder as the executable amrvac
       if (mype==0) inquire(file='savenow',exist=save_now)
       if (npe>1) call MPI_BCAST(save_now,1,MPI_LOGICAL,0,icomm,ierrmpi)

       if (save_now) then
          if(mype==0) write(*,'(a,i7,a,i7,a,es12.4)') ' save a snapshot No.',&
             snapshotnext,' at it=',it,' global_time=',global_time
          call saveamrfile(1)
          call saveamrfile(2)
          call MPI_FILE_DELETE('savenow',MPI_INFO_NULL,ierrmpi)
       end if
       timeio_tot=timeio_tot+MPI_WTIME()-timeio0

       pass_wall_time=MPI_WTIME()-time0+dt_loop+4.d0*time_write &
          >=wall_time_max

       ! exit time loop if time is up
       if (it>=it_max .or. global_time>=time_max .or. pass_wall_time .or. &
          final_dt_exit) exit time_evol

       ! solving equations
       call advance(it)
       
       !opedit: FIXME, this seems to take a long time!
       ! if met unphysical values, output the last good status and stop the run
       ! call MPI_ALLREDUCE(crash,crashall,1,MPI_LOGICAL,MPI_LOR,icomm,ierrmpi)
       ! if (crashall) then
       !   call saveamrfile(1)
       !   call saveamrfile(2)
       !   if(mype==0) write(*,*) "Error: small value encountered, run crash."
       !   call MPI_ABORT(icomm, iigrid, ierrmpi)
       ! end if

       ! Optionally call a user method that can modify the grid variables at the
       ! end of a time step: this is for two-way coupling to PIC, e.g.
       if (associated(usr_process_adv_grid) .or. &
          associated(usr_process_adv_global)) then
          call process_advanced(it,global_time)
       end if

       ! update AMR mesh and tree
       timegr0=MPI_WTIME()
       if(ditregrid>1) then
          if(fixcount<ditregrid) then
             fixcount=fixcount+1
          else
             if (refine_max_level>1 .and. .not.(fixgrid())) call resettree
             fixcount=1
          end if
       else
          if (refine_max_level>1 .and. .not.(fixgrid())) call resettree
       end if
       timegr_tot=timegr_tot+(MPI_WTIME()-timegr0)

       ! update time variables
       it = it + 1
       global_time = global_time + dt

       if(it>9000000)then
          it = slowsteps+it_init
          itsavelast(:)=0
       end if

       ! count updated cells
       ncells_update=ncells_update+ncells_block*nleafs_active

       ! time lapses in one loop
       dt_loop=MPI_WTIME()-time_before_advance
    end do time_evol

    if(use_particles) then
      call finish_gridvars()
    end if

    time_advance=.false.
    

    timeloop=MPI_WTIME()-timeloop0

    if (mype==0) then
       write(*,'(a,f12.3,a)')' Total timeloop took        : ',timeloop,' sec'
       write(*,'(a,f12.3,a)')' Time spent on AMR          : ',timegr_tot,&
          ' sec'
       write(*,'(a,f12.2,a)')'                  Percentage: ',&
          100.0*timegr_tot/timeloop,' %'
       write(*,'(a,f12.3,a)')' Time spent on IO in loop   : ',timeio_tot,&
          ' sec'
       write(*,'(a,f12.2,a)')'                  Percentage: ',&
          100.0*timeio_tot/timeloop,' %'
       write(*,'(a,f12.3,a)')' Time spent on ghost cells  : ',time_bc,' sec'
       write(*,'(a,f12.2,a)')'                  Percentage: ',&
          100.0*time_bc/timeloop,' %'
       write(*,'(a,f12.3,a)')' Time spent on computing    : ',&
          timeloop-timeio_tot-timegr_tot-time_bc,' sec'
       write(*,'(a,f12.2,a)')'                  Percentage: ',&
          100.0*(timeloop-timeio_tot-timegr_tot-time_bc)/timeloop,' %'
       write(*,'(a,es12.3 )')' Cells updated / proc / sec : ',&
          dble(ncells_update)*dble(nstep)/dble(npe)/(timeloop-timeio_tot)
    end if

    ! output end state
    timeio0=MPI_WTIME()
    do ifile=nfile,1,-1
       if(itsavelast(ifile)<it) call saveamrfile(ifile)
    end do
    if (mype==0 .and. log_fh > 0) then
      call MPI_FILE_CLOSE(log_fh,ierrmpi)
    endif
    timeio_tot=timeio_tot+(MPI_WTIME()-timeio0)

    if (mype==0) then
       write(*,'(a,f12.3,a)')' Total time spent on IO     : ',timeio_tot,&
          ' sec'
       write(*,'(a,f12.3,a)')' Total timeintegration took : ',&
          MPI_WTIME()-time_in,' sec'
       write(*, '(A4,I10,ES12.3,ES12.3,ES12.3)') " #", it, global_time, dt,&
           timeio0 - time_in
    end if



    if(use_particles) call time_spent_on_particles

    if (use_multigrid) call mg_timers_show(mg)
  end subroutine timeintegration