Load the basic input parameters from the JSON file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(type_input) | :: | self | ||||
type(json_file), | intent(inout) | :: | json |
JSON parser |
subroutine read_parameters_simulation_settings(self, json) !> Load the basic input parameters from the JSON file implicit none class(type_input) :: self type(json_file), intent(inout) :: json !! JSON parser character(:), allocatable :: key logical :: found key = join([simulation_settins, title]) call json%get(key, self%basic%simulation_settings%title, found) call json%print_error_message(output_unit) if (.not. found) self%basic%simulation_settings%title = "FTDSS Simulation" key = join([simulation_settins, calculate_type]) call json%get(key, self%basic%simulation_settings%calculate_type, found) call json%print_error_message(output_unit) if (.not. found) then call json%destroy() call error_message(904, c_opt=key) else if (.not. value_in_range(self%basic%simulation_settings%calculate_type, & min_calculation_type, max_calculation_type)) then call json%destroy() call error_message(905, c_opt=key) end if select case (self%basic%simulation_settings%calculate_type) case (1:2) self%basic%simulation_settings%calculate_dimension = 2 case (3) self%basic%simulation_settings%calculate_dimension = 3 end select end subroutine read_parameters_simulation_settings