bem_panel_kernel Module

Analytic free-space P0 triangle potential, field, principal value, and jump.


Uses

  • module~~bem_panel_kernel~~UsesGraph module~bem_panel_kernel bem_panel_kernel module~bem_constants bem_constants module~bem_panel_kernel->module~bem_constants module~bem_kinds bem_kinds module~bem_panel_kernel->module~bem_kinds module~bem_panel_geometry bem_panel_geometry module~bem_panel_kernel->module~bem_panel_geometry module~bem_panel_self_terms bem_panel_self_terms module~bem_panel_kernel->module~bem_panel_self_terms module~bem_constants->module~bem_kinds iso_fortran_env iso_fortran_env module~bem_kinds->iso_fortran_env module~bem_panel_geometry->module~bem_kinds ieee_arithmetic ieee_arithmetic module~bem_panel_geometry->ieee_arithmetic module~bem_panel_self_terms->module~bem_kinds module~bem_panel_self_terms->module~bem_panel_geometry

Used by

  • module~~bem_panel_kernel~~UsedByGraph module~bem_panel_kernel bem_panel_kernel module~bem_coulomb_fmm_eval_ops bem_coulomb_fmm_eval_ops module~bem_coulomb_fmm_eval_ops->module~bem_panel_kernel module~bem_electrostatic_snapshot bem_electrostatic_snapshot module~bem_electrostatic_snapshot->module~bem_panel_kernel module~bem_field_solver_eval bem_field_solver_eval module~bem_field_solver_eval->module~bem_panel_kernel module~bem_app_config_particle_runtime bem_app_config_particle_runtime module~bem_app_config_particle_runtime->module~bem_electrostatic_snapshot module~bem_app_config_potential_runtime bem_app_config_potential_runtime module~bem_app_config_particle_runtime->module~bem_app_config_potential_runtime module~bem_app_config_potential_runtime->module~bem_electrostatic_snapshot module~bem_coulomb_fmm_core_eval bem_coulomb_fmm_core_eval module~bem_coulomb_fmm_core_eval->module~bem_coulomb_fmm_eval_ops module~bem_electrostatic_snapshot_eval bem_electrostatic_snapshot_eval module~bem_electrostatic_snapshot_eval->module~bem_electrostatic_snapshot module~bem_electrostatic_snapshot_upper_fourier bem_electrostatic_snapshot_upper_fourier module~bem_electrostatic_snapshot_upper_fourier->module~bem_electrostatic_snapshot module~bem_output_writer bem_output_writer module~bem_output_writer->module~bem_electrostatic_snapshot module~bem_particle_stepper bem_particle_stepper module~bem_particle_stepper->module~bem_electrostatic_snapshot module~bem_simulator bem_simulator module~bem_simulator->module~bem_electrostatic_snapshot module~bem_simulator->module~bem_output_writer module~bem_simulator->module~bem_particle_stepper module~bem_surface_models bem_surface_models module~bem_simulator->module~bem_surface_models module~bem_app_config_runtime bem_app_config_runtime module~bem_simulator->module~bem_app_config_runtime module~bem_run_outputs bem_run_outputs module~bem_simulator->module~bem_run_outputs module~bem_app_config bem_app_config module~bem_simulator->module~bem_app_config module~bem_surface_models->module~bem_electrostatic_snapshot program~main main program~main->module~bem_electrostatic_snapshot program~main->module~bem_output_writer program~main->module~bem_simulator module~bem_periodic_checkpoint bem_periodic_checkpoint program~main->module~bem_periodic_checkpoint program~main->module~bem_run_outputs program~main->module~bem_app_config module~bem_app_config_particle_runtime_batch bem_app_config_particle_runtime_batch module~bem_app_config_particle_runtime_batch->module~bem_app_config_particle_runtime module~bem_app_config_particle_runtime_sampling bem_app_config_particle_runtime_sampling module~bem_app_config_particle_runtime_sampling->module~bem_app_config_particle_runtime module~bem_app_config_particle_runtime_slots bem_app_config_particle_runtime_slots module~bem_app_config_particle_runtime_slots->module~bem_app_config_particle_runtime module~bem_app_config_runtime->module~bem_app_config_particle_runtime module~bem_app_config_runtime->module~bem_app_config_potential_runtime module~bem_output_writer_files bem_output_writer_files module~bem_output_writer_files->module~bem_output_writer module~bem_output_writer_history bem_output_writer_history module~bem_output_writer_history->module~bem_output_writer module~bem_output_writer_summary bem_output_writer_summary module~bem_output_writer_summary->module~bem_output_writer module~bem_periodic_checkpoint->module~bem_output_writer module~bem_run_outputs->module~bem_output_writer module~bem_run_outputs->module~bem_periodic_checkpoint module~bem_simulator_charge bem_simulator_charge module~bem_simulator_charge->module~bem_simulator module~bem_simulator_io bem_simulator_io module~bem_simulator_io->module~bem_output_writer module~bem_simulator_io->module~bem_simulator module~bem_simulator_io->module~bem_app_config_runtime module~bem_simulator_loop bem_simulator_loop module~bem_simulator_loop->module~bem_output_writer module~bem_simulator_loop->module~bem_simulator module~bem_simulator_loop->module~bem_app_config_runtime module~bem_simulator_loop->module~bem_periodic_checkpoint module~bem_simulator_loop->module~bem_run_outputs module~bem_zhao_outflow_refresh bem_zhao_outflow_refresh module~bem_simulator_loop->module~bem_zhao_outflow_refresh module~bem_simulator_particles bem_simulator_particles module~bem_simulator_particles->module~bem_particle_stepper module~bem_simulator_particles->module~bem_simulator module~bem_simulator_stats bem_simulator_stats module~bem_simulator_stats->module~bem_simulator module~bem_surface_models_conductor bem_surface_models_conductor module~bem_surface_models_conductor->module~bem_surface_models module~bem_app_config->module~bem_app_config_runtime module~bem_zhao_outflow_refresh->module~bem_app_config

