Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to predefined meshes (Capytaine v2) #285

Merged
merged 3 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,9 +1260,10 @@ def test_it_runs(self,):
"""Test that the function at least runs and returns correct
data type.
"""
rect = cpy.RectangularParallelepiped(
rect_mesh = cpy.mesh_parallelepiped(
size=(5.0, 5.0, 2.0), resolution=(10, 10, 10), center=(0.0, 0.0, 0.0,)
)
rect = cpy.FloatingBody(rect_mesh, name="rect")
rect.add_translation_dof(name="Heave")
bem_data = wot.run_bem(fb=rect, freq=[0.1, 0.2], wave_dirs=[0,])
assert type(bem_data) == xr.Dataset
Expand Down
6 changes: 4 additions & 2 deletions tests/test_hydrostatics.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ def mass(lx, ly, lz, rho):
@pytest.fixture()
def fb(lx, ly, lz):
"""Simple constant density rectangular barge."""
rect = cpy.RectangularParallelepiped(
(lx, ly, lz), resolution=(100, 100, 10), center=(0.0, 0.0, 0.0,))
rect_mesh = cpy.mesh_parallelepiped(
size=(lx, ly, lz), resolution=(100, 100, 10), center=(0.0, 0.0, 0.0,)
)
jtgrasb marked this conversation as resolved.
Show resolved Hide resolved
rect = cpy.FloatingBody(rect_mesh, name="rect")
rect.add_all_rigid_body_dofs()
rect.center_of_mass = None
fb.mass = None
Expand Down
Loading