線源電荷から S と dS/dz の格子値を作る。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(periodic_shell_mean_plan_type), | intent(in) | :: | plan | |||
| real(kind=dp), | intent(in) | :: | charge(:) | |||
| type(periodic_shell_mean_state_type), | intent(inout) | :: | state |
subroutine refresh_periodic_shell_mean_state(plan, charge, state) type(periodic_shell_mean_plan_type), intent(in) :: plan real(dp), intent(in) :: charge(:) type(periodic_shell_mean_state_type), intent(inout) :: state if (.not. plan%ready) return if (size(charge) /= size(plan%value, 2)) error stop 'periodic shell-mean charge size mismatch.' if (.not. allocated(state%value)) allocate (state%value(plan%nz), state%slope(plan%nz)) if (size(state%value) /= plan%nz) then deallocate (state%value, state%slope) allocate (state%value(plan%nz), state%slope(plan%nz)) end if state%value = matmul(plan%value, charge) state%slope = matmul(plan%slope, charge) end subroutine refresh_periodic_shell_mean_state