target/source ノードが十分離れているかを判定する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(fmm_plan_type), | intent(in) | :: | plan |
FMM 計画。 |
||
| integer(kind=i32), | intent(in) | :: | target_node |
target ノード番号。 |
||
| integer(kind=i32), | intent(in) | :: | source_node |
target ノード番号。 source ノード番号。 |
logical function nodes_well_separated(plan, target_node, source_node) type(fmm_plan_type), intent(in) :: plan integer(i32), intent(in) :: target_node, source_node real(dp) :: d(3), dist2, rs, rt, theta_eff, lhs, rhs, target_center(3) logical :: use_target_tree use_target_tree = plan%target_tree_ready target_center = active_tree_node_center(plan, use_target_tree, target_node) rt = active_tree_node_radius(plan, use_target_tree, target_node) d = target_center - plan%node_center(:, source_node) call apply_periodic2_minimum_image(plan, d) dist2 = sum(d*d) if (dist2 <= 0.0d0) then nodes_well_separated = .false. return end if rs = plan%node_radius(source_node) theta_eff = plan%options%theta lhs = (rs + rt)*(rs + rt) rhs = (theta_eff*theta_eff)*dist2 nodes_well_separated = (lhs < rhs) end function nodes_well_separated