bem_simulator_stats.f90 Source File


This file depends on

sourcefile~~bem_simulator_stats.f90~~EfferentGraph sourcefile~bem_simulator_stats.f90 bem_simulator_stats.f90 sourcefile~bem_simulator.f90 bem_simulator.f90 sourcefile~bem_simulator_stats.f90->sourcefile~bem_simulator.f90 sourcefile~bem_app_config.f90 bem_app_config.f90 sourcefile~bem_simulator.f90->sourcefile~bem_app_config.f90 sourcefile~bem_boundary.f90 bem_boundary.f90 sourcefile~bem_simulator.f90->sourcefile~bem_boundary.f90 sourcefile~bem_collision.f90 bem_collision.f90 sourcefile~bem_simulator.f90->sourcefile~bem_collision.f90 sourcefile~bem_field_solver.f90 bem_field_solver.f90 sourcefile~bem_simulator.f90->sourcefile~bem_field_solver.f90 sourcefile~bem_kinds.f90 bem_kinds.f90 sourcefile~bem_simulator.f90->sourcefile~bem_kinds.f90 sourcefile~bem_mpi.f90 bem_mpi.F90 sourcefile~bem_simulator.f90->sourcefile~bem_mpi.f90 sourcefile~bem_pusher.f90 bem_pusher.f90 sourcefile~bem_simulator.f90->sourcefile~bem_pusher.f90 sourcefile~bem_types.f90 bem_types.f90 sourcefile~bem_simulator.f90->sourcefile~bem_types.f90 sourcefile~bem_app_config_parser.f90 bem_app_config_parser.f90 sourcefile~bem_app_config.f90->sourcefile~bem_app_config_parser.f90 sourcefile~bem_app_config_runtime.f90 bem_app_config_runtime.f90 sourcefile~bem_app_config.f90->sourcefile~bem_app_config_runtime.f90 sourcefile~bem_app_config_types.f90 bem_app_config_types.f90 sourcefile~bem_app_config.f90->sourcefile~bem_app_config_types.f90 sourcefile~bem_string_utils.f90 bem_string_utils.f90 sourcefile~bem_app_config.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_boundary.f90->sourcefile~bem_kinds.f90 sourcefile~bem_boundary.f90->sourcefile~bem_types.f90 sourcefile~bem_collision.f90->sourcefile~bem_kinds.f90 sourcefile~bem_collision.f90->sourcefile~bem_types.f90 sourcefile~bem_collision.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_field_solver.f90->sourcefile~bem_kinds.f90 sourcefile~bem_field_solver.f90->sourcefile~bem_types.f90 sourcefile~bem_constants.f90 bem_constants.f90 sourcefile~bem_field_solver.f90->sourcefile~bem_constants.f90 sourcefile~bem_coulomb_fmm_core.f90 bem_coulomb_fmm_core.f90 sourcefile~bem_field_solver.f90->sourcefile~bem_coulomb_fmm_core.f90 sourcefile~bem_field.f90 bem_field.f90 sourcefile~bem_field_solver.f90->sourcefile~bem_field.f90 sourcefile~bem_field_solver.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_mpi.f90->sourcefile~bem_kinds.f90 sourcefile~bem_pusher.f90->sourcefile~bem_kinds.f90 sourcefile~bem_types.f90->sourcefile~bem_kinds.f90 sourcefile~bem_app_config_parser.f90->sourcefile~bem_kinds.f90 sourcefile~bem_app_config_parser.f90->sourcefile~bem_types.f90 sourcefile~bem_app_config_parser.f90->sourcefile~bem_app_config_types.f90 sourcefile~bem_app_config_parser.f90->sourcefile~bem_constants.f90 sourcefile~bem_app_config_parser.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_kinds.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_mpi.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_types.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_app_config_types.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_field.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_config_helpers.f90 bem_config_helpers.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_config_helpers.f90 sourcefile~bem_importers.f90 bem_importers.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_importers.f90 sourcefile~bem_injection.f90 bem_injection.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_injection.f90 sourcefile~bem_mesh.f90 bem_mesh.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_mesh.f90 sourcefile~bem_particles.f90 bem_particles.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_particles.f90 sourcefile~bem_sheath_injection_model.f90 bem_sheath_injection_model.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_sheath_injection_model.f90 sourcefile~bem_templates.f90 bem_templates.f90 sourcefile~bem_app_config_runtime.f90->sourcefile~bem_templates.f90 sourcefile~bem_app_config_types.f90->sourcefile~bem_kinds.f90 sourcefile~bem_app_config_types.f90->sourcefile~bem_types.f90 sourcefile~bem_constants.f90->sourcefile~bem_kinds.f90 sourcefile~bem_coulomb_fmm_core.f90->sourcefile~bem_kinds.f90 sourcefile~bem_coulomb_fmm_types.f90 bem_coulomb_fmm_types.f90 sourcefile~bem_coulomb_fmm_core.f90->sourcefile~bem_coulomb_fmm_types.f90 sourcefile~bem_field.f90->sourcefile~bem_kinds.f90 sourcefile~bem_field.f90->sourcefile~bem_types.f90 sourcefile~bem_field.f90->sourcefile~bem_constants.f90 sourcefile~bem_config_helpers.f90->sourcefile~bem_kinds.f90 sourcefile~bem_config_helpers.f90->sourcefile~bem_app_config_types.f90 sourcefile~bem_config_helpers.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_coulomb_fmm_types.f90->sourcefile~bem_kinds.f90 sourcefile~bem_importers.f90->sourcefile~bem_kinds.f90 sourcefile~bem_importers.f90->sourcefile~bem_types.f90 sourcefile~bem_importers.f90->sourcefile~bem_mesh.f90 sourcefile~bem_injection.f90->sourcefile~bem_boundary.f90 sourcefile~bem_injection.f90->sourcefile~bem_collision.f90 sourcefile~bem_injection.f90->sourcefile~bem_kinds.f90 sourcefile~bem_injection.f90->sourcefile~bem_types.f90 sourcefile~bem_injection.f90->sourcefile~bem_constants.f90 sourcefile~bem_injection.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_injection.f90->sourcefile~bem_particles.f90 sourcefile~bem_mesh.f90->sourcefile~bem_kinds.f90 sourcefile~bem_mesh.f90->sourcefile~bem_types.f90 sourcefile~bem_mesh.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_particles.f90->sourcefile~bem_kinds.f90 sourcefile~bem_particles.f90->sourcefile~bem_types.f90 sourcefile~bem_sheath_runtime.f90 bem_sheath_runtime.f90 sourcefile~bem_sheath_injection_model.f90->sourcefile~bem_sheath_runtime.f90 sourcefile~bem_templates.f90->sourcefile~bem_kinds.f90 sourcefile~bem_templates.f90->sourcefile~bem_types.f90 sourcefile~bem_templates.f90->sourcefile~bem_mesh.f90 sourcefile~bem_sheath_runtime.f90->sourcefile~bem_kinds.f90 sourcefile~bem_sheath_runtime.f90->sourcefile~bem_types.f90 sourcefile~bem_sheath_runtime.f90->sourcefile~bem_app_config_types.f90 sourcefile~bem_sheath_runtime.f90->sourcefile~bem_constants.f90 sourcefile~bem_sheath_runtime.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_sheath_runtime.f90->sourcefile~bem_config_helpers.f90 sourcefile~bem_sheath_model_core.f90 bem_sheath_model_core.f90 sourcefile~bem_sheath_runtime.f90->sourcefile~bem_sheath_model_core.f90 sourcefile~bem_sheath_model_core.f90->sourcefile~bem_kinds.f90 sourcefile~bem_sheath_model_core.f90->sourcefile~bem_constants.f90 sourcefile~bem_sheath_model_core.f90->sourcefile~bem_string_utils.f90 sourcefile~bem_sheath_model_core.f90->sourcefile~bem_injection.f90

