Load the analysis control 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_analysis_controls(self, json) !> Load the analysis control parameters 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([analysis_controls, calculate_thermal]) call json%get(key, self%basic%analysis_controls%calculate_thermal, found) call json%print_error_message(output_unit) if (.not. found) self%basic%analysis_controls%calculate_thermal = .false. key = join([analysis_controls, calculate_hydraulic]) call json%get(key, self%basic%analysis_controls%calculate_hydraulic, found) call json%print_error_message(output_unit) if (.not. found) self%basic%analysis_controls%calculate_hydraulic = .false. key = join([analysis_controls, calculate_mechanical]) call json%get(key, self%basic%analysis_controls%calculate_mechanical, found) call json%print_error_message(output_unit) if (.not. found) self%basic%analysis_controls%calculate_mechanical = .false. if (.not. self%basic%analysis_controls%calculate_thermal .and. & .not. self%basic%analysis_controls%calculate_hydraulic .and. & .not. self%basic%analysis_controls%calculate_mechanical) then call json%destroy() call error_message(905, c_opt=analysis_controls) end if key = join([analysis_controls, coupling_mode]) call json%get(key, self%basic%analysis_controls%coupling_mode, found) call json%print_error_message(output_unit) if (.not. found) then self%basic%analysis_controls%coupling_mode = "weak" else if (.not. any(coppling_modes(:) == self%basic%analysis_controls%coupling_mode)) then call json%destroy() call error_message(905, c_opt=key) end if end subroutine read_parameters_analysis_controls