electrostatic_snapshot_type Derived Type

type, public :: electrostatic_snapshot_type


Inherits

type~~electrostatic_snapshot_type~~InheritsGraph type~electrostatic_snapshot_type electrostatic_snapshot_type type~electrostatic_diagnostics_type electrostatic_diagnostics_type type~electrostatic_snapshot_type->type~electrostatic_diagnostics_type diagnostics type~field_solver_type field_solver_type type~electrostatic_snapshot_type->type~field_solver_type nonzero_solver type~periodic2_physics_config periodic2_physics_config type~electrostatic_snapshot_type->type~periodic2_physics_config periodic_options type~periodic_nonzero_upper_vacuum_plan_type periodic_nonzero_upper_vacuum_plan_type type~electrostatic_snapshot_type->type~periodic_nonzero_upper_vacuum_plan_type upper_fourier_plan type~periodic_zero_mode_plan_type periodic_zero_mode_plan_type type~electrostatic_snapshot_type->type~periodic_zero_mode_plan_type zero_plan type~periodic_zero_mode_state_type periodic_zero_mode_state_type type~electrostatic_snapshot_type->type~periodic_zero_mode_state_type zero_state type~fmm_options_type fmm_options_type type~field_solver_type->type~fmm_options_type fmm_core_options type~fmm_plan_type fmm_plan_type type~field_solver_type->type~fmm_plan_type fmm_core_plan type~fmm_state_type fmm_state_type type~field_solver_type->type~fmm_state_type fmm_core_state type~panel_height_projection_type panel_height_projection_type type~periodic_zero_mode_plan_type->type~panel_height_projection_type panel type~fmm_plan_type->type~periodic_zero_mode_plan_type periodic_k0_plan type~fmm_plan_type->type~fmm_options_type options type~panel_geometry_type panel_geometry_type type~fmm_plan_type->type~panel_geometry_type panel_geometry type~periodic2_ewald_data_type periodic2_ewald_data_type type~fmm_plan_type->type~periodic2_ewald_data_type periodic_ewald type~fmm_state_type->type~periodic_zero_mode_state_type periodic_k0_state

Components

Type Visibility Attributes Name Initial
type(field_solver_type), public :: nonzero_solver
real(kind=dp), public :: prescribed_e(3) = [0.0_dp, 0.0_dp, 0.0_dp]
real(kind=dp), public :: prescribed_phi_origin(3) = [0.0_dp, 0.0_dp, 0.0_dp]
logical, public :: use_zero_mode = .false.
logical, public :: use_panel_spectral_reference = .false.
logical, public :: use_cached_kneq0 = .false.
logical, public :: use_upper_panel_fourier_retry = .false.
real(kind=dp), public :: periodic_length(2) = [0.0_dp, 0.0_dp]
real(kind=dp), public :: periodic_origin(2) = [0.0_dp, 0.0_dp]
integer(kind=i32), public :: reference_mode_layers = 0_i32
integer(kind=i32), public :: panel_quadrature_order = 0_i32
type(periodic_zero_mode_plan_type), public :: zero_plan
type(periodic_zero_mode_state_type), public :: zero_state
type(periodic_nonzero_upper_vacuum_plan_type), public :: upper_fourier_plan
type(periodic2_physics_config), public :: periodic_options
type(electrostatic_diagnostics_type), public :: diagnostics
real(kind=dp), public :: gauss_residual = 0.0_dp
logical, public :: matching_plane_gauge_active = .false.
real(kind=dp), public :: matching_plane_z = 0.0_dp
real(kind=dp), public :: matching_plane_phi = 0.0_dp

Type-Bound Procedures

procedure, public :: init => init_electrostatic_snapshot

procedure, public :: refresh => refresh_electrostatic_snapshot

  • private subroutine refresh_electrostatic_snapshot(self, mesh)

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh

procedure, public :: eval_local_e => eval_snapshot_local_e

  • interface

    private module subroutine eval_snapshot_local_e(self, mesh, position, electric_field)

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh
    real(kind=dp), intent(in) :: position(3)
    real(kind=dp), intent(out) :: electric_field(3)

procedure, public :: eval_upper_panel_fourier_e => eval_snapshot_upper_panel_fourier_e

  • interface

    private module subroutine eval_snapshot_upper_panel_fourier_e(self, mesh, position, electric_field, available)

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh
    real(kind=dp), intent(in) :: position(3)
    real(kind=dp), intent(out) :: electric_field(3)
    logical, intent(out) :: available

procedure, public :: eval_upper_panel_fourier_phi => eval_snapshot_upper_panel_fourier_phi

  • interface

    private module subroutine eval_snapshot_upper_panel_fourier_phi(self, mesh, position, potential, available)

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh
    real(kind=dp), intent(in) :: position(3)
    real(kind=dp), intent(out) :: potential
    logical, intent(out) :: available

procedure, public :: eval_local_phi => eval_snapshot_local_phi

  • interface

    private module subroutine eval_snapshot_local_phi(self, mesh, sim, position, potential)

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh
    type(sim_config), intent(in) :: sim
    real(kind=dp), intent(in) :: position(3)
    real(kind=dp), intent(out) :: potential

