シミュレーションボックス境界(流出/反射/面内再配置反射/周期)を適用するモジュール。
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | has_event | = | .false. | ||
| real(kind=dp), | public | :: | fraction | = | 0.0_dp | ||
| integer(kind=i32), | public | :: | face_mask | = | 0_i32 | ||
| integer(kind=i32), | public | :: | face_bc(6) | = | -1_i32 |
閉じたbox内の始点から候補終点へ向かう線分について、最初のbox面交差を返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_domain_config), | intent(in) | :: | cfg | |||
| real(kind=dp), | intent(in) | :: | x0(3) | |||
| real(kind=dp), | intent(in) | :: | x1(3) | |||
| type(boundary_event_type), | intent(out) | :: | event | |||
| integer(kind=i32), | intent(out) | :: | status |
最初のbox eventへescape/reflect/redistributed-reflect/periodicを軸順序に依存せず適用する。 face_bc を渡すと、box 設定の代わりにその face 別境界条件を event と照合する(外部障壁で一面を反射に 置き換える場合など)。省略時は cfg の bc_low/bc_high。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_domain_config), | intent(in) | :: | cfg | |||
| type(boundary_event_type), | intent(in) | :: | event | |||
| real(kind=dp), | intent(inout) | :: | x(3) | |||
| real(kind=dp), | intent(inout) | :: | v(3) | |||
| logical, | intent(inout) | :: | alive | |||
| logical, | intent(out) | :: | escaped | |||
| integer(kind=i32), | intent(out) | :: | status | |||
| real(kind=dp), | intent(in), | optional | :: | redistribution_uniform(3) | ||
| integer(kind=i32), | intent(in), | optional | :: | face_bc(6) |
photo raycast の ray が box 面を越えた点に反射・周期境界を適用する。粒子の境界処理は event API (find_first_boundary_event / apply_escape_reflect_periodic_event)が担い、これは ray 専用。 ray は面内再配置の乱数を持たないので、流出面と再配置反射の面では ray を止める(alive=.false.)。 box が無効なら何もせず、幅 0 の軸があれば ray を止める。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(particle_domain_config), | intent(in) | :: | cfg | |||
| real(kind=dp), | intent(inout) | :: | x(3) | |||
| real(kind=dp), | intent(inout) | :: | dir(3) | |||
| logical, | intent(inout) | :: | alive |