app_config を既定値で初期化し、TOML 上書き前の状態を作る。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(out) | :: | cfg |
既定値で初期化したアプリ設定。 |
subroutine default_app_config(cfg) type(app_config), intent(out) :: cfg cfg%n_mesh_parts = 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() cfg%sim%field_periodic_cache_dir = default_periodic_cache_directory(missing_ok=.true.) allocate (cfg%mesh_parts(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%near_field_precision = 'double' cfg%sim%tree_min_nelem = 256_i32 cfg%sim%particle_distribution = 'static' cfg%sim%step_growth = .false. cfg%sim%step_growth_max = 5_i32 cfg%sim%step_growth_energy_fraction = 1.0d-2 cfg%sim%particle_pool_chunk = 64_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%injection_face_phi_grid_n = 3_i32 cfg%sim%raycast_max_bounce = 16_i32 cfg%n_mesh_parts = 1_i32 cfg%mesh_parts(1)%enabled = .true. cfg%mesh_parts(1)%kind = 'plane' cfg%mesh_parts(1)%size_x = 1.0d0 cfg%mesh_parts(1)%size_y = 1.0d0 cfg%mesh_parts(1)%nx = 1 cfg%mesh_parts(1)%ny = 1 cfg%mesh_parts(1)%center = [0.0d0, 0.0d0, 0.0d0] cfg%mesh_parts(1)%surface_side_policy = 'normal_plus' call normalize_legacy_physics_config(cfg%sim, cfg%field, cfg%periodic2, cfg%panel) end subroutine default_app_config