Load the geometry settings from the JSON file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(type_input) | :: | self | ||||
type(json_file), | intent(inout) | :: | json |
JSON parser |
subroutine read_parameters_geometry_settings(self, json) !> Load the geometry settings from the JSON file implicit none class(type_input) :: self type(json_file), intent(inout) :: json !! JSON parser logical :: found character(:), allocatable :: key key = join([geometry_settings, file_name]) call json%get(key, self%basic%geometry_settings%file_name, found) call json%print_error_message(output_unit) if (.not. found) then call json%destroy() call error_message(904, c_opt=key) end if self%geometry_file_name = self%project_path//"Input/"//trim(adjustl(self%basic%geometry_settings%file_name)) inquire (file=self%geometry_file_name, exist=found) if (.not. found) then call json%destroy() call error_message(902, c_opt=self%geometry_file_name) end if key = join([geometry_settings, cell_id_array_name]) call json%get(key, self%basic%geometry_settings%cell_id_array_name, found) call json%print_error_message(output_unit) if (.not. found) then call json%destroy() call error_message(904, c_opt=key) end if key = join([geometry_settings, integration, integration_type]) call json%get(key, self%basic%geometry_settings%integration_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. any(integration_types(:) == self%basic%geometry_settings%integration_type)) then call json%destroy() call error_message(905, c_opt=key) end if if (self%basic%geometry_settings%integration_type == "free") then key = join([geometry_settings, integration, integration_points]) call json%get(key, self%basic%geometry_settings%integration_points, found) call json%print_error_message(output_unit) if (.not. found) then call json%destroy() call error_message(904, c_opt=key) else if (self%basic%geometry_settings%integration_points < 0.0d0 .or. & self%basic%geometry_settings%integration_points > 1.0d0) then call json%destroy() call error_message(905, c_opt=key) end if end if end subroutine read_parameters_geometry_settings