From 7564c1db67e0f3acb506b88a6913698c8e21ecbc Mon Sep 17 00:00:00 2001 From: kowalskiw_via_wsl Date: Mon, 29 Nov 2021 18:02:48 +0100 Subject: [PATCH] checking input files before run minor bugs with cold mode fixed --- fdsafir2.py | 502 +++++++++++++++++++++++++++------------------------- 1 file changed, 265 insertions(+), 237 deletions(-) diff --git a/fdsafir2.py b/fdsafir2.py index 188ec92..83e8735 100644 --- a/fdsafir2.py +++ b/fdsafir2.py @@ -5,51 +5,35 @@ from os.path import abspath as ap from os.path import isfile, basename, dirname from shutil import copy2 -from sys import stdout, argv +from sys import argv import argparse as ar -# write stdout to file -class Logger(object): - def __init__(self, filename: str): - self.terminal = stdout - self.log = open('{}_{}'.format(int(sec()), filename), 'w') - - def write(self, message): - self.terminal.write(message) - self.log.write(message) - - def flush(self): - pass - - -def out(file, line): - with open(file, 'a') as f: - f.write(line + '\n') - return line - - -# print progress of process -def progress_bar(title, current, total, bar_length=20): - percent = float(current) * 100 / total - arrow = '-' * int(percent / 100 * bar_length - 1) + '>' - spaces = ' ' * (bar_length - len(arrow)) - - print('%s: [%s%s] %d %%' % (title, arrow, spaces, percent), end='\r') - +# # print progress of process +# def progress_bar(title, current, total, bar_length=20): +# percent = float(current) * 100 / total +# arrow = '-' * int(percent / 100 * bar_length - 1) + '>' +# spaces = ' ' * (bar_length - len(arrow)) +# +# print('%s: [%s%s] %d %%' % (title, arrow, spaces, percent), end='\r') +# +# +# # return user configuration directory +# def user_config(user_file): +# user = {} +# with open(user_file) as file: +# for line in file.readlines(): +# splited = line.split() +# try: +# value = float(splited[-1]) +# except ValueError: +# value = splited[-1] +# user[splited[0]] = value +# return user +# +import matplotlib.dates -# return user configuration directory -def user_config(user_file): - user = {} - with open(user_file) as file: - for line in file.readlines(): - splited = line.split() - try: - value = float(splited[-1]) - except ValueError: - value = splited[-1] - user[splited[0]] = value - return user +'''New, simpler and more object-oriented code''' # find profile - first element relation in SAFIR S3D file (i.e. HEA180.tem-b_0001.tem) @@ -111,6 +95,7 @@ def run_safir(in_file_path, safir_exe_path='C:\SAFIR\safir.exe', print_time=True process = subprocess.Popen(' '.join([safir_exe_path, chid]), shell=False, stdout=subprocess.PIPE) print_all = False + success = True while True: if process.poll() is not None: break @@ -125,6 +110,7 @@ def run_safir(in_file_path, safir_exe_path='C:\SAFIR\safir.exe', print_time=True elif 'ERROR' in output or 'forrtl' in output: print('[ERROR] FatalSafirError: ') print_all = True + success = False print(' ', output) # check for timestep elif 'time' in output and print_time: @@ -134,10 +120,12 @@ def run_safir(in_file_path, safir_exe_path='C:\SAFIR\safir.exe', print_time=True chdir(backpath) if not rc: - print('[OK] SAFIR finished "{}" calculations at'.format(chid)) - - -'''New, simpler and more object-oriented code''' + if success: + print('[OK] SAFIR finished "{}" calculations at'.format(chid)) + return 0 + else: + print('[WARNING] SAFIR finished "{}" calculations with error!'.format(chid)) + return -1 # return the input file path regarding to GiD catalogues or files with no further directory tree @@ -173,7 +161,7 @@ def check(file_path): if len(real_paths) == expected_paths_no: return real_paths else: - raise FileNotFoundError('[ERROR] It is not possible to locate your {} thermal results. ' + raise FileNotFoundError('[ERROR] It is not possible to locate your {} thermal or torsion results. ' 'Check config path {}.'.format(chid, config_path)) @@ -184,7 +172,7 @@ def __init__(self, beam_type, from_mech, path_to_config, fire_model, sim_time, s self.model = fire_model.lower() self.beam_type = int(beam_type) self.t_end = sim_time - if self.model.lower() in {'iso', 'f20', 'cold'}: + if self.model in {'iso', 'standard', 'fiso', 'f20', 'cold'}: self.first = self.chid + '.tem' else: self.first = from_mech[2] @@ -205,7 +193,7 @@ def change_in(self, mech_chid): for no in range(len(init)): line = init[no] # type of calculation - if line == 'MAKE.TEM\n': + if line == 'MAKE.TEM\n' and self.model not in {'cold', 'f20', 'iso', 'fiso', 'standard'}: if self.model in {'cfd', 'fds'}: init[no] = 'MAKE.TEMCD\n' elif self.model in {'lcf', 'locafi'}: @@ -215,35 +203,54 @@ def change_in(self, mech_chid): # insert beam type [init.insert(no + 1, i) for i in ['BEAM_TYPE {}\n'.format(self.beam_type), '{}.in\n'.format(mech_chid)]] - # change thermal load + + # change thermal attack functions elif line.startswith(' F ') and 'FISO' in line: # choose heating boundaries with FISO or FISO0 frontier # change FISO0 to FISO if 'FISO0' in line: line = 'FISO'.join(line.split('FISO0')) + # choose function to be changed with + thermal_attack = 'F20' if self.model in {'cfd', 'fds'}: - if 'F20' not in line: - init[no] = 'FLUX {}'.format('CFD'.join(line[4:].split('FISO'))) - else: - init[no] = 'FLUX {}'.format('NO'.join(('CFD'.join(line[4:].split('FISO'))).split('F20'))) - init.insert(no + 1, 'NO'.join(line.split('FISO'))) - + thermal_attack = 'CFD' elif self.model in {'lcf', 'locafi'}: - if 'F20' not in line: - init[no] = 'FLUX {}'.format('LOCAFI'.join(line[4:].split('FISO'))) - else: - init[no] = 'FLUX {}'.format('NO'.join(('LOCAFI'.join(line[4:].split('FISO'))).split('F20'))) - init.insert(no + 1, 'NO'.join(line.split('FISO'))) - + thermal_attack = 'LOCAFI' elif self.model in {'hsm', 'hasemi'}: - if 'F20' not in line: - init[no] = 'FLUX {}'.format('HASEMI'.join(line[4:].split('FISO'))) - else: - init[no] = 'FLUX {}'.format('NO'.join(('HASEMI'.join(line[4:].split('FISO'))).split('F20'))) - init.insert(no + 1, 'NO'.join(line.split('FISO'))) - elif self.model == 'F20': + thermal_attack = 'HASEMI' + elif self.model in {'iso', 'fiso', 'standard'}: + break + + if thermal_attack == 'F20': init[no] = 'F20'.join(line.split('FISO')) + elif 'F20' not in line: + init[no] = 'FLUX {}'.format(thermal_attack.join(line[4:].split('FISO'))) + else: + init[no] = 'FLUX {}'.format('NO'.join((thermal_attack.join(line[4:].split('FISO'))).split('F20'))) + init.insert(no + 1, 'NO'.join(line.split('FISO'))) + + # if self.model in {'cfd', 'fds'}: + # if 'F20' not in line: + # init[no] = 'FLUX {}'.format('CFD'.join(line[4:].split('FISO'))) + # else: + # init[no] = 'FLUX {}'.format('NO'.join(('CFD'.join(line[4:].split('FISO'))).split('F20'))) + # init.insert(no + 1, 'NO'.join(line.split('FISO'))) + # + # elif self.model in {'lcf', 'locafi'}: + # if 'F20' not in line: + # init[no] = 'FLUX {}'.format('LOCAFI'.join(line[4:].split('FISO'))) + # else: + # init[no] = 'FLUX {}'.format('NO'.join(('LOCAFI'.join(line[4:].split('FISO'))).split('F20'))) + # init.insert(no + 1, 'NO'.join(line.split('FISO'))) + # + # elif self.model in {'hsm', 'hasemi'}: + # if 'F20' not in line: + # init[no] = 'FLUX {}'.format('HASEMI'.join(line[4:].split('FISO'))) + # else: + # init[no] = 'FLUX {}'.format('NO'.join(('HASEMI'.join(line[4:].split('FISO'))).split('F20'))) + # init.insert(no + 1, 'NO'.join(line.split('FISO'))) + # change convective heat transfer coefficient of steel to 35 in locafi mode according to EN1991-1-2 elif self.model in {'lcf', 'locafi', 'hsm', 'hasemi'} and 'STEEL' in line: init[no + 1] = '{}'.format('35'.join(init[no + 1].split('25'))) @@ -260,66 +267,70 @@ def change_in(self, mech_chid): file.writelines(init) # insert torsion results to the first TEM file - def insert_tor(self, tor_lines=False): - # open torsion analysis results if those are not provided as an argument - if not tor_lines: - with open(self.config_paths[1]) as file: - tor = file.readlines() - else: - tor = tor_lines + def insert_tor(self): + tem_with_tor = [] # check if torsion results already are in TEM file try: - file_path = '{}\{}'.format(self.sim_dir, self.first) - - with open(file_path) as file: - tem = file.readlines() - if ' w\n' in tem: - print('[OK] Torsion results are already in the TEM') - return 0 - - # looking for start of torsion results regexp in TEM file - try: - tor_index = tor.index(' w\n') - except ValueError: + tem_file_path = '{}\{}'.format(self.sim_dir, self.first) + with open(tem_file_path) as file: + tem = file.read() + + except FileNotFoundError: + raise FileNotFoundError('[ERROR] There is no proper TEM file ({}) in {}'.format(self.first, self.sim_dir)) + + with open(self.config_paths[1]) as file: + tor = file.read() + + # try: + # looking for torsion results regexp in TEM file + if all(t in tem for t in ['GJ', 'w\n']): + print('[OK] Torsion results are already in the TEM') + tem_with_tor = tem + + else: + # check for torsion results in T0R file + if all(t in tor for t in ['GJ', 'w\n']): + tor_indexes = [tor.index(i) for i in ['w\n', 'COLD']] + else: raise ValueError('[ERROR] Torsion results not found in the {} file'.format(self.config_paths[1])) # find TEM line where torsion results should be passed - annotation = '' - if self.model in {'iso', 'f20'}: - annotation = ' HOT\n' - elif self.model == 'cfd': - annotation = ' CFD\n' - elif self.model in {'lcf', 'locafi'}: - annotation = ' LOCAFI\n' - elif self.model in {'hsm', 'hasemi'}: - annotation = ' HASEMI\n' - - tem_with_tor = [] - try: - tem_index = tem.index(annotation) - tem_with_tor = tem[:tem_index] + tor[tor_index:-1] + tem[tem_index:] - except ValueError: - print('[WARNING] Flux constraint annotation ("HOT", "CFD", "HASEMI" or "LOCAFI") not found in' - '{} file'.format(self.first)) - for line in tem: - if 'TIME' in line: - tem_index = tem.index(line) - 1 - tem_with_tor = tem[:tem_index] + tor[tor_index:-1] + [annotation] + tem[tem_index:] - break - - # pasting torsion results - with open(file_path, 'w') as file: - file.writelines(tem_with_tor) - print('[OK] Torsion results copied to the TEM') - return 0 + # annotation = '' + # if self.model in {'cold', 'f20', 'iso', 'standard', 'fiso'}: + # annotation = ' HOT\n' + # elif self.model == 'cfd': + # annotation = ' CFD\n' + # elif self.model in {'lcf', 'locafi'}: + # annotation = ' LOCAFI\n' + # elif self.model in {'hsm', 'hasemi'}: + # annotation = ' HASEMI\n' + + # insert torsion results to thermal results file + tem_parts = [] + for i in ['HOT', 'CFD', 'HASEMI', 'LOCAFI']: + if i in tem: + tem_parts = tem.split(i) + tem_with_tor = i.join([tem_parts[0] + tor[tor_indexes[0]:tor_indexes[1]], tem_parts[1]]) + break - except FileNotFoundError: - raise FileNotFoundError('[ERROR] There is no proper TEM file ({}) in {}'.format(self.first, self.sim_dir)) + if not tem_parts: + raise ValueError('[ERROR] Flux constraint annotation ("HOT", "CFD", "HASEMI" or "LOCAFI") not' + 'found in {} file'.format(self.first)) - except UnboundLocalError: - print('[WARNING] The {} profile is not found in the Structural 3D .IN file'.format(self.chid)) - return -1 + # change for cold if necessary + if self.model in {'cold', 'f20'}: + tem_with_tor = 'COLD'.join(tem_with_tor.split('HOT')) + + # pasting torsion results + with open(tem_file_path, 'w') as file: + file.writelines(tem_with_tor) + print('[OK] Torsion results copied to the TEM') + return 0 + + # except UnboundLocalError: + # print('[WARNING] The {} profile is not found in the Structural 3D .IN file'.format(self.chid)) + # return -1 def in2sim_dir(self): copy2(self.config_paths[0], self.sim_dir) @@ -337,7 +348,7 @@ def __init__(self, shell_type, from_mech, path_to_config, fire_model, sim_time, self.model = fire_model.lower() self.shell_type = int(shell_type) self.t_end = sim_time - if self.model.lower() in {'iso', 'f20', 'cold'}: + if self.model.lower() in {'iso', 'fiso', 'standard', 'f20', 'cold'}: self.first = self.chid + '.tsh' else: self.first = from_mech[2] @@ -346,8 +357,10 @@ def __init__(self, shell_type, from_mech, path_to_config, fire_model, sim_time, # change input file to natural fire calculations def change_in(self, mech_chid): + in_file_path = '{}\{}.in'.format(self.sim_dir, self.chid) + # open thermal analysis input file - with open('{}\{}.in'.format(self.sim_dir, self.chid)) as file: + with open(in_file_path) as file: init = file.readlines() # save backup of input file @@ -357,6 +370,7 @@ def change_in(self, mech_chid): # make changes for no in range(len(init)): line = init[no] + # type of calculation if line == 'MAKE.TEM\n': if self.model in {'cfd', 'fds'}: @@ -370,27 +384,32 @@ def change_in(self, mech_chid): [init.insert(no + 1, i) for i in ['{}.in\n'.format(mech_chid), 'SHELL_TYPE {}\n'.format(self.shell_type)]] - # change thermal load + # change thermal attack functions elif line.startswith(' F ') and 'FISO' in line: # choose heating boundaries with FISO or FISO0 frontier - # change FISO0 to FISO - if 'FISO0' in line: - line = 'FISO'.join(line.split('FISO0')) + # choose function to be changed with + thermal_attack = 'F20' if self.model in {'cfd', 'fds'}: - if 'F20' not in line: - init[no] = 'FLUX {}'.format('CFD'.join(line[4:].split('FISO'))) - else: - init[no] = 'FLUX {}'.format('NO'.join(('CFD'.join(line[4:].split('FISO'))).split('F20'))) - init.insert(no + 1, 'NO'.join(line.split('FISO'))) - + thermal_attack = 'CFD' + elif self.model in {'lcf', 'locafi'}: + raise ValueError('[ERROR] LOCAFI model is not allowed to be used for SHELL elements.') elif self.model in {'hsm', 'hasemi'}: - if 'F20' not in line: - init[no] = 'FLUX {}'.format('HASEMI'.join(line[4:].split('FISO'))) - else: - init[no] = 'FLUX {}'.format('NO'.join(('HASEMI'.join(line[4:].split('FISO'))).split('F20'))) - init.insert(no + 1, 'NO'.join(line.split('FISO'))) - elif self.model == 'F20': + thermal_attack = 'HASEMI' + elif self.model in {'iso', 'fiso', 'standard'}: + break + + # replace FISO0 with FISO + if 'FISO0' in line: + line = 'FISO'.join(line.split('FISO0')) + + # change thermal attack functions + if thermal_attack == 'F20': init[no] = 'F20'.join(line.split('FISO')) + elif 'F20' not in line: + init[no] = 'FLUX {}'.format(thermal_attack.join(line[4:].split('FISO'))) + else: + init[no] = 'FLUX {}'.format('NO'.join((thermal_attack.join(line[4:].split('FISO'))).split('F20'))) + init.insert(no + 1, 'NO'.join(line.split('FISO'))) # change convective heat transfer coefficient of steel to 35 in locafi mode according to EN1991-1-2 elif self.model in {'hsm', 'hasemi'} and 'STEEL' in line: @@ -404,7 +423,7 @@ def change_in(self, mech_chid): pass # write changed file - with open('{}\{}.in'.format(self.sim_dir, self.chid), 'w') as file: + with open(in_file_path, 'w') as file: file.writelines(init) # insert data that were lost in thermal analysis @@ -453,7 +472,7 @@ def run(self, safir_exe): class Mechanical: def __init__(self, mech_in_path, fire_model='locafi'): self.thermals = [] # Thermal2D objects to be included in caculations - self.model = fire_model + self.model = fire_model.lower() self.input_file = mech_in_path # path to Structural 3D input file self.chid = basename(mech_in_path)[:-3] self.sim_dir = dirname(mech_in_path) @@ -479,18 +498,19 @@ def change_in(self): init = file.readlines() # save backup of input file - with open('{}.bak'.format(self.input_file.rsplit('.')[-2]), 'w') as file: + with open('{}\{}.bak'.format(self.sim_dir, self.chid), 'w') as file: file.writelines(init) - if self.model == 'COLD': - # change to STATIC COLD mode + # change to STATIC COLD mode + if self.model in {'cold', 'f20'}: for line in init.copy(): if 'NCORES' in line: - init[init.index(line) + 1] = 'STATICCOLD' + init[init.index(line) + 1].split[1:] - if ('M_BEAM' in line) or ('M_NODE' in line): + init[init.index(line) + 1] = 'STATICCOLD {}\n'.format(init[init.index(line) + 1].split()[-1]) + if any(m in line for m in ['M_BEAM', 'M_NODE', 'MASS', 'END_MASS']): init.remove(line) + + # change TEM and TSH names in IN file (i.e. 'hea180.tem' -> 'b00001_1.tem') else: - # change TEM and TSH names in IN file (i.e. 'hea180.tem' -> 'b00001_1.tem') for t in self.thermals: init[t.line_no] = '{}\n'.format(t.first) @@ -503,91 +523,96 @@ def run(self, safir_exe): # to be rewritten in the future -class CheckConfig: - def __init__(self, argums): - self.a = argums - - # def t0r_vs_in(self, chid): - # tor = False - # # find profile 'chid' in config files and open T0R file .gid catalogue if possible - # for p in ['{0}\{1}.gid\{1}-1.T0R'.format(self.paths[0], chid), - # '{0}\{1}.T0R'.format(self.paths[0], chid), - # '{0}\{1}-1.T0R'.format(self.paths[0], chid), - # '{0}\{1}.t0r'.format(self.paths[0], chid), - # '{0}\{1}-1.t0r'.format(self.paths[0], chid)]: - # try: - # with open(p) as file: - # tor = file.readlines() - # break - # except FileNotFoundError: - # continue - # - # if not tor: - # return ['[ERROR] Torsion file of "{}" profile was not found'.format(chid)] - # - # # looking for start of torsion results regexp in TEM file - # try: - # tor_index = tor.index(' w\n') - # except ValueError: - # return ['[ERROR] Torsion results were not found in "{}" TOR file'.format(chid)] - # - # # find the number of elements in torsion file - # for l in tor: - # if 'NFIBERBEAM' in l: - # n_tor = int(l.split()[-1]) - # break - # - # # find the number of elements in initial file of thermal analysis - # with open('{}\{}.in'.format(self.paths[1], chid)) as file: - # init = file.readlines() - # for l in init: - # if 'ELEMENTS' in l: - # n_in = int(init[init.index(l) + 1].split()[-1]) - # - # # ERROR if differences found - # if n_in != n_tor: - # return ['{0} profile you use does not match {0} you put in config path ({1})'.format(chid, self.paths[0])] - # - # return 0 - # - # def in_names(self, chid): - # info = [] - # if any(forb in chid for forb in ['.', ' ', ]): - # info.append('Filename consists of forbidden characters ("." or " ")') - # if chid.lower() != chid: - # info.append('Filename need to be lowercase') - # - # return info - # - # def nfiber(self): - # # check if nfiber is correctly set - # # repair if necessary - # return [] - - def check_all(self): - pass - # - # - # info = [] - # - # - # - # for f in scandir(self.m.]): - # name = f.name - # in_splt = name.split('.in') - # chid = in_splt[0] - # - # # check thermal - # if chid != 'frame': - # info.extend(self.t0r_vs_in(chid)) - # info.extend(self.in_names(chid)) - # - # info.extend(self.nfiber()) - # - # if len(info) > 0: - # print('[INFO] While checking your input files I found some mistakes:\n', '\n'.join(info)) - # raise ValueError('[ERROR] {} simulation was improperly set up.' - # 'Some mistakes were pointed above'.format(self.paths[1])) +class Check: + def __init__(self, mechanical: Mechanical): + self.mech = mechanical + + def t0r_vs_in(self, thermal: ThermalTEM): + # check if torsion results are compatible with thermal input file + info = [] + + try: + with open(thermal.config_paths[1]) as file: + tor = file.read() + except FileNotFoundError: + return ['Torsion file of "{}" profile was not found'.format(thermal.chid)] + + # looking for start of torsion results regexp in T0R file + try: + [tor.index(i) for i in ['w\n', 'GJ']] + except ValueError: + info.append(['Torsion results were not found in "{}" TOR file'.format(thermal.chid)]) + + # find the number of elements in torsion file + n_tor = int(tor[:50].split('NFIBERBEAM')[1].split()[0]) + + # find the number of elements in initial file of thermal analysis + try: + with open(thermal.config_paths[0]) as file: + n_in = int(file.read()[:500].split('SOLID')[1].split()[0]) + except FileNotFoundError: + return ['Thermal analysis input file of "{}" profile was not found'.format(thermal.chid)] + + # ERROR if differences found + if n_in != n_tor: + info.append(['Numbers of fibers in torsion ({}) and thermal ({}) analyses do not match.'.format( + n_tor, n_in)]) + + return info + + def name(self, file_name): + info = [] + + if any(forb in file_name for forb in ['.', ' ', ]): + info.append('There is forbidden character in filename "{}"'.format(file_name)) + + if file_name.lower() != file_name: + info.append('Filename "{}" has to be lowercase'.format(file_name)) + + return info + + def nfiber(self): + # check if nfiber is correctly set + with open(self.mech.input_file) as file: + in_mech_file = file.readlines() + nfiber = int(''.join(in_mech_file)[:500].split('NFIBER')[1].split()[0]) + + nsolid_max = nfiber + for t in self.mech.thermals: + with open(t.config_paths[0]) as file: + n_in = int(file.read()[:500].split('SOLID')[1].split()[0]) + if n_in > nsolid_max: + nsolid_max = n_in + + # write with updated nfiber if necessary + if nsolid_max > nfiber: + print('[WARNING] NFIBER is too low - is {} and should be {}. I will fix it.'.format(nfiber, nsolid_max)) + + for line in in_mech_file: + if 'NFIBER' in line: + in_mech_file[in_mech_file.index(line)] = ' NFIBER {}\n'.format(nsolid_max) + break + + with open(self.mech.input_file, 'w') as file: + file.writelines(in_mech_file) + + return [] + + def full_mech(self): + info = [] + + # check mechanical + [info.extend(check) for check in [self.name(self.mech.chid), self.nfiber()]] + + # check thermals + for t in self.mech.thermals: + [info.extend(check) for check in [self.name(t.chid), self.t0r_vs_in(t)]] + + if len(info) > 0: + print('[INFO] While checking your input files I found some mistakes:\n', '\n'.join(info)) + raise ValueError('[ERROR] {} simulation was improperly set up.'.format(self.mech.chid)) + else: + print('[OK] Config files seems to be OK') # # to be rewritten @@ -633,14 +658,23 @@ def run_user_mode(sim_no, arguments): m = Mechanical(arguments.results[sim_no], fire_model=arguments.model) m.make_thermals(arguments.config) + # check the set up + Check(m).full_mech() + + # run thermal analyses for t in m.thermals: + st = sec() t.change_in(m.chid) t.run(arguments.safir) + print('Runtime of "{}" thermal analysis: {}\n'.format(t.chid, dt(seconds=int(sec() - st)))) + # run mechanical analysis + st = sec() m.change_in() m.run(arguments.safir) + print('Runtime of "{}" mechanical analysis: {}\n'.format(m.chid, dt(seconds=int(sec() - st)))) - print('\nRuntime: {}\n'.format(dt(seconds=int(sec() - start)))) + print('Summary "{}" runtime: {}\n'.format(m.chid, dt(seconds=int(sec() - start)))) def get_arguments(from_argv): @@ -671,11 +705,6 @@ def get_arguments(from_argv): if __name__ == '__main__': first = argv[1] - # if first == ('-d' or '--dev'): - # print('=== ATTENTION! ===\nYou have entered developer mode. It is not design for regular user - be careful,' - # 'things don\'t work here well ;-)\n==================\n') - # paths = [input('safir_path = '), input('config_path = '), input('results_path = ')] - # scripted(*paths) print('\n====== Welcome to fdsafir2 ======\n fdsafir.py is one of the components of McSteel package.\n\n' 'I am trying to run your case now. I will keep you updated on the progress. \n==================\n') @@ -683,7 +712,6 @@ def get_arguments(from_argv): args = get_arguments(argv[1:]) for n in range(len(args.results)): - CheckConfig(args).check_all() run_user_mode(n, args) print('\n==================\nThank you for using our tools. We will appreciate your feedback and bug reports'