22 #include "./base/base_uses.f90"
30 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'cp_realspace_grid_init'
47 SUBROUTINE init_input_type(input_settings, nsmax, rs_grid_section, ilevel, higher_grid_layout)
48 TYPE(realspace_grid_input_type),
INTENT(OUT) :: input_settings
49 INTEGER,
INTENT(IN) :: nsmax
50 TYPE(section_vals_type),
OPTIONAL,
POINTER :: rs_grid_section
51 INTEGER,
INTENT(IN) :: ilevel
52 INTEGER,
DIMENSION(3),
INTENT(IN) :: higher_grid_layout
54 INTEGER :: isection, max_distributed_level, nsection
55 INTEGER,
DIMENSION(:),
POINTER :: tmp
57 IF (
PRESENT(rs_grid_section))
THEN
58 input_settings%nsmax = nsmax
62 isection = max(1, min(ilevel, nsection))
64 i_rep_section=isection, &
65 i_val=input_settings%distribution_type)
67 i_rep_section=isection, &
69 input_settings%distribution_layout = tmp
71 i_rep_section=isection, &
72 r_val=input_settings%memory_factor)
74 i_rep_section=isection, &
75 r_val=input_settings%halo_reduction_factor)
77 i_rep_section=isection, &
78 l_val=input_settings%lock_distribution)
80 i_rep_section=isection, &
81 i_val=max_distributed_level)
85 IF (ilevel > max_distributed_level)
THEN
90 IF (input_settings%lock_distribution)
THEN
91 IF (all(higher_grid_layout > 0)) input_settings%distribution_layout = higher_grid_layout
subroutine, public init_input_type(input_settings, nsmax, rs_grid_section, ilevel, higher_grid_layout)
parses an input section to assign the proper values to the input type
integer, parameter, public rsgrid_replicated
integer, parameter, public rsgrid_automatic