Skip to content
Snippets Groups Projects
Commit 7214048c authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

close plots after test

parent db704a4d
No related branches found
No related tags found
3 merge requests!624Multi mirror,!607Cupy RANS NN Surrogate Inference Changes,!228Close plots
Pipeline #18219 passed
......@@ -16,6 +16,15 @@ k = [2.392578, 2.447266, 2.412109, 2.591797, 2.755859, 2.595703,
ti = .1
@pytest.fixture(autouse=True)
def close_plots():
yield
try:
plt.close()
except Exception:
pass
@pytest.fixture
def site():
return UniformWeibullSite(f, A, k, ti, shear=PowerShear(50, alpha=np.zeros_like(f) + .3))
......
......@@ -16,6 +16,15 @@ from py_wake.tests.check_speed import timeit
import matplotlib.pyplot as plt
@pytest.fixture(autouse=True)
def close_plots():
yield
try:
plt.close()
except Exception:
pass
@pytest.fixture
def site():
return ParqueFicticioSite()
......
......@@ -27,6 +27,15 @@ k = [2.392578, 2.447266, 2.412109, 2.591797, 2.755859, 2.595703,
ti = .1
@pytest.fixture(autouse=True)
def close_plots():
yield
try:
plt.close()
except Exception:
pass
@pytest.fixture
def uniform_site():
ti = 0.1
......
......@@ -272,6 +272,7 @@ class EngineeringWindFarmModel(WindFarmModel):
add_turb_ijk = self.turbulenceModel.calc_added_turbulence(dw_ijlk=dw_ijlk, **args)[:, :, 0]
l_ = [l, 0][lw_j.WS_ilk.shape[1] == 1]
assert lw_j.WS_ilk.shape[1] == dh_ijl.shape[2] == hcw_ijlk.shape[2]
if isinstance(self.superpositionModel, WeightedSum):
cw_ijk = np.hypot(dh_ijl[..., na], hcw_ijlk)[:, :, l_]
hcw_ijk, dh_ijk = hcw_ijlk[:, :, l_], dh_ijl[:, :, l_, na]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment