現在のメッシュ入力設定が指定された表面モデルを使うかを返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(app_config), | intent(in) | :: | cfg | |||
| character(len=*), | intent(in) | :: | surface_model |
logical function config_uses_surface_model(cfg, surface_model) result(uses_surface_model) type(app_config), intent(in) :: cfg character(len=*), intent(in) :: surface_model character(len=16) :: mode logical :: has_obj integer :: i uses_surface_model = .false. mode = trim(cfg%mesh_mode) select case (mode) case ('obj') uses_surface_model = trim(cfg%mesh_surface_model) == surface_model return case ('auto') inquire (file=trim(cfg%obj_path), exist=has_obj) if (has_obj) then uses_surface_model = trim(cfg%mesh_surface_model) == surface_model return end if end select do i = 1, cfg%n_templates if (.not. cfg%templates(i)%enabled) cycle if (trim(cfg%templates(i)%surface_model) == surface_model) then uses_surface_model = .true. return end if end do end function config_uses_surface_model