core_prepare_panel_sources_impl Subroutine

public subroutine core_prepare_panel_sources_impl(plan, v0, v1, v2, options)

Panel sources only: options, centroids and panel geometry, as the first part of a plan build. The plan then supports exact-direct evaluation; core_complete_plan_impl adds the FMM part.

Arguments

Type IntentOptional Attributes Name
type(fmm_plan_type), intent(inout) :: plan
real(kind=dp), intent(in) :: v0(:,:)
real(kind=dp), intent(in) :: v1(:,:)
real(kind=dp), intent(in) :: v2(:,:)
type(fmm_options_type), intent(in) :: options

Calls

proc~~core_prepare_panel_sources_impl~~CallsGraph proc~core_prepare_panel_sources_impl core_prepare_panel_sources_impl proc~core_destroy_plan_impl core_destroy_plan_impl proc~core_prepare_panel_sources_impl->proc~core_destroy_plan_impl proc~default_periodic_cache_directory default_periodic_cache_directory proc~core_prepare_panel_sources_impl->proc~default_periodic_cache_directory proc~has_valid_target_box has_valid_target_box proc~core_prepare_panel_sources_impl->proc~has_valid_target_box proc~init_panel_geometry init_panel_geometry proc~core_prepare_panel_sources_impl->proc~init_panel_geometry proc~sort_real_ascending sort_real_ascending proc~core_prepare_panel_sources_impl->proc~sort_real_ascending proc~use_periodic2_cached_kneq0 use_periodic2_cached_kneq0 proc~core_prepare_panel_sources_impl->proc~use_periodic2_cached_kneq0 proc~wrap_src_pos_to_primary_cell wrap_src_pos_to_primary_cell proc~core_prepare_panel_sources_impl->proc~wrap_src_pos_to_primary_cell proc~reset_fmm_plan reset_fmm_plan proc~core_destroy_plan_impl->proc~reset_fmm_plan

Called by

proc~~core_prepare_panel_sources_impl~~CalledByGraph proc~core_prepare_panel_sources_impl core_prepare_panel_sources_impl proc~core_build_panel_plan_impl core_build_panel_plan_impl proc~core_build_panel_plan_impl->proc~core_prepare_panel_sources_impl

Source Code

  subroutine core_prepare_panel_sources_impl(plan, v0, v1, v2, options)
    type(fmm_plan_type), intent(inout) :: plan
    real(dp), intent(in) :: v0(:, :), v1(:, :), v2(:, :)
    type(fmm_options_type), intent(in) :: options
    real(dp), allocatable :: src_pos(:, :)

    if (size(v0, 1) /= 3 .or. size(v1, 1) /= 3 .or. size(v2, 1) /= 3 .or. &
        size(v0, 2) /= size(v1, 2) .or. size(v0, 2) /= size(v2, 2)) then
      error stop 'FMM panel core expects v0/v1/v2(3,n).'
    end if
    allocate (src_pos(3, size(v0, 2)))
    src_pos = (v0 + v1 + v2)/3.0_dp
    call prepare_plan_sources(plan, src_pos, options, v0, v1, v2)
  end subroutine core_prepare_panel_sources_impl