Commit 82e1e23a authored by Leon Pyka's avatar Leon Pyka
Browse files

debugging restart script

parent 36871861
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -34,20 +34,20 @@ def rerun_simulation(restart_data_zipped):
if __name__ == "__main__":
    list_of_seeds =  []
    offset = 5
    crack_length = 10
    crack_length = 20
    restart_data_zipped = []

    for seed in range(1010, 1050):
    for seed in range(1000, 1001):

        targetdirectory = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_length}/"
        filepath = targetdirectory + f"FDB_PARSOL_SIRC-FCVC_SOG-IVCG_HFBA_CPC-NIC_-_{seed}.h5"
        targetdirectory = f"/FASTTEMP/p7/lpyka/hierarchical_interface/6_precrack_density_offset/a_{crack_length}/"
        filepath = targetdirectory + f"RTS_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, targetdirectory])

    with Pool(50) as p:
    rerun_simulation(restart_data_zipped[0])
    with Pool(1) as p:
        results = p.map(rerun_simulation, restart_data_zipped)
    destination = f"/FASTTEMP/p7/lpyka/hierarchical_interface/5_precracked/a_{crack_length}"
    destination = f"/FASTTEMP/p7/lpyka/hierarchical_interface/6_precrack_density_offset/a_{crack_length}"
    #for data in results:
    #    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())