Source Code

!> `bem_simulator` のバッチ集計・統計更新処理を実装する submodule。
submodule(bem_simulator) bem_simulator_stats
  implicit none
contains

  !> バッチ内粒子の吸着/脱出/生存内訳をカウントする。
  module procedure count_batch_outcomes
  integer(i32) :: i

  batch_counts = 0_i32
  batch_counts(1) = pcls_batch%n
  do i = 1, pcls_batch%n
    if (absorbed_flag(i)) then
      batch_counts(2) = batch_counts(2) + 1_i32
    else if (escaped_boundary_flag(i)) then
      batch_counts(3) = batch_counts(3) + 1_i32
      batch_counts(4) = batch_counts(4) + 1_i32
    else if (pcls_batch%alive(i)) then
      batch_counts(3) = batch_counts(3) + 1_i32
      batch_counts(5) = batch_counts(5) + 1_i32
    end if
  end do
  end procedure count_batch_outcomes

  !> バッチ単位の集計値を累積統計 `sim_stats` に加算する。
  module procedure accumulate_batch_stats
  stats%batches = stats%batches + 1_i32
  stats%last_rel_change = rel
  stats%processed_particles = stats%processed_particles + batch_counts(1)
  stats%absorbed = stats%absorbed + batch_counts(2)
  stats%escaped = stats%escaped + batch_counts(3)
  stats%escaped_boundary = stats%escaped_boundary + batch_counts(4)
  stats%survived_max_step = stats%survived_max_step + batch_counts(5)
  end procedure accumulate_batch_stats

end submodule bem_simulator_stats