bem_injection_random Module

粒子注入で共有する乱数初期化と基本分布sampling。


Uses

  • module~~bem_injection_random~~UsesGraph module~bem_injection_random bem_injection_random module~bem_constants bem_constants module~bem_injection_random->module~bem_constants module~bem_kinds bem_kinds module~bem_injection_random->module~bem_kinds module~bem_particles bem_particles module~bem_injection_random->module~bem_particles module~bem_types bem_types module~bem_injection_random->module~bem_types module~bem_constants->module~bem_kinds iso_fortran_env iso_fortran_env module~bem_kinds->iso_fortran_env module~bem_particles->module~bem_kinds module~bem_particles->module~bem_types module~bem_types->module~bem_kinds

Used by

  • module~~bem_injection_random~~UsedByGraph module~bem_injection_random bem_injection_random module~bem_injection bem_injection module~bem_injection->module~bem_injection_random module~bem_injection_flux bem_injection_flux module~bem_injection->module~bem_injection_flux module~bem_photoelectron_injection bem_photoelectron_injection module~bem_injection->module~bem_photoelectron_injection module~bem_injection_flux->module~bem_injection_random module~bem_photoelectron_injection->module~bem_injection_random module~bem_photoelectron_injection->module~bem_injection_flux module~bem_app_config_parser bem_app_config_parser module~bem_app_config_parser->module~bem_injection_flux module~bem_app_config_particle_runtime bem_app_config_particle_runtime module~bem_app_config_particle_runtime->module~bem_injection module~bem_app_config bem_app_config module~bem_app_config->module~bem_app_config_parser module~bem_app_config_runtime bem_app_config_runtime module~bem_app_config->module~bem_app_config_runtime module~bem_app_config_parser_finalize bem_app_config_parser_finalize module~bem_app_config_parser_finalize->module~bem_app_config_parser module~bem_app_config_parser_preflight_particles bem_app_config_parser_preflight_particles module~bem_app_config_parser_preflight_particles->module~bem_app_config_parser module~bem_app_config_parser_preflight_sim bem_app_config_parser_preflight_sim module~bem_app_config_parser_preflight_sim->module~bem_app_config_parser module~bem_app_config_parser_preflight_surface bem_app_config_parser_preflight_surface module~bem_app_config_parser_preflight_surface->module~bem_app_config_parser module~bem_app_config_parser_read_mesh bem_app_config_parser_read_mesh module~bem_app_config_parser_read_mesh->module~bem_app_config_parser module~bem_app_config_parser_read_particles bem_app_config_parser_read_particles module~bem_app_config_parser_read_particles->module~bem_app_config_parser module~bem_app_config_parser_read_sim bem_app_config_parser_read_sim module~bem_app_config_parser_read_sim->module~bem_app_config_parser module~bem_app_config_parser_read_surface bem_app_config_parser_read_surface module~bem_app_config_parser_read_surface->module~bem_app_config_parser module~bem_app_config_parser_validate bem_app_config_parser_validate module~bem_app_config_parser_validate->module~bem_app_config_parser module~bem_app_config_particle_runtime_batch bem_app_config_particle_runtime_batch module~bem_app_config_particle_runtime_batch->module~bem_app_config_particle_runtime module~bem_app_config_particle_runtime_sampling bem_app_config_particle_runtime_sampling module~bem_app_config_particle_runtime_sampling->module~bem_app_config_particle_runtime module~bem_app_config_runtime->module~bem_app_config_particle_runtime module~bem_matching_plane_coupling bem_matching_plane_coupling module~bem_matching_plane_coupling->module~bem_app_config module~bem_simulator bem_simulator module~bem_simulator->module~bem_app_config module~bem_simulator->module~bem_app_config_runtime module~bem_simulator_io bem_simulator_io module~bem_simulator_io->module~bem_app_config_runtime module~bem_simulator_io->module~bem_simulator module~bem_simulator_loop bem_simulator_loop module~bem_simulator_loop->module~bem_app_config_runtime module~bem_simulator_loop->module~bem_matching_plane_coupling module~bem_simulator_loop->module~bem_simulator program~main main program~main->module~bem_app_config program~main->module~bem_simulator program~zhao_atlas_main zhao_atlas_main program~zhao_atlas_main->module~bem_app_config program~zhao_response_main zhao_response_main program~zhao_response_main->module~bem_app_config module~bem_simulator_charge bem_simulator_charge module~bem_simulator_charge->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

Subroutines

public subroutine seed_rng(seed)

与えたシード列またはシステム時刻からFortran乱数生成器を初期化する。

Arguments

Type IntentOptional Attributes Name
integer(kind=i32), intent(in), optional :: seed(:)

public subroutine sample_uniform_positions(low, high, x)

直方体領域 [low, high] 内で一様分布の初期位置をサンプリングする。

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: low(3)
real(kind=dp), intent(in) :: high(3)
real(kind=dp), intent(out) :: x(:,:)

public subroutine sample_shifted_maxwell_velocities(drift_velocity, m_particle, v, temperature_k, thermal_speed, sigma_cutoff)

ドリフト速度付きMaxwell分布(温度または熱速度指定)から粒子速度を生成する。

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: drift_velocity(3)
real(kind=dp), intent(in) :: m_particle

粒子1個あたりの質量 [kg](temperature_k 指定時に使用)。

real(kind=dp), intent(out) :: v(:,:)
real(kind=dp), intent(in), optional :: temperature_k

熱運動の温度 [K](thermal_speed 未指定時に使用)。

real(kind=dp), intent(in), optional :: thermal_speed

熱速度の標準偏差 sigma [m/s](指定時は温度より優先)。

real(kind=dp), intent(in), optional :: sigma_cutoff

標準正規変量を [-sigma_cutoff, sigma_cutoff] に切る上限(省略時 6)。

public subroutine init_random_beam_particles(pcls, n, q_particle, m_particle, w_particle, pos_low, pos_high, drift_velocity, temperature_k, thermal_speed)

指定粒子数ぶんの位置/速度/電荷/質量/重みを生成し particles_soa を初期化する。

Arguments

Type IntentOptional Attributes Name
type(particles_soa), intent(out) :: pcls

生成した粒子群を保持する particles_soa

integer(kind=i32), intent(in) :: n

生成するマクロ粒子数。

real(kind=dp), intent(in) :: q_particle

粒子1個あたりの電荷 [C]。

real(kind=dp), intent(in) :: m_particle

粒子1個あたりの電荷 [C]。 粒子1個あたりの質量 [kg]。

real(kind=dp), intent(in) :: w_particle

粒子1個あたりの電荷 [C]。 粒子1個あたりの質量 [kg]。 粒子1個あたりのマクロ粒子重み。

real(kind=dp), intent(in) :: pos_low(3)
real(kind=dp), intent(in) :: pos_high(3)
real(kind=dp), intent(in) :: drift_velocity(3)
real(kind=dp), intent(in), optional :: temperature_k

熱運動の温度 [K](thermal_speed 未指定時に使用)。

real(kind=dp), intent(in), optional :: thermal_speed

熱運動の温度 [K](thermal_speed 未指定時に使用)。 熱速度の標準偏差 sigma [m/s](指定時は温度より優先)。

public subroutine sample_standard_normal(z, sigma_cutoff)

Box–Muller法で標準正規乱数を生成し、任意形状配列へ詰める。

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(out) :: z(:,:)
real(kind=dp), intent(in), optional :: sigma_cutoff