Variables

Type Visibility Attributes Name Initial
integer(kind=i32), public, parameter :: panel_side_principal_value = 0_i32
integer(kind=i32), public, parameter :: panel_side_normal_plus = 1_i32
integer(kind=i32), public, parameter :: panel_side_normal_minus = -1_i32

Subroutines

public subroutine panel_potential_field(geometry, charge, target, side, potential, field)

Arguments

Type IntentOptional Attributes Name
type(panel_geometry_type), intent(in) :: geometry
real(kind=dp), intent(in) :: charge
real(kind=dp), intent(in) :: target(3)
integer(kind=i32), intent(in) :: side
real(kind=dp), intent(out) :: potential
real(kind=dp), intent(out) :: field(3)

public subroutine panel_potential_field_translated(geometry, shift, charge, target, potential, field)

Principal-value potential and field of geometry translated by shift, without copying it. The arithmetic is the same as panel_potential_field applied to a geometry whose vertices were translated, evaluated once per vertex distance instead of once per edge end, so the result is bitwise identical. A target on the panel plane falls back to that routine.

Arguments

Type IntentOptional Attributes Name
type(panel_geometry_type), intent(in) :: geometry
real(kind=dp), intent(in) :: shift(3)
real(kind=dp), intent(in) :: charge
real(kind=dp), intent(in) :: target(3)
real(kind=dp), intent(out) :: potential
real(kind=dp), intent(out) :: field(3)

public subroutine panel_field_sum_translated(count, vx, vy, vz, nx, ny, nz, edge, ox, oy, oz, area, index, charge, geometry, target, ex, ey, ez)

Principal-value field at target of count translated panels given as component arrays (translated vertex x/y/z per vertex, normal, edge lengths, outward edge normals, area), accumulated into ex, ey, ez divided by k_coulomb as the FMM near field stores it. Entry k carries charge(index(k)); geometry(index(k)) is only read for the on-plane fallback. The SIMD loop performs the operations of panel_potential_field_translated in the same order and the contributions are added in list order, so the sum matches a loop over that routine bit for bit; zero charges are skipped as that loop skips them.

Arguments

Type IntentOptional Attributes Name
integer(kind=i32), intent(in) :: count
real(kind=dp), intent(in) :: vx(3,*)
real(kind=dp), intent(in) :: vy(3,*)
real(kind=dp), intent(in) :: vz(3,*)
real(kind=dp), intent(in) :: nx(*)
real(kind=dp), intent(in) :: ny(*)
real(kind=dp), intent(in) :: nz(*)
real(kind=dp), intent(in) :: edge(3,*)
real(kind=dp), intent(in) :: ox(3,*)
real(kind=dp), intent(in) :: oy(3,*)
real(kind=dp), intent(in) :: oz(3,*)
real(kind=dp), intent(in) :: area(*)
integer(kind=i32), intent(in) :: index(*)
real(kind=dp), intent(in) :: charge(:)
type(panel_geometry_type), intent(in) :: geometry(:)
real(kind=dp), intent(in) :: target(3)
real(kind=dp), intent(inout) :: ex
real(kind=dp), intent(inout) :: ey
real(kind=dp), intent(inout) :: ez

