bem_run_outputs Module

主ループへ渡す出力先(history の unit と間隔、終了時のメッシュ電位)を 1 つの型にまとめる。 unit が -1 の history は書かない。CLI は root rank で writer を開いてこの型へ詰め、終了時に閉じる。


Uses

  • module~~bem_run_outputs~~UsesGraph module~bem_run_outputs bem_run_outputs module~bem_app_config_types bem_app_config_types module~bem_run_outputs->module~bem_app_config_types module~bem_kinds bem_kinds module~bem_run_outputs->module~bem_kinds module~bem_output_writer bem_output_writer module~bem_run_outputs->module~bem_output_writer module~bem_periodic_checkpoint bem_periodic_checkpoint module~bem_run_outputs->module~bem_periodic_checkpoint module~bem_app_config_types->module~bem_kinds module~bem_external_boundary_contract bem_external_boundary_contract module~bem_app_config_types->module~bem_external_boundary_contract module~bem_filesystem bem_filesystem module~bem_app_config_types->module~bem_filesystem module~bem_physics_config_types bem_physics_config_types module~bem_app_config_types->module~bem_physics_config_types module~bem_types bem_types module~bem_app_config_types->module~bem_types iso_fortran_env iso_fortran_env module~bem_kinds->iso_fortran_env module~bem_output_writer->module~bem_app_config_types module~bem_output_writer->module~bem_kinds module~bem_charge_ledger bem_charge_ledger module~bem_output_writer->module~bem_charge_ledger module~bem_checkpoint_contract bem_checkpoint_contract module~bem_output_writer->module~bem_checkpoint_contract module~bem_electrostatic_snapshot bem_electrostatic_snapshot module~bem_output_writer->module~bem_electrostatic_snapshot module~bem_output_writer->module~bem_filesystem module~bem_surface_current_model bem_surface_current_model module~bem_output_writer->module~bem_surface_current_model module~bem_output_writer->module~bem_types module~bem_periodic_checkpoint->module~bem_app_config_types module~bem_periodic_checkpoint->module~bem_kinds module~bem_periodic_checkpoint->module~bem_output_writer module~bem_periodic_checkpoint->module~bem_charge_ledger module~bem_periodic_checkpoint->module~bem_checkpoint_contract module~bem_periodic_checkpoint->module~bem_filesystem module~bem_mpi bem_mpi module~bem_periodic_checkpoint->module~bem_mpi module~bem_restart bem_restart module~bem_periodic_checkpoint->module~bem_restart module~bem_periodic_checkpoint->module~bem_types module~bem_charge_ledger->module~bem_kinds ieee_arithmetic ieee_arithmetic module~bem_charge_ledger->ieee_arithmetic module~bem_checkpoint_contract->module~bem_kinds module~bem_checkpoint_contract->module~bem_filesystem module~bem_electrostatic_snapshot->module~bem_kinds module~bem_electrostatic_snapshot->module~bem_mpi module~bem_electrostatic_snapshot->module~bem_physics_config_types module~bem_electrostatic_snapshot->module~bem_types module~bem_electrostatic_snapshot->ieee_arithmetic module~bem_constants bem_constants module~bem_electrostatic_snapshot->module~bem_constants module~bem_coulomb_fmm_periodic_nonzero_reference bem_coulomb_fmm_periodic_nonzero_reference module~bem_electrostatic_snapshot->module~bem_coulomb_fmm_periodic_nonzero_reference module~bem_coulomb_fmm_periodic_nonzero_upper_vacuum bem_coulomb_fmm_periodic_nonzero_upper_vacuum module~bem_electrostatic_snapshot->module~bem_coulomb_fmm_periodic_nonzero_upper_vacuum module~bem_field_solver bem_field_solver module~bem_electrostatic_snapshot->module~bem_field_solver module~bem_panel_geometry bem_panel_geometry module~bem_electrostatic_snapshot->module~bem_panel_geometry module~bem_panel_kernel bem_panel_kernel module~bem_electrostatic_snapshot->module~bem_panel_kernel module~bem_periodic_zero_mode_eval bem_periodic_zero_mode_eval module~bem_electrostatic_snapshot->module~bem_periodic_zero_mode_eval module~bem_periodic_zero_mode_plan bem_periodic_zero_mode_plan module~bem_electrostatic_snapshot->module~bem_periodic_zero_mode_plan module~bem_runtime_modes bem_runtime_modes module~bem_electrostatic_snapshot->module~bem_runtime_modes module~bem_string_utils bem_string_utils module~bem_electrostatic_snapshot->module~bem_string_utils module~bem_external_boundary_contract->module~bem_kinds module~bem_external_boundary_contract->module~bem_string_utils iso_c_binding iso_c_binding module~bem_filesystem->iso_c_binding module~bem_mpi->module~bem_kinds module~bem_physics_config_types->module~bem_kinds module~bem_physics_config_types->module~bem_types module~bem_physics_config_types->ieee_arithmetic module~bem_physics_config_types->module~bem_string_utils module~bem_restart->module~bem_app_config_types module~bem_restart->module~bem_kinds module~bem_restart->iso_fortran_env module~bem_restart->module~bem_charge_ledger module~bem_restart->module~bem_checkpoint_contract module~bem_restart->module~bem_mpi module~bem_restart->module~bem_types module~bem_restart->ieee_arithmetic module~bem_restart->module~bem_string_utils module~bem_surface_current_model->module~bem_app_config_types module~bem_surface_current_model->module~bem_kinds module~bem_surface_current_model->ieee_arithmetic module~bem_config_helpers bem_config_helpers module~bem_surface_current_model->module~bem_config_helpers module~bem_surface_current_model->module~bem_constants module~bem_irradiation_cell_contract bem_irradiation_cell_contract module~bem_surface_current_model->module~bem_irradiation_cell_contract module~bem_outflow_spectrum bem_outflow_spectrum module~bem_surface_current_model->module~bem_outflow_spectrum module~bem_surface_current_model->module~bem_string_utils module~bem_surface_closure_contract bem_surface_closure_contract module~bem_surface_current_model->module~bem_surface_closure_contract sheath_model sheath_model module~bem_surface_current_model->sheath_model module~bem_types->module~bem_kinds module~bem_types->module~bem_outflow_spectrum module~bem_config_helpers->module~bem_app_config_types module~bem_config_helpers->module~bem_kinds module~bem_config_helpers->module~bem_types module~bem_config_helpers->module~bem_string_utils module~bem_constants->module~bem_kinds module~bem_coulomb_fmm_periodic_nonzero_reference->module~bem_kinds module~bem_coulomb_fmm_periodic_nonzero_reference->module~bem_types module~bem_coulomb_fmm_periodic_nonzero_reference->ieee_arithmetic module~bem_coulomb_fmm_periodic_nonzero_reference->module~bem_constants module~bem_coulomb_fmm_periodic_nonzero_reference->module~bem_panel_geometry module~bem_triangle_quadrature bem_triangle_quadrature module~bem_coulomb_fmm_periodic_nonzero_reference->module~bem_triangle_quadrature module~bem_coulomb_fmm_periodic_nonzero_upper_vacuum->module~bem_kinds module~bem_coulomb_fmm_periodic_nonzero_upper_vacuum->module~bem_types module~bem_coulomb_fmm_periodic_nonzero_upper_vacuum->ieee_arithmetic module~bem_coulomb_fmm_periodic_nonzero_upper_vacuum->module~bem_constants module~bem_field_solver->module~bem_kinds module~bem_field_solver->module~bem_mpi module~bem_field_solver->module~bem_physics_config_types module~bem_field_solver->module~bem_types module~bem_field_solver->ieee_arithmetic module~bem_field_solver->module~bem_constants module~bem_field_solver->module~bem_runtime_modes module~bem_field_solver->module~bem_string_utils module~bem_coulomb_fmm_core bem_coulomb_fmm_core module~bem_field_solver->module~bem_coulomb_fmm_core module~bem_irradiation_cell_contract->module~bem_app_config_types module~bem_irradiation_cell_contract->module~bem_kinds module~bem_irradiation_cell_contract->module~bem_types module~bem_irradiation_cell_contract->module~bem_string_utils module~bem_outflow_spectrum->module~bem_kinds module~bem_outflow_spectrum->sheath_model module~bem_panel_geometry->module~bem_kinds module~bem_panel_geometry->ieee_arithmetic module~bem_panel_kernel->module~bem_kinds module~bem_panel_kernel->module~bem_constants module~bem_panel_kernel->module~bem_panel_geometry module~bem_panel_self_terms bem_panel_self_terms module~bem_panel_kernel->module~bem_panel_self_terms module~bem_periodic_zero_mode_eval->module~bem_kinds module~bem_periodic_zero_mode_eval->module~bem_constants module~bem_periodic_zero_mode_eval->module~bem_periodic_zero_mode_plan module~bem_periodic_zero_mode_plan->module~bem_kinds module~bem_periodic_zero_mode_plan->module~bem_types module~bem_periodic_zero_mode_plan->ieee_arithmetic module~bem_periodic_zero_mode_plan->module~bem_constants module~bem_sorting bem_sorting module~bem_periodic_zero_mode_plan->module~bem_sorting module~bem_runtime_modes->module~bem_kinds module~bem_runtime_modes->module~bem_string_utils module~bem_surface_closure_contract->module~bem_kinds module~bem_surface_closure_contract->module~bem_runtime_modes module~bem_coulomb_fmm_core->module~bem_kinds module~bem_coulomb_fmm_core->module~bem_mpi module~bem_coulomb_fmm_types bem_coulomb_fmm_types module~bem_coulomb_fmm_core->module~bem_coulomb_fmm_types module~bem_panel_self_terms->module~bem_kinds module~bem_panel_self_terms->module~bem_panel_geometry module~bem_sorting->module~bem_kinds module~bem_triangle_quadrature->module~bem_kinds module~bem_triangle_quadrature->module~bem_constants module~bem_triangle_quadrature->module~bem_panel_geometry module~bem_coulomb_fmm_types->module~bem_kinds module~bem_coulomb_fmm_types->module~bem_mpi module~bem_coulomb_fmm_types->module~bem_panel_geometry module~bem_coulomb_fmm_types->module~bem_periodic_zero_mode_plan module~bem_periodic_shell_mean bem_periodic_shell_mean module~bem_coulomb_fmm_types->module~bem_periodic_shell_mean module~bem_periodic_shell_mean->module~bem_kinds

