photo_raycast 粒子種のレイキャスト放出を実行する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(sim_config), | intent(in) | :: | sim |
シミュレーション設定。 |
||
| type(particle_species_spec), | intent(in) | :: | spec |
photo_raycast 粒子種設定。 |
||
| type(mesh_type), | intent(in) | :: | mesh |
交差判定に使う現在メッシュ。 |
||
| integer(kind=i32), | intent(in) | :: | n_rays |
バッチで発射するレイ本数。 |
||
| real(kind=dp), | intent(out) | :: | x(:,:) | |||
| real(kind=dp), | intent(out) | :: | v(:,:) | |||
| real(kind=dp), | intent(out) | :: | w(:) | |||
| integer(kind=i32), | intent(out) | :: | n_emit |
実際に放出された粒子数。 |
||
| integer(kind=i32), | intent(out), | optional | :: | emit_elem_idx(:) | ||
| integer(kind=i32), | intent(in), | optional | :: | global_rays_per_batch | ||
| real(kind=dp), | intent(in), | optional | :: | emit_current_density_override |
放出電流密度の上書き値 [A/m^2]。 |
|
| real(kind=dp), | intent(in), | optional | :: | normal_drift_speed_override |
放出法線ドリフトの上書き値 [m/s]。 |
|
| real(kind=dp), | intent(in), | optional | :: | vmin_normal |
放出法線速度の下限 [m/s]。 |
subroutine sample_photo_species_state( & sim, spec, mesh, n_rays, x, v, w, n_emit, emit_elem_idx, global_rays_per_batch, & emit_current_density_override, normal_drift_speed_override, vmin_normal & ) type(sim_config), intent(in) :: sim type(particle_species_spec), intent(in) :: spec type(mesh_type), intent(in) :: mesh integer(i32), intent(in) :: n_rays real(dp), intent(out) :: x(:, :) real(dp), intent(out) :: v(:, :) real(dp), intent(out) :: w(:) integer(i32), intent(out) :: n_emit integer(i32), intent(out), optional :: emit_elem_idx(:) integer(i32), intent(in), optional :: global_rays_per_batch real(dp), intent(in), optional :: emit_current_density_override real(dp), intent(in), optional :: normal_drift_speed_override real(dp), intent(in), optional :: vmin_normal real(dp) :: emit_current_density, normal_drift_speed if (n_rays <= 0_i32) then if (present(emit_elem_idx)) emit_elem_idx = -1_i32 n_emit = 0_i32 return end if emit_current_density = spec%emit_current_density_a_m2 if (present(emit_current_density_override)) emit_current_density = emit_current_density_override normal_drift_speed = spec%normal_drift_speed if (present(normal_drift_speed_override)) normal_drift_speed = normal_drift_speed_override if (present(global_rays_per_batch)) then if (present(vmin_normal)) then call sample_photo_raycast_particles( & mesh, sim, spec%inject_face, spec%pos_low, spec%pos_high, spec%ray_direction, spec%m_particle, & species_temperature_k(spec), normal_drift_speed, emit_current_density, spec%q_particle, & n_rays, x, v, w, n_emit, emit_elem_idx, global_rays_per_batch=global_rays_per_batch, vmin_normal=vmin_normal & ) else call sample_photo_raycast_particles( & mesh, sim, spec%inject_face, spec%pos_low, spec%pos_high, spec%ray_direction, spec%m_particle, & species_temperature_k(spec), normal_drift_speed, emit_current_density, spec%q_particle, & n_rays, x, v, w, n_emit, emit_elem_idx, global_rays_per_batch=global_rays_per_batch & ) end if else if (present(vmin_normal)) then call sample_photo_raycast_particles( & mesh, sim, spec%inject_face, spec%pos_low, spec%pos_high, spec%ray_direction, spec%m_particle, & species_temperature_k(spec), normal_drift_speed, emit_current_density, spec%q_particle, & n_rays, x, v, w, n_emit, emit_elem_idx, vmin_normal=vmin_normal & ) else call sample_photo_raycast_particles( & mesh, sim, spec%inject_face, spec%pos_low, spec%pos_high, spec%ray_direction, spec%m_particle, & species_temperature_k(spec), normal_drift_speed, emit_current_density, spec%q_particle, & n_rays, x, v, w, n_emit, emit_elem_idx & ) end if end if end subroutine sample_photo_species_state