def add_units(d): c_par = open(rs(d["solver_input"]), "r") for linee in c_par.readlines(): if linee[0:12] == " output_dt": timestep = float(linee[12:-1]) if linee[0:8] == " x_max": length = float(linee[8:-1]) if linee[0:9] == " n_cell": n_cell = float(linee[9:-1]) c_par.close() d["timestep"] = timestep d["cell_length"] = length / n_cell
c["cell_length"] = length / n_cell execute_it(c) m_analyse.plott_all(c) m_global.plot_energy(c) # def execute_them(list_input): script, input = argv d = read_parameter(input) if rs(d["var_param"]) == "no": if rs(d["execute"]) == "yes": execute_it(d) add_units(d) m_analyse.plott_all(d) m_global.plot_energy(d) else: varfile = rs(d["parameter_set_path"]) + rs(d["parameter_set"]) vf = open(varfile, "r") set_var = [] for line in vf.readlines(): set_var = set_var + [line[:-1]]