periodic_shell_mean_excess Subroutine

public pure subroutine periodic_shell_mean_excess(h, x1, x2, y1, y2, area, soft2, s, dsdh)

単位電荷 1 個の s(h) と ds/dh。

Arguments

Type IntentOptional 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

Called by

proc~~periodic_shell_mean_excess~~CalledByGraph proc~periodic_shell_mean_excess periodic_shell_mean_excess proc~periodic_shell_mean_point_excess periodic_shell_mean_point_excess proc~periodic_shell_mean_point_excess->proc~periodic_shell_mean_excess proc~build_periodic_shell_mean_plan build_periodic_shell_mean_plan proc~build_periodic_shell_mean_plan->proc~periodic_shell_mean_point_excess proc~precompute_periodic_root_operator precompute_periodic_root_operator proc~precompute_periodic_root_operator->proc~periodic_shell_mean_point_excess proc~core_complete_plan_impl core_complete_plan_impl proc~core_complete_plan_impl->proc~build_periodic_shell_mean_plan proc~core_complete_plan_impl->proc~precompute_periodic_root_operator proc~core_build_panel_plan_impl core_build_panel_plan_impl proc~core_build_panel_plan_impl->proc~core_complete_plan_impl proc~core_build_plan_impl core_build_plan_impl proc~core_build_plan_impl->proc~core_complete_plan_impl

Source Code

  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