print("Argument List:", str(sys.argv)) os.chdir(str(sys.argv[1])) model = str(sys.argv[2]) K = int(sys.argv[3]) print("---------------------------------------------") N_list = [33, 47, 87] target_dir = '/nu_compare' setup.checkdir(target_dir) search_dir = './'+model+'_info/nu' anchor = setup.find_anchor() fs = [] for N in N_list: if int(sys.argv[3]) == 1: root, filenames = setup.gtfpath(search_dir, '^.*_(.*)rom_'+str(N)+'nb_ic.*_'+str(int(anchor-90))+'_nu$') elif int(sys.argv[3]) > 1: root, filenames = setup.gtfpath(search_dir, '^.*_(.*)rom_'+str(N)+'nb_zero.*_'+str(int(anchor-90))+'_*nu$') fs.append(filenames.pop()) files_dict = setup.create_dict(fs, '^.*_([0-9]*)nb_.*$') dict_final = sorted(files_dict.items(), key=operator.itemgetter(0)) color_ctr = 0 i = 0 tpath = './nu/' fig, ax = plt.subplots(1, tight_layout=True) # get the FOM data filename = '../../../../fom_nuss/nuss_fom_'+str(int(anchor))
print("---------------------------------------------") print("This is the name of the program:", sys.argv[0]) print("Argument List:", str(sys.argv)) os.chdir(str(sys.argv[1])) model = str(sys.argv[2]) N = str(sys.argv[3]) T0 = int(sys.argv[4]) print("---------------------------------------------") angles = np.linspace(0, 180, 19, dtype=int) for angle in angles: target_dir = '/dual_norm/' setup.checkdir(target_dir) search_dir = './' + model + '_info/dual_norm' root, filenames = setup.gtfpath(search_dir, '^.*_' + N + 'nb_.*$') if T0 == 1: files_dict = setup.create_dict( filenames, '^.*_ic_h10_' + str(int(angle - 90)) + '_(-?[+-]?([0-9]*[.])?[0-9]+)_dual_norm$') elif T0 >= 1: files_dict = setup.create_dict( filenames, '^.*_zero_h10_' + str(int(angle - 90)) + '_(-?[+-]?([0-9]*[.])?[0-9]+)_dual_norm$') dict_final = sorted(files_dict.items(), key=operator.itemgetter(0)) color_ctr = 0 tpath = root + '/' erri = [] fws = []
print("---------------------------------------------") print("This is the name of the program:", sys.argv[0]) print("Argument List:", str(sys.argv)) os.chdir(str(sys.argv[1])) model = str(sys.argv[2]) N = str(sys.argv[3]) T0 = int(sys.argv[4]) mode = str(sys.argv[5]) print("---------------------------------------------") target_dir = '/vel_dual_norm/' setup.checkdir(target_dir) search_dir = './' + model + '_info/vel_dual_norm' if model == 'all': root, filenames = setup.gtfpath(search_dir, '^.*_' + N + 'nb_.*$') else: root, filenames = setup.gtfpath( search_dir, '^.*_' + N + 'nb_ic_h10_(?!.*-90|.*-80|.*-70).*$') if model == 'l-rom' or model == 'l-rom_df': fd = str(sys.argv[5]) if T0 == 1: files_dict = setup.create_dict(filenames, '^.*_ic_h10_(-?\d+)_' + fd + '.*$') elif T0 >= 1: files_dict = setup.create_dict(filenames, '^.*_zero_h10_(-?\d+)_' + fd + '.*$') else: if T0 == 1: files_dict = setup.create_dict(filenames, '^.*_ic_h10_(-?\d+)_.*$') elif T0 >= 1:
colors = setup.color(0) setup.text() print("---------------------------------------------") print("This is the name of the program:", sys.argv[0]) print("Argument List:", str(sys.argv)) os.chdir(str(sys.argv[1])) model = str(sys.argv[2]) deg = str(int(sys.argv[3]) - 90) print("---------------------------------------------") target_dir = '/dual_norm/' setup.checkdir(target_dir) search_dir = './' + model + '_info/dual_norm' root, filenames = setup.gtfpath(search_dir, '^.*_h10_' + deg + '_.*$') files_dict = setup.create_dict(filenames, '^.*_([0-9]*)nb_.*$') dict_final = sorted(files_dict.items(), key=operator.itemgetter(0)) color_ctr = 0 tpath = root + '/' print(filenames) roms = [] for nb, fnames in dict_final: for fname in fnames: rom = ROM(fname) rom.DTAR() rom.anchor('theta') roms.append(rom)
target_dir = '/nu_'+str(N) setup.checkdir(target_dir) search_dir = './'+model+'_info/nu' with open('../'+model+'/anchor.yaml') as f: features = yaml.load(f, Loader=yaml.FullLoader) akey = list(features.keys()) aval = list(features.values()) with open('../'+model+'/train.yaml') as f: features = yaml.load(f, Loader=yaml.FullLoader) tkey = list(features.keys()) tval = list(features.values()) if (len(sys.argv)) < 7: if int(sys.argv[4]) == 1: root, filenames = setup.gtfpath(search_dir, '^.*_(.*)rom_'+N+'nb_ic.*_'+str(int(deg))+'_nu$') elif int(sys.argv[4]) > 1: root, filenames = setup.gtfpath(search_dir, '^.*_(.*)rom_'+N+'nb_zero.*_'+str(int(deg))+'_*nu$') else: if int(sys.argv[4]) == 1: root, filenames = setup.gtfpath(search_dir, '^.*_(.*)rom_'+N+'nb_ic.*_'+str(int(deg))+'_.*_nu$') elif int(sys.argv[4]) > 1: root, filenames = setup.gtfpath(search_dir, '^.*_(.*)rom_'+N+'nb_zero.*_'+str(int(deg))+'_.*_nu$') files_dict = setup.create_dict(filenames, '^.*_([0-9]*)nb_.*$') dict_final = sorted(files_dict.items(), key=operator.itemgetter(0)) print(dict_final) color_ctr = 0 i = 0
setup.style(1) colors = setup.color(0) setup.text() print("---------------------------------------------") print("This is the name of the program:", sys.argv[0]) print("Argument List:", str(sys.argv)) os.chdir(str(sys.argv[1])) N = str(sys.argv[2]) print("---------------------------------------------") target_dir = '/dual_norm' setup.checkdir(target_dir) root, filenames = setup.gtfpath(target_dir, '^.*_(.*)rom_.*$') files_dict = setup.create_dict(filenames, '^.*_([0-9]*)nb_.*$') dict_final = sorted(files_dict.items(), key=operator.itemgetter(0)) anchor = setup.find_anchor() color_ctr = 0 tpath = root + '/' for nb, fnames in dict_final: erri = [] angle = [] data = [] plot_params = { 'c':
print("This is the name of the program:", sys.argv[0]) print("Argument List:", str(sys.argv)) os.chdir(str(sys.argv[1])) model = str(sys.argv[2]) deg = str(int(sys.argv[3]) - 90) N = str((sys.argv[4])) print("---------------------------------------------") field = 't' target_dir = '/rom' + field + '_' + N setup.checkdir(target_dir) ops_path = '../ops/' search_dir = './' + model + '_info/rom' + field anchor = setup.find_anchor() root, filenames = setup.gtfpath(search_dir, '^.*_(.*)rom_.*_' + str(int(anchor - 90))) color_ctr = 0 tpath = root + '/' for element in filenames: z = re.match(r"^.*_(\d+)nb_.*", element) if z.groups()[0] == N: fname = element # Create ROM class with field specified rom = ROM(fname, field) rom.get_coef() K = rom.info['K'] nb = rom.info['nb'] if rom.info['init'] == 'zero': T0 = mypostpro.find_nearest(rom.outputs['t'][0, :], 501)
colors = setup.color(0) setup.text() print("This is the name of the program:", sys.argv[0]) print("Argument List:", str(sys.argv)) os.chdir(str(sys.argv[1])) model = str(sys.argv[2]) deg = str(int(sys.argv[3])) theta_g = str(int(sys.argv[3]) - 90) target_dir = '/nu' setup.checkdir(target_dir) search_dir = './' + model + '_info/nu' if int(sys.argv[4]) == 1: root, filenames = setup.gtfpath( search_dir, '^.*_(.*)rom_.*_ic.*_.*_' + theta_g + '.*nu$') elif int(sys.argv[4]) > 1: root, filenames = setup.gtfpath( search_dir, '^.*_(.*)rom_.*_zero.*_.*_' + theta_g + '.*nu$') files_dict = setup.create_dict(filenames, '^.*_([0-9]*)nb_.*$') dict_final = sorted(files_dict.items(), key=operator.itemgetter(0)) anchor = setup.find_anchor() color_ctr = 0 tpath = root + '/' merr_list = [] verr_list = [] sderr_list = []