Skip to content

Commit b3ef4ac

Browse files
committed
Fix failing tests of advection diffusion benchmark caused by swith to robin boundary conditions
1 parent 7de7ab8 commit b3ef4ac

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Diff for: pyapprox/benchmarks/tests/test_pde_benchmarks.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def test_setup_multi_index_advection_diffusion_benchmark(self):
118118
sigma = 1
119119
nvars = 5
120120

121-
config_values = [2*np.arange(1, 11), 2*np.arange(1, 11)]
121+
# config_values = [2*np.arange(1, 11), 2*np.arange(1, 11)]
122+
config_values = [2*np.arange(1, 16), 2*np.arange(1, 16)]
122123
benchmark = setup_benchmark(
123124
"multi_index_advection_diffusion", kle_nvars=nvars,
124125
kle_length_scale=length_scale, kle_stdev=sigma,
@@ -160,6 +161,7 @@ def test_setup_multi_index_advection_diffusion_benchmark(self):
160161
print(rel_diffs)
161162
assert (rel_diffs.max() > 1e-1 and rel_diffs.min() < 3e-5)
162163
# ndof = (config_samples+1).prod(axis=0)
164+
# import matplotlib.pyplot as plt
163165
# plt.loglog(
164166
# ndof[:-1], np.abs((qoi_means[-1]-qoi_means[:-1])/qoi_means[-1]))
165167
# plt.show()
@@ -178,7 +180,7 @@ def test_setup_transient_multi_index_advection_diffusion_benchmark(self):
178180
# "init_sol_fun": partial(full_fun_axis_1, 0),
179181
"sink": [50, 0.1, [0.75, 0.75]]
180182
}
181-
nlevels = 8
183+
nlevels = 9
182184
config_values = [2*np.arange(4, 4+nlevels), 2*np.arange(4, 4+nlevels),
183185
final_time/(2**np.arange(1, 1+nlevels)*2)]
184186
# np.array([final_time/(2**5*2)]*nlevels)]
@@ -252,11 +254,12 @@ def test_setup_transient_multi_index_advection_diffusion_benchmark(self):
252254
ntsteps = time_scenario["final_time"]/config_samples[2]
253255
print(ntsteps)
254256
print(time_scenario["final_time"]-config_samples[2]*ntsteps)
255-
ndof = (config_samples[:2]+1).prod(axis=0)*ntsteps
257+
# ndof = (config_samples[:2]+1).prod(axis=0)*ntsteps
258+
# import matplotlib.pyplot as plt
256259
# plt.loglog(
257260
# ndof[:-1], np.abs((qoi_means[-1]-qoi_means[:-1])/qoi_means[-1]))
258261
# plt.show()
259-
assert (rel_diffs.max() > 4e-2 and rel_diffs.min() < 8e-5)
262+
assert (rel_diffs.max() > 4e-2 and rel_diffs.min() < 9.1e-5)
260263

261264

262265
if __name__ == "__main__":

0 commit comments

Comments
 (0)