Used by

  • module~~bem_run_outputs~~UsedByGraph module~bem_run_outputs bem_run_outputs module~bem_simulator bem_simulator module~bem_simulator->module~bem_run_outputs module~bem_simulator_loop bem_simulator_loop module~bem_simulator_loop->module~bem_run_outputs module~bem_simulator_loop->module~bem_simulator program~main main program~main->module~bem_run_outputs program~main->module~bem_simulator module~bem_simulator_charge bem_simulator_charge module~bem_simulator_charge->module~bem_simulator module~bem_simulator_io bem_simulator_io module~bem_simulator_io->module~bem_simulator module~bem_simulator_particles bem_simulator_particles module~bem_simulator_particles->module~bem_simulator module~bem_simulator_stats bem_simulator_stats module~bem_simulator_stats->module~bem_simulator

Derived Types

type, public ::  run_outputs_type

Components

Type Visibility Attributes Name Initial
integer, public :: history_unit = -1

電荷 history(output.history.stride_batches ごと)。

integer, public :: potential_history_unit = -1

要素電位 history。間隔は history_stride。

integer, public :: top_reference_history_unit = -1

z-high 参照電位 history。要素電位 history と同じ batch で書くので、potential_history_unit が有効なときだけ使う。

integer, public :: matching_plane_history_unit = -1
integer, public :: matching_plane_spectrum_history_unit = -1

