Loading 6b_restart_precrack_density/restart.py +6 −9 Original line number Diff line number Diff line Loading @@ -32,26 +32,23 @@ def rerun_simulation(restart_data_zipped): if __name__ == "__main__": list_of_seeds = [] offset = 5 crack_lenght = 10 crack_length = 10 restart_data_zipped = [] for seed in range(1010, 1050): origin_path = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_lenght}/FDB_PARSOL_SIRC-FCVC_SOG-IVCG_HFBA_CPC-NIC_-_{seed}.h5" filepath = f"/FASTTEMP/p7/lpyka/rerun/FDB_PARSOL_SIRC-FCVC_SOG-IVCG_HFBA_CPC-NIC_-_{seed}.h5" shutil.move(origin_path, filepath) filepath = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_length}/FDB_PARSOL_SIRC-FCVC_SOG-IVCG_HFBA_CPC-NIC_-_{seed}.h5" grouppath_bundle = mn.datman.bundle_all_sub_groups(filepath, ["simulationdata"], flaglist=[["partial", True]]) path_to_simdata_group = grouppath_bundle[0] restart_data_zipped.append([seed, filepath, path_to_simdata_group]) with Pool(50) as p: results = p.map(rerun_simulation, restart_data_zipped) destination = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_length}" #for data in results: # mn.datman.save_simulation_output(data[0], data[1], data[2], data[3], targetdirectory="./", suffix="", overwritemode=False) # mn.datman.save_simulation_output(data[0], data[1], data[2], data[3], targetdirectory=destination, suffix="", overwritemode=False) #print(data[1]["current_data"]["stiffnessmatrix"].toarray()) destination = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_lenght}" push_data_to(destination) copy_runfile_to(runfile_name=__file__, destination=destination) print(f"done with crack_lenght {crack_length}") print(f"done with crack_length {crack_length}") print("\nRun successfull.") Loading
6b_restart_precrack_density/restart.py +6 −9 Original line number Diff line number Diff line Loading @@ -32,26 +32,23 @@ def rerun_simulation(restart_data_zipped): if __name__ == "__main__": list_of_seeds = [] offset = 5 crack_lenght = 10 crack_length = 10 restart_data_zipped = [] for seed in range(1010, 1050): origin_path = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_lenght}/FDB_PARSOL_SIRC-FCVC_SOG-IVCG_HFBA_CPC-NIC_-_{seed}.h5" filepath = f"/FASTTEMP/p7/lpyka/rerun/FDB_PARSOL_SIRC-FCVC_SOG-IVCG_HFBA_CPC-NIC_-_{seed}.h5" shutil.move(origin_path, filepath) filepath = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_length}/FDB_PARSOL_SIRC-FCVC_SOG-IVCG_HFBA_CPC-NIC_-_{seed}.h5" grouppath_bundle = mn.datman.bundle_all_sub_groups(filepath, ["simulationdata"], flaglist=[["partial", True]]) path_to_simdata_group = grouppath_bundle[0] restart_data_zipped.append([seed, filepath, path_to_simdata_group]) with Pool(50) as p: results = p.map(rerun_simulation, restart_data_zipped) destination = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_length}" #for data in results: # mn.datman.save_simulation_output(data[0], data[1], data[2], data[3], targetdirectory="./", suffix="", overwritemode=False) # mn.datman.save_simulation_output(data[0], data[1], data[2], data[3], targetdirectory=destination, suffix="", overwritemode=False) #print(data[1]["current_data"]["stiffnessmatrix"].toarray()) destination = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_lenght}" push_data_to(destination) copy_runfile_to(runfile_name=__file__, destination=destination) print(f"done with crack_lenght {crack_length}") print(f"done with crack_length {crack_length}") print("\nRun successfull.")