diff --git a/wecopttool/core.py b/wecopttool/core.py index 016d9467..7d4fc82e 100644 --- a/wecopttool/core.py +++ b/wecopttool/core.py @@ -2124,9 +2124,9 @@ def run_bem( wec_im = fb.copy(name=f"{fb.name}_immersed").keep_immersed_part() wec_im = set_fb_centers(wec_im, rho=rho) if not hasattr(wec_im, 'inertia_matrix'): - wec_im.inertia_matrix = wec_im.compute_rigid_body_inertia(rho=rho, g=g) + wec_im.inertia_matrix = wec_im.compute_rigid_body_inertia(rho=rho) if not hasattr(wec_im, 'hydrostatic_stiffness'): - wec_im.hydrostatic_stiffness = wec_im.compute_hydrostatic_stiffness(rho=rho, g=g) + wec_im.hydrostatic_stiffness = wec_im.compute_hydrostatic_stiffness(rho=rho) bem_data = solver.fill_dataset( test_matrix, wec_im, n_jobs=njobs, **write_info) return change_bem_convention(bem_data) @@ -2363,6 +2363,8 @@ def subset_close( 'selecting closest match.') ind.append(np.argmin(np.abs(a_in_b - el))) subset = len(set_a) == len(ind) + ind = ind if subset else [] + return subset, ind def scale_dofs(scale_list: Iterable[float], ncomponents: int) -> ndarray: