粒子SoAデータ構造の初期化を提供するモジュール。
粒子数に一致するSoA領域を確保する。位置・速度・電荷・質量は呼出し元で埋める。 重みは1、粒子種IDは0、放出元は-1、aliveはtrueで初期化する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(particles_soa), | intent(out) | :: | pcls | |||
| integer(kind=i32), | intent(in) | :: | n |
位置・速度・電荷・質量(と任意重み)配列から particles_soa を検証付きで構築する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(particles_soa), | intent(out) | :: | pcls |
検証済み配列を内部に保持した |
||
| real(kind=dp), | intent(in) | :: | x(:,:) | |||
| real(kind=dp), | intent(in) | :: | v(:,:) | |||
| real(kind=dp), | intent(in) | :: | q(:) | |||
| real(kind=dp), | intent(in) | :: | m(:) | |||
| real(kind=dp), | intent(in), | optional | :: | w(:) | ||
| integer(kind=i32), | intent(in), | optional | :: | species_id(:) | ||
| integer(kind=i32), | intent(in), | optional | :: | source_element(:) |
既存 SoA の末尾へ粒子群を追加し、既存の alive 状態を保持する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(particles_soa), | intent(inout) | :: | pcls | |||
| real(kind=dp), | intent(in) | :: | x(:,:) | |||
| real(kind=dp), | intent(in) | :: | v(:,:) | |||
| real(kind=dp), | intent(in) | :: | q(:) | |||
| real(kind=dp), | intent(in) | :: | m(:) | |||
| real(kind=dp), | intent(in) | :: | w(:) | |||
| integer(kind=i32), | intent(in) | :: | species_id(:) | |||
| integer(kind=i32), | intent(in), | optional | :: | source_element(:) |