| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=16), | public | :: | mode | = | 'direct' | ||
| character(len=16), | public | :: | field_bc_mode | = | 'free' | ||
| character(len=16), | public | :: | field_normalization | = | 'si' | ||
| real(kind=dp), | public | :: | field_length_scale | = | 1.0d0 | ||
| real(kind=dp), | public | :: | field_origin(3) | = | 0.0d0 | ||
| real(kind=dp), | public | :: | field_inv_length_scale | = | 1.0d0 | ||
| real(kind=dp), | public | :: | field_output_scale | = | k_coulomb | ||
| real(kind=dp), | public | :: | potential_output_scale | = | k_coulomb | ||
| real(kind=dp), | public | :: | theta | = | 0.5d0 | ||
| integer(kind=i32), | public | :: | leaf_max | = | 16_i32 | ||
| integer(kind=i32), | public | :: | min_nelem | = | 256_i32 | ||
| logical, | public | :: | use_periodic2 | = | .false. | ||
| integer(kind=i32), | public | :: | periodic_axes(2) | = | 0_i32 | ||
| real(kind=dp), | public | :: | periodic_len(2) | = | 0.0d0 | ||
| integer(kind=i32), | public | :: | periodic_image_layers | = | 1_i32 | ||
| character(len=16), | public | :: | periodic_far_correction | = | 'none' | ||
| real(kind=dp), | public | :: | periodic_ewald_alpha | = | 0.0d0 | ||
| integer(kind=i32), | public | :: | periodic_ewald_layers | = | 4_i32 | ||
| character(len=256), | public | :: | periodic_cache_dir | = | '.beach_cache/periodic2' | ||
| real(kind=dp), | public | :: | periodic_generation_tolerance | = | 1.0d-8 | ||
| real(kind=dp), | public | :: | target_box_min(3) | = | 0.0d0 | ||
| real(kind=dp), | public | :: | target_box_max(3) | = | 0.0d0 | ||
| logical, | public | :: | tree_ready | = | .false. | ||
| integer(kind=i32), | public | :: | nelem | = | 0_i32 | ||
| integer(kind=i32), | public | :: | max_node | = | 0_i32 | ||
| integer(kind=i32), | public | :: | nnode | = | 0_i32 | ||
| integer(kind=i32), | public, | allocatable | :: | elem_order(:) | |||
| integer(kind=i32), | public, | allocatable | :: | node_start(:) | |||
| integer(kind=i32), | public, | allocatable | :: | node_count(:) | |||
| integer(kind=i32), | public, | allocatable | :: | child_count(:) | |||
| integer(kind=i32), | public, | allocatable | :: | child_idx(:,:) | |||
| integer(kind=i32), | public, | allocatable | :: | child_octant(:,:) | |||
| integer(kind=i32), | public, | allocatable | :: | node_depth(:) | |||
| integer(kind=i32), | public | :: | node_max_depth | = | 0_i32 | ||
| integer(kind=i32), | public, | allocatable | :: | node_level_start(:) | |||
| integer(kind=i32), | public, | allocatable | :: | node_level_nodes(:) | |||
| real(kind=dp), | public, | allocatable | :: | node_center(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | node_half_size(:,:) | |||
| real(kind=dp), | public, | allocatable | :: | node_radius(:) | |||
| real(kind=dp), | public, | allocatable | :: | node_q(:) | |||
| real(kind=dp), | public, | allocatable | :: | node_abs_q(:) | |||
| real(kind=dp), | public, | allocatable | :: | node_qx(:) | |||
| real(kind=dp), | public, | allocatable | :: | node_qy(:) | |||
| real(kind=dp), | public, | allocatable | :: | node_qz(:) | |||
| real(kind=dp), | public, | allocatable | :: | node_charge_center(:,:) | |||
| logical, | public | :: | fmm_core_ready | = | .false. | ||
| type(fmm_options_type), | public | :: | fmm_core_options | = | fmm_options_type() | ||
| type(fmm_plan_type), | public | :: | fmm_core_plan | ||||
| type(fmm_state_type), | public | :: | fmm_core_state | = | fmm_state_type() |
設定とメッシュから電場ソルバを初期化する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(field_solver_type), | intent(inout) | :: | self | |||
| type(mesh_type), | intent(in) | :: | mesh | |||
| type(sim_config), | intent(in) | :: | sim | |||
| type(field_physics_config), | intent(in), | optional | :: | field_config | ||
| type(periodic2_physics_config), | intent(in), | optional | :: | periodic_config | ||
| type(panel_kernel_config), | intent(in), | optional | :: | panel_config |
現在の要素電荷から treecode/FMM モーメントを再計算する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(field_solver_type), | intent(inout) | :: | self | |||
| type(mesh_type), | intent(in) | :: | mesh |
観測点 r の電場を設定されたソルバで評価する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(field_solver_type), | intent(inout) | :: | self | |||
| type(mesh_type), | intent(in) | :: | mesh | |||
| real(kind=dp), | intent(in) | :: | r(3) | |||
| real(kind=dp), | intent(out) | :: | e(3) |
観測点 r の電位を設定されたソルバで評価する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(field_solver_type), | intent(inout) | :: | self | |||
| type(mesh_type), | intent(in) | :: | mesh | |||
| type(sim_config), | intent(in) | :: | sim | |||
| real(kind=dp), | intent(in) | :: | r(3) | |||
| real(kind=dp), | intent(out) | :: | phi |
メッシュ重心での電位を計算する(FMM/direct 自動切替)。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(field_solver_type), | intent(inout) | :: | self | |||
| type(mesh_type), | intent(in) | :: | mesh | |||
| type(sim_config), | intent(in) | :: | sim | |||
| real(kind=dp), | intent(out) | :: | potential_v(:) |
cached k/=0 演算子を電荷増分へ作用させ、要素重心での電位増分を返す。
評価中だけ FMM state を charge_step へ更新し、返る前に必ず
現在の mesh%q_elem へ戻す。cached_kneq0 FMM 以外は受理しない。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(field_solver_type), | intent(inout) | :: | self | |||
| type(mesh_type), | intent(in) | :: | mesh | |||
| real(kind=dp), | intent(in) | :: | charge_step(:) | |||
| real(kind=dp), | intent(out) | :: | potential_step_v(:) |
type :: field_solver_type character(len=16) :: mode = 'direct' character(len=16) :: field_bc_mode = 'free' character(len=16) :: field_normalization = 'si' real(dp) :: field_length_scale = 1.0d0 real(dp) :: field_origin(3) = 0.0d0 real(dp) :: field_inv_length_scale = 1.0d0 real(dp) :: field_output_scale = k_coulomb real(dp) :: potential_output_scale = k_coulomb real(dp) :: theta = 0.5d0 integer(i32) :: leaf_max = 16_i32 integer(i32) :: min_nelem = 256_i32 logical :: use_periodic2 = .false. integer(i32) :: periodic_axes(2) = 0_i32 real(dp) :: periodic_len(2) = 0.0d0 integer(i32) :: periodic_image_layers = 1_i32 character(len=16) :: periodic_far_correction = 'none' real(dp) :: periodic_ewald_alpha = 0.0d0 integer(i32) :: periodic_ewald_layers = 4_i32 character(len=256) :: periodic_cache_dir = '.beach_cache/periodic2' real(dp) :: periodic_generation_tolerance = 1.0d-8 real(dp) :: target_box_min(3) = 0.0d0 real(dp) :: target_box_max(3) = 0.0d0 logical :: tree_ready = .false. integer(i32) :: nelem = 0_i32 integer(i32) :: max_node = 0_i32 integer(i32) :: nnode = 0_i32 integer(i32), allocatable :: elem_order(:) integer(i32), allocatable :: node_start(:), node_count(:) integer(i32), allocatable :: child_count(:), child_idx(:, :), child_octant(:, :) integer(i32), allocatable :: node_depth(:) integer(i32) :: node_max_depth = 0_i32 integer(i32), allocatable :: node_level_start(:), node_level_nodes(:) real(dp), allocatable :: node_center(:, :) real(dp), allocatable :: node_half_size(:, :) real(dp), allocatable :: node_radius(:) real(dp), allocatable :: node_q(:), node_abs_q(:) real(dp), allocatable :: node_qx(:), node_qy(:), node_qz(:) real(dp), allocatable :: node_charge_center(:, :) logical :: fmm_core_ready = .false. type(fmm_options_type) :: fmm_core_options = fmm_options_type() type(fmm_plan_type) :: fmm_core_plan type(fmm_state_type) :: fmm_core_state = fmm_state_type() contains procedure :: init => init_field_solver procedure :: refresh => refresh_field_solver procedure :: eval_e => eval_e_field_solver procedure :: eval_potential => eval_potential_field_solver procedure :: compute_mesh_potential => compute_mesh_potential_field_solver procedure :: compute_cached_kneq0_mesh_potential_step => compute_cached_kneq0_mesh_potential_step_field_solver end type field_solver_type