(K,C,M,b, P_subset, Hertz_subset, keep_dof)
| 31 | from scikits import umfpack |
| 32 | from dask.distributed import Client, LocalCluster |
| 33 | def solve_subset(K,C,M,b, P_subset, Hertz_subset, keep_dof): |
| 34 | results_subset = np.zeros((len(keep_dof),len(P_subset)), dtype=np.complex128) |
| 35 | for i,(w,P) in enumerate(zip(Hertz_subset,P_subset)): |
| 36 | omega = 2*np.pi*w |
| 37 | KCM = K + 1j*omega*C - omega**2 * M |
| 38 | LU = umfpack.splu(KCM) |
| 39 | x = np.squeeze( LU.solve(b*P)[keep_dof] ) |
| 40 | results_subset[:,i] = x |
| 41 | return results_subset |
| 42 | def submit_solve_jobs(client, KCMb, P, Hertz, keep_dof, n_jobs): |
| 43 | K, C, M, b = KCMb |
| 44 | results = [] |
nothing calls this directly
no outgoing calls
no test coverage detected