外部源のスペクトル history。外部根を更新した batch で、間隔によらず書く。

integer, public :: fixed_current_history_unit = -1
integer, public :: secondary_emission_history_unit = -1

SEE history。毎 batch 書く。

integer(kind=i32), public :: history_stride = 1_i32

history を書く accepted batch の間隔。0 以下なら matching-plane・spectrum・固定電流 history を書かず、 電荷・要素電位 history は毎 batch の扱いになる(CLI の writer はこのとき開かれない)。

logical, public :: mesh_potential = .false.

終了時に要素重心の電位を mesh_potential_v へ求める(root rank だけ)。

real(kind=dp), public, allocatable :: mesh_potential_v(:)
type(summary_identity_type), public :: summary_identity

主ループが開始時に作った summary の不変量。最終出力の summary.txt はこれを使う。


Subroutines

public subroutine open_run_outputs(app, resumed, resume_batch, is_root, outputs)

root rank で出力先をこの run のものにしてから、設定どおりに history writer を開く。root 以外は全て無効(unit=-1)。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(in) :: app
logical, intent(in) :: resumed
integer(kind=i32), intent(in) :: resume_batch

再開した checkpoint の batch 数(resumed のときだけ使う)。

logical, intent(in) :: is_root
type(run_outputs_type), intent(out) :: outputs

public subroutine flush_run_outputs(outputs)

開いている history の行を書き出す。checkpoint の完了 manifest を公開する前に呼び、 再開できる batch 以下の history 行がすべて改行まで書かれていることを保証する。

Arguments

Type IntentOptional Attributes Name
type(run_outputs_type), intent(in) :: outputs

public subroutine close_run_outputs(outputs)

開いている history writer を閉じる。

Arguments

Type IntentOptional Attributes Name
type(run_outputs_type), intent(inout) :: outputs