全ソース分の periodic2 Ewald 補正を加算する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan |
FMM 計画。 |
||
| type(fmm_state_type), | intent(in) | :: | state |
ソース電荷を含む state。 |
||
| real(kind=dp), | intent(in) | :: | target(3) | |||
| real(kind=dp), | intent(inout) | :: | e(3) |
subroutine add_periodic2_exact_ewald_correction_all_sources(plan, state, target, e) type(fmm_plan_type), intent(in) :: plan type(fmm_state_type), intent(in) :: state real(dp), intent(in) :: target(3) real(dp), intent(inout) :: e(3) integer(i32) :: idx real(dp) :: total_charge if (.not. plan%periodic_ewald%ready) return total_charge = 0.0d0 do idx = 1_i32, plan%nsrc total_charge = total_charge + state%src_q(idx) call add_periodic2_exact_ewald_correction_single_source(plan, state%src_q(idx), plan%src_pos(:, idx), target, e) end do call add_exact_periodic2_charged_wall_total_charge_correction(plan, total_charge, target, e) end subroutine add_periodic2_exact_ewald_correction_all_sources