procedure, public :: eval_local_phi_without_primary_self => eval_snapshot_local_phi_without_primary_self

  • interface

    private module subroutine eval_snapshot_local_phi_without_primary_self(self, mesh, sim, element, potential)

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh
    type(sim_config), intent(in) :: sim
    integer(kind=i32), intent(in) :: element
    real(kind=dp), intent(out) :: potential

procedure, public :: compute_mesh_potential => compute_snapshot_mesh_potential

  • interface

    private module subroutine compute_snapshot_mesh_potential(self, mesh, sim, potential)

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh
    type(sim_config), intent(in) :: sim
    real(kind=dp), intent(out) :: potential(:)

procedure, public :: measure_kneq0_potential_step => measure_snapshot_kneq0_potential_step

  • interface

    private module subroutine measure_snapshot_kneq0_potential_step(self, mesh, candidate_charge, max_abs_delta_phi_v, delta_phi_v)

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh
    real(kind=dp), intent(in) :: candidate_charge(:)
    real(kind=dp), intent(out) :: max_abs_delta_phi_v
    real(kind=dp), intent(out), optional :: delta_phi_v(:)

procedure, public :: get_diagnostics => get_snapshot_diagnostics

procedure, public :: set_matching_plane_gauge => set_snapshot_matching_plane_gauge

  • private subroutine set_snapshot_matching_plane_gauge(self, mesh, z_high, phi_high)

    周期k=0成分の電位ゲージをmatching planeへ移す。 非ゼロモードのsolver/cacheは変更しない。次回refreshでもこのゲージを保持する。

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh
    real(kind=dp), intent(in) :: z_high
    real(kind=dp), intent(in) :: phi_high

procedure, public :: clear_matching_plane_gauge => clear_snapshot_matching_plane_gauge

  • private subroutine clear_snapshot_matching_plane_gauge(self, mesh)

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(inout) :: self
    type(mesh_type), intent(in) :: mesh

procedure, public :: get_matching_plane_displacement => get_snapshot_matching_plane_displacement

  • private function get_snapshot_matching_plane_displacement(self) result(displacement_c_m2)

    matching plane直下の法線電束密度 D_H = eps0 E_bottom + Q/A を返す。

    Arguments

    Type IntentOptional Attributes Name
    class(electrostatic_snapshot_type), intent(in) :: self

    Return Value real(kind=dp)

Source Code

  type, public :: electrostatic_snapshot_type
    type(field_solver_type) :: nonzero_solver
    real(dp) :: prescribed_e(3) = [0.0_dp, 0.0_dp, 0.0_dp]
    real(dp) :: prescribed_phi_origin(3) = [0.0_dp, 0.0_dp, 0.0_dp]
    logical :: use_zero_mode = .false.
    logical :: use_panel_spectral_reference = .false.
    logical :: use_cached_kneq0 = .false.
    logical :: use_upper_panel_fourier_retry = .false.
    real(dp) :: periodic_length(2) = [0.0_dp, 0.0_dp]
    real(dp) :: periodic_origin(2) = [0.0_dp, 0.0_dp]
    integer(i32) :: reference_mode_layers = 0_i32
    integer(i32) :: panel_quadrature_order = 0_i32
    type(periodic_zero_mode_plan_type) :: zero_plan
    type(periodic_zero_mode_state_type) :: zero_state
    type(periodic_nonzero_upper_vacuum_plan_type) :: upper_fourier_plan
    type(periodic2_physics_config) :: periodic_options
    type(electrostatic_diagnostics_type) :: diagnostics
    real(dp) :: gauss_residual = 0.0_dp
    logical :: matching_plane_gauge_active = .false.
    real(dp) :: matching_plane_z = 0.0_dp
    real(dp) :: matching_plane_phi = 0.0_dp
  contains
    procedure :: init => init_electrostatic_snapshot
    procedure :: refresh => refresh_electrostatic_snapshot
    procedure :: eval_local_e => eval_snapshot_local_e
    procedure :: eval_upper_panel_fourier_e => eval_snapshot_upper_panel_fourier_e
    procedure :: eval_upper_panel_fourier_phi => eval_snapshot_upper_panel_fourier_phi
    procedure :: eval_local_phi => eval_snapshot_local_phi
    procedure :: eval_local_phi_without_primary_self => eval_snapshot_local_phi_without_primary_self
    procedure :: compute_mesh_potential => compute_snapshot_mesh_potential
    procedure :: measure_kneq0_potential_step => measure_snapshot_kneq0_potential_step
    procedure :: get_diagnostics => get_snapshot_diagnostics
    procedure :: set_matching_plane_gauge => set_snapshot_matching_plane_gauge
    procedure :: clear_matching_plane_gauge => clear_snapshot_matching_plane_gauge
    procedure :: get_matching_plane_displacement => get_snapshot_matching_plane_displacement
  end type electrostatic_snapshot_type