public subroutine panel_potential_sum_translated(count, vx, vy, vz, nx, ny, nz, edge, ox, oy, oz, area, index, charge, geometry, target, phi)

Principal-value potential counterpart of panel_field_sum_translated, accumulated into phi divided by k_coulomb.

Arguments

Type IntentOptional Attributes Name
integer(kind=i32), intent(in) :: count
real(kind=dp), intent(in) :: vx(3,*)
real(kind=dp), intent(in) :: vy(3,*)
real(kind=dp), intent(in) :: vz(3,*)
real(kind=dp), intent(in) :: nx(*)
real(kind=dp), intent(in) :: ny(*)
real(kind=dp), intent(in) :: nz(*)
real(kind=dp), intent(in) :: edge(3,*)
real(kind=dp), intent(in) :: ox(3,*)
real(kind=dp), intent(in) :: oy(3,*)
real(kind=dp), intent(in) :: oz(3,*)
real(kind=dp), intent(in) :: area(*)
integer(kind=i32), intent(in) :: index(*)
real(kind=dp), intent(in) :: charge(:)
type(panel_geometry_type), intent(in) :: geometry(:)
real(kind=dp), intent(in) :: target(3)
real(kind=dp), intent(inout) :: phi

public subroutine panel_field_sum_translated_sp(count, vx, vy, vz, nx, ny, nz, edge, ox, oy, oz, area, index, charge, geometry, axes, shift1, shift2, target_local, target, ex, ey, ez)

Single-precision counterpart of panel_field_sum_translated. The component tables hold the panels translated by their image shift and relative to the leaf center; target_local is the target in the same frame (double, rounded here) and target the absolute target for the on-plane fallback, which still runs the double-precision kernel on geometry(index(k)) translated by shift1(k), shift2(k) along axes. Eight panels per AVX2 vector; the field error is around 1e-6 relative.

Arguments

Type IntentOptional Attributes Name
integer(kind=i32), intent(in) :: count
real(kind=sp), intent(in) :: vx(3,*)
real(kind=sp), intent(in) :: vy(3,*)
real(kind=sp), intent(in) :: vz(3,*)
real(kind=sp), intent(in) :: nx(*)
real(kind=sp), intent(in) :: ny(*)
real(kind=sp), intent(in) :: nz(*)
real(kind=sp), intent(in) :: edge(3,*)
real(kind=sp), intent(in) :: ox(3,*)
real(kind=sp), intent(in) :: oy(3,*)
real(kind=sp), intent(in) :: oz(3,*)
real(kind=sp), intent(in) :: area(*)
integer(kind=i32), intent(in) :: index(*)
real(kind=dp), intent(in) :: charge(:)
type(panel_geometry_type), intent(in) :: geometry(:)
integer(kind=i32), intent(in) :: axes(2)
real(kind=dp), intent(in) :: shift1(*)
real(kind=dp), intent(in) :: shift2(*)
real(kind=dp), intent(in) :: target_local(3)
real(kind=dp), intent(in) :: target(3)
real(kind=dp), intent(inout) :: ex
real(kind=dp), intent(inout) :: ey
real(kind=dp), intent(inout) :: ez

public subroutine panel_potential_sum_translated_sp(count, vx, vy, vz, nx, ny, nz, edge, ox, oy, oz, area, index, charge, geometry, axes, shift1, shift2, target_local, target, phi)

Single-precision counterpart of panel_potential_sum_translated; see panel_field_sum_translated_sp.

Arguments

Type IntentOptional Attributes Name
integer(kind=i32), intent(in) :: count
real(kind=sp), intent(in) :: vx(3,*)
real(kind=sp), intent(in) :: vy(3,*)
real(kind=sp), intent(in) :: vz(3,*)
real(kind=sp), intent(in) :: nx(*)
real(kind=sp), intent(in) :: ny(*)
real(kind=sp), intent(in) :: nz(*)
real(kind=sp), intent(in) :: edge(3,*)
real(kind=sp), intent(in) :: ox(3,*)
real(kind=sp), intent(in) :: oy(3,*)
real(kind=sp), intent(in) :: oz(3,*)
real(kind=sp), intent(in) :: area(*)
integer(kind=i32), intent(in) :: index(*)
real(kind=dp), intent(in) :: charge(:)
type(panel_geometry_type), intent(in) :: geometry(:)
integer(kind=i32), intent(in) :: axes(2)
real(kind=dp), intent(in) :: shift1(*)
real(kind=dp), intent(in) :: shift2(*)
real(kind=dp), intent(in) :: target_local(3)
real(kind=dp), intent(in) :: target(3)
real(kind=dp), intent(inout) :: phi