単位電荷 1 個の s(h) と ds/dh。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | h |
評価点の高さ − 線源の高さ。 |
||
| real(kind=dp), | intent(in) | :: | x1 |
評価点の高さ − 線源の高さ。 |
||
| real(kind=dp), | intent(in) | :: | x2 |
評価点の高さ − 線源の高さ。 |
||
| real(kind=dp), | intent(in) | :: | y1 |
評価点の高さ − 線源の高さ。 |
||
| real(kind=dp), | intent(in) | :: | y2 |
評価点の高さ − 線源の高さ。 |
||
| real(kind=dp), | intent(in) | :: | area |
評価点の高さ − 線源の高さ。 セルの面積。 |
||
| real(kind=dp), | intent(in) | :: | soft2 |
評価点の高さ − 線源の高さ。 セルの面積。 softening の二乗(P0 panel では 0)。 |
||
| real(kind=dp), | intent(out) | :: | s | |||
| real(kind=dp), | intent(out) | :: | dsdh |
pure subroutine periodic_shell_mean_excess(h, x1, x2, y1, y2, area, soft2, s, dsdh) real(dp), intent(in) :: h, x1, x2, y1, y2, area, soft2 real(dp), intent(out) :: s, dsdh real(dp) :: h_eff, log_part, atan_part, smooth h_eff = sqrt(h*h + soft2) log_part = corner_log(x2, y2, h_eff) - corner_log(x1, y2, h_eff) - corner_log(x2, y1, h_eff) + & corner_log(x1, y1, h_eff) atan_part = corner_atan(x2, y2, h_eff) + corner_atan(x1, y2, h_eff) + corner_atan(x2, y1, h_eff) + & corner_atan(x1, y1, h_eff) ! smooth = mu(h_eff) + 2*pi*h_eff/A。四隅の atan(xy/(h r)) の和を 2*pi - sum atan(h r/|xy|) に直し、 ! |h| の折れ目を解析的に打ち消している。 smooth = (log_part + h_eff*atan_part)/area s = smooth + 2.0_dp*pi*(abs(h) - h_eff)/area if (h_eff > 0.0_dp) then dsdh = (h/h_eff)*atan_part/area + 2.0_dp*pi*(sign(1.0_dp, h) - h/h_eff)/area else dsdh = 0.0_dp end if end subroutine periodic_shell_mean_excess