種数に合わせて注入状態をゼロ初期化する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(injection_state), | intent(out) | :: | state |
初期化する注入状態。 |
||
| integer, | intent(in) | :: | n_species |
粒子種数(source残差と6面boundary流入残差の種方向配列長)。 |
subroutine initialize_injection_state(state, n_species) type(injection_state), intent(out) :: state integer, intent(in) :: n_species allocate (state%macro_residual(n_species)) allocate (state%boundary_macro_residual(6, n_species)) state%macro_residual = 0.0d0 state%boundary_macro_residual = 0.0d0 end subroutine initialize_injection_state