default_app_config Subroutine

public subroutine default_app_config(cfg)

app_config を既定値で初期化し、TOML 上書き前の状態を作る。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(out) :: cfg

既定値で初期化したアプリ設定。


Calls

proc~~default_app_config~~CallsGraph proc~default_app_config default_app_config proc~normalize_legacy_physics_config normalize_legacy_physics_config proc~default_app_config->proc~normalize_legacy_physics_config proc~derive_field_panel_config derive_field_panel_config proc~normalize_legacy_physics_config->proc~derive_field_panel_config proc~lower_ascii lower_ascii proc~normalize_legacy_physics_config->proc~lower_ascii proc~derive_field_panel_config->proc~lower_ascii

Called by

proc~~default_app_config~~CalledByGraph proc~default_app_config default_app_config proc~handle_early_cli handle_early_cli proc~handle_early_cli->proc~default_app_config proc~load_or_init_run_state load_or_init_run_state proc~load_or_init_run_state->proc~default_app_config program~zhao_atlas_main zhao_atlas_main program~zhao_atlas_main->proc~default_app_config program~zhao_response_main zhao_response_main program~zhao_response_main->proc~default_app_config program~main main program~main->proc~handle_early_cli program~main->proc~load_or_init_run_state

Source Code

  subroutine default_app_config(cfg)
    type(app_config), intent(out) :: cfg

    cfg%mesh_mode = 'template'
    cfg%obj_path = 'examples/simple_plate.obj'
    cfg%mesh_surface_model = 'insulator'
    cfg%mesh_epsilon_r = 1.0d0
    cfg%obj_scale = 1.0d0
    cfg%obj_rotation = [0.0d0, 0.0d0, 0.0d0]
    cfg%obj_offset = [0.0d0, 0.0d0, 0.0d0]
    cfg%n_templates = 0_i32
    cfg%n_particle_species = 0_i32
    cfg%write_output = .true.
    cfg%write_mesh_potential = .false.
    cfg%write_potential_history = .false.
    cfg%output_dir = 'outputs/latest'
    cfg%output_restart_from = ''
    cfg%history_stride = 1_i32
    cfg%checkpoint_stride = 0_i32
    cfg%resume_output = .false.
    cfg%sim = sim_config()
    allocate (cfg%templates(max_templates))
    allocate (cfg%particle_species(max_particle_species))
    cfg%particle_species = particle_species_spec()
    cfg%sim%dt = 1.0d-9
    cfg%sim%rng_seed = 12345_i32
    cfg%sim%batch_count = 1_i32
    cfg%sim%max_step = 400
    cfg%sim%tol_rel = 1.0d-8
    cfg%sim%field_solver = 'auto'
    cfg%sim%field_normalization = 'si'
    cfg%sim%field_length_scale = 1.0d0
    cfg%sim%field_bc_mode = 'free'
    cfg%sim%field_periodic_image_layers = 1_i32
    cfg%sim%field_periodic_far_correction = 'none'
    cfg%sim%field_periodic_ewald_alpha = 0.0d0
    cfg%sim%field_periodic_ewald_layers = 4_i32
    cfg%sim%tree_theta = 0.5d0
    cfg%sim%tree_leaf_max = 16_i32
    cfg%sim%tree_min_nelem = 256_i32
    cfg%sim%e0 = [0.0d0, 0.0d0, 0.0d0]
    cfg%sim%has_e0_vector = .false.
    cfg%sim%e0_abs = 0.0d0
    cfg%sim%has_e0_abs = .false.
    cfg%sim%e0_phi_xy_deg = 0.0d0
    cfg%sim%has_e0_phi_xy_deg = .false.
    cfg%sim%e0_phi_z_deg = 0.0d0
    cfg%sim%has_e0_phi_z_deg = .false.
    cfg%sim%b0 = [0.0d0, 0.0d0, 0.0d0]
    cfg%sim%reservoir_potential_model = 'none'
    cfg%sim%phi_infty = 0.0d0
    cfg%sim%open_boundary_model = 'escape'
    cfg%sim%injection_face_phi_grid_n = 3_i32
    cfg%sim%raycast_max_bounce = 16_i32
    cfg%n_templates = 1_i32

    cfg%templates(1)%enabled = .true.
    cfg%templates(1)%kind = 'plane'
    cfg%templates(1)%size_x = 1.0d0
    cfg%templates(1)%size_y = 1.0d0
    cfg%templates(1)%nx = 1
    cfg%templates(1)%ny = 1
    cfg%templates(1)%center = [0.0d0, 0.0d0, 0.0d0]
    cfg%templates(1)%surface_side_policy = 'normal_plus'
    call normalize_legacy_physics_config(cfg%sim, cfg%field, cfg%periodic2, cfg%panel)
  end subroutine default_app_config