Skip to content

Commit

Permalink
Remove an extra dimension in grid tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rafmudaf committed Dec 1, 2023
1 parent e246fab commit c1d5ccb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,7 @@ def flow_field_fixture(sample_inputs_fixture):

@pytest.fixture
def turbine_grid_fixture(sample_inputs_fixture) -> TurbineGrid:
turbine_coordinates = np.array([np.array([c]) for c in list(zip(X_COORDS, Y_COORDS, Z_COORDS))])

# TODO: The TurbineGrid requires that the rotor diameters be 1d but the
# Farm constructs them as 3d
# Can we make this consistent?

turbine_coordinates = np.array([np.array(c) for c in list(zip(X_COORDS, Y_COORDS, Z_COORDS))])
rotor_diameters = ROTOR_DIAMETER * np.ones( (N_TURBINES) )
return TurbineGrid(
turbine_coordinates=turbine_coordinates,
Expand Down
2 changes: 1 addition & 1 deletion tests/turbine_grid_unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_dynamic_properties(turbine_grid_fixture):

turbine_grid_fixture.turbine_coordinates = np.append(
turbine_grid_fixture.turbine_coordinates,
np.array([[[100.0, 200.0, 300.0]]]),
np.array([[100.0, 200.0, 300.0]]),
axis=0
)
assert turbine_grid_fixture.n_turbines == N_TURBINES + 1
Expand Down

0 comments on commit c1d5ccb

Please sign in to comment.