def test_wave_direction_radians_warning(caplog): sphere = Sphere(radius=1.0, ntheta=20, nphi=40) sphere.keep_immersed_part() sphere.add_all_rigid_body_dofs() with caplog.at_level(logging.WARNING): DiffractionProblem(body=sphere, omega=1.0, wave_direction=180) assert 'in radians and not in degrees' in caplog.text
def sphere_fb(): sphere = Sphere(radius=r, ntheta=3, nphi=12, clip_free_surface=True) sphere.add_all_rigid_body_dofs() sphere.inertia_matrix = sphere.add_dofs_labels_to_matrix(M) sphere.hydrostatic_stiffness = sphere.add_dofs_labels_to_matrix(kHS) return sphere