bem_particle_stepper Module

同一時刻の粒子状態から、空間電場を中点評価した1ステップ候補を構築する。


Uses

  • module~~bem_particle_stepper~~UsesGraph module~bem_particle_stepper bem_particle_stepper ieee_arithmetic ieee_arithmetic module~bem_particle_stepper->ieee_arithmetic module~bem_boundary bem_boundary module~bem_particle_stepper->module~bem_boundary module~bem_collision bem_collision module~bem_particle_stepper->module~bem_collision module~bem_electrostatic_snapshot bem_electrostatic_snapshot module~bem_particle_stepper->module~bem_electrostatic_snapshot module~bem_external_boundary_contract bem_external_boundary_contract module~bem_particle_stepper->module~bem_external_boundary_contract module~bem_kinds bem_kinds module~bem_particle_stepper->module~bem_kinds module~bem_pusher bem_pusher module~bem_particle_stepper->module~bem_pusher module~bem_types bem_types module~bem_particle_stepper->module~bem_types module~bem_boundary->ieee_arithmetic module~bem_boundary->module~bem_kinds module~bem_boundary->module~bem_types module~bem_collision->ieee_arithmetic module~bem_collision->module~bem_kinds module~bem_collision->module~bem_types iso_fortran_env iso_fortran_env module~bem_collision->iso_fortran_env module~bem_string_utils bem_string_utils module~bem_collision->module~bem_string_utils module~bem_electrostatic_snapshot->ieee_arithmetic module~bem_electrostatic_snapshot->module~bem_kinds module~bem_electrostatic_snapshot->module~bem_types 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_physics_config_types bem_physics_config_types module~bem_electrostatic_snapshot->module~bem_physics_config_types 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 module~bem_kinds->iso_fortran_env module~bem_pusher->module~bem_kinds module~bem_types->module~bem_kinds module~bem_constants->module~bem_kinds module~bem_coulomb_fmm_periodic_nonzero_reference->ieee_arithmetic 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->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->ieee_arithmetic 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->module~bem_constants module~bem_field_solver->ieee_arithmetic module~bem_field_solver->module~bem_kinds module~bem_field_solver->module~bem_types module~bem_field_solver->module~bem_constants module~bem_field_solver->module~bem_physics_config_types 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_panel_geometry->ieee_arithmetic module~bem_panel_geometry->module~bem_kinds 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->ieee_arithmetic module~bem_periodic_zero_mode_plan->module~bem_kinds module~bem_periodic_zero_mode_plan->module~bem_types module~bem_periodic_zero_mode_plan->module~bem_constants module~bem_physics_config_types->ieee_arithmetic module~bem_physics_config_types->module~bem_kinds module~bem_physics_config_types->module~bem_types module~bem_physics_config_types->module~bem_string_utils module~bem_coulomb_fmm_core->module~bem_kinds 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_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_panel_geometry module~bem_coulomb_fmm_types->module~bem_periodic_zero_mode_plan

Used by

  • module~~bem_particle_stepper~~UsedByGraph module~bem_particle_stepper bem_particle_stepper module~bem_simulator bem_simulator module~bem_simulator->module~bem_particle_stepper 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_loop bem_simulator_loop module~bem_simulator_loop->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 program~main main program~main->module~bem_simulator

Variables

Type Visibility Attributes Name Initial
integer(kind=i32), public, parameter :: particle_step_ok = collision_query_ok
integer(kind=i32), public, parameter :: particle_step_invalid_boundary = 1001_i32
integer(kind=i32), public, parameter :: particle_step_multiple_box_events = 1002_i32
integer(kind=i32), public, parameter :: particle_step_ambiguous_open_corner = 1003_i32
integer(kind=i32), public, parameter :: particle_step_unsupported_barrier_corner = particle_step_ambiguous_open_corner

Derived Types

type, public ::  particle_step_result

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: x(3) = 0.0_dp
real(kind=dp), public :: v(3) = 0.0_dp
logical, public :: absorbed = .false.
logical, public :: escaped_boundary = .false.
integer(kind=i32), public :: elem_idx = -1_i32
integer(kind=i32), public :: status = particle_step_ok
integer(kind=i32), public :: field_eval_count = 0_i32
integer(kind=i32), public :: collision_query_count = 0_i32
integer(kind=i32), public :: z_high_outward_event_count = 0_i32
integer(kind=i32), public :: outer_barrier_return_count = 0_i32
integer(kind=i32), public :: outer_barrier_escape_count = 0_i32
real(kind=dp), public :: z_high_outward_normal_kinetic_energy_j_sum = 0.0_dp

Subroutines

public subroutine build_particle_step_candidate(mesh, sim, snapshot, bfield, x0, v0, q, m, dt, x1, v1, sampled_electric_field, use_upper_panel_fourier, field_available)

予測中点の電場と一様磁場を使い、次時刻の位置・速度候補を返す。

Arguments

Type IntentOptional Attributes Name
type(mesh_type), intent(in) :: mesh
type(sim_config), intent(in) :: sim
type(electrostatic_snapshot_type), intent(inout) :: snapshot
real(kind=dp), intent(in) :: bfield(3)
real(kind=dp), intent(in) :: x0(3)
real(kind=dp), intent(in) :: v0(3)
real(kind=dp), intent(in) :: q
real(kind=dp), intent(in) :: m
real(kind=dp), intent(in) :: dt
real(kind=dp), intent(out) :: x1(3)
real(kind=dp), intent(out) :: v1(3)
real(kind=dp), intent(out), optional :: sampled_electric_field(3)
logical, intent(in), optional :: use_upper_panel_fourier
logical, intent(out), optional :: field_available

public subroutine advance_particle_step(mesh, sim, snapshot, bfield, x0, v0, q, m, dt, result, boundary_contract, boundary_rng_counter)

一つの粒子stepについてmesh/boxの最早eventを順序付ける。

Arguments

Type IntentOptional Attributes Name
type(mesh_type), intent(in) :: mesh
type(sim_config), intent(in) :: sim
type(electrostatic_snapshot_type), intent(inout) :: snapshot
real(kind=dp), intent(in) :: bfield(3)
real(kind=dp), intent(in) :: x0(3)
real(kind=dp), intent(in) :: v0(3)
real(kind=dp), intent(in) :: q
real(kind=dp), intent(in) :: m
real(kind=dp), intent(in) :: dt
type(particle_step_result), intent(out) :: result
type(external_boundary_contract_type), intent(in), optional :: boundary_contract
integer(kind=i64), intent(in), optional :: boundary_rng_counter(4)

public subroutine advance_particle_step_upper_panel_fourier(mesh, sim, snapshot, bfield, x0, v0, q, m, dt, result, field_available, boundary_contract, boundary_rng_counter)

上部真空域のfactorized P0-panel Fourier場だけで、失敗した1 stepを最初から再試行する。

Arguments

Type IntentOptional Attributes Name
type(mesh_type), intent(in) :: mesh
type(sim_config), intent(in) :: sim
type(electrostatic_snapshot_type), intent(inout) :: snapshot
real(kind=dp), intent(in) :: bfield(3)
real(kind=dp), intent(in) :: x0(3)
real(kind=dp), intent(in) :: v0(3)
real(kind=dp), intent(in) :: q
real(kind=dp), intent(in) :: m
real(kind=dp), intent(in) :: dt
type(particle_step_result), intent(out) :: result
logical, intent(out) :: field_available
type(external_boundary_contract_type), intent(in), optional :: boundary_contract
integer(kind=i64), intent(in), optional :: boundary_rng_counter(4)

public subroutine resolve_particle_boundary_candidate(mesh, sim, snapshot, bfield, x0, v0, q, m, dt, x_candidate, v_candidate, hit, result, boundary_contract, boundary_rng_counter, sampled_electric_field)

構築済みcandidateとその場評価値からbox eventを解決する。

Arguments

Type IntentOptional Attributes Name
type(mesh_type), intent(in) :: mesh
type(sim_config), intent(in) :: sim
type(electrostatic_snapshot_type), intent(inout) :: snapshot
real(kind=dp), intent(in) :: bfield(3)
real(kind=dp), intent(in) :: x0(3)
real(kind=dp), intent(in) :: v0(3)
real(kind=dp), intent(in) :: q
real(kind=dp), intent(in) :: m
real(kind=dp), intent(in) :: dt
real(kind=dp), intent(in) :: x_candidate(3)
real(kind=dp), intent(in) :: v_candidate(3)
type(hit_info), intent(in), optional :: hit
type(particle_step_result), intent(out) :: result
type(external_boundary_contract_type), intent(in), optional :: boundary_contract
integer(kind=i64), intent(in), optional :: boundary_rng_counter(4)
real(kind=dp), intent(in), optional :: sampled_electric_field(3)