Skip to content

Commit 6261ccd

Browse files
committed
Deflake8
1 parent 13e6f99 commit 6261ccd

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

y3prediction/prediction.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,8 @@ def limit_fluid_state_lv(dcoll, cv, temperature_seed, entropy_min,
827827
mmax_i = op.elementwise_max(
828828
dcoll, dd, cv_update_rho.species_mass_fractions[i])
829829
mmax = 1.0
830-
cell_avgs = actx.np.where(actx.np.less(cell_avgs, mmax), cell_avgs, mmax)
830+
cell_avgs = actx.np.where(actx.np.less(cell_avgs, mmax),
831+
cell_avgs, mmax)
831832
_theta = actx.np.maximum(
832833
_theta,
833834
actx.np.where(actx.np.greater(mmax_i - toler, mmax),
@@ -839,17 +840,18 @@ def limit_fluid_state_lv(dcoll, cv, temperature_seed, entropy_min,
839840
1.0, balance_spec)
840841
#print(f"species {i}, {_theta=}")
841842
# apply the limiting to all species equally
842-
spec_lim[i] = (cv_update_rho.species_mass_fractions[i] +
843-
theta_spec[i]*(
844-
cell_avgs - cv_update_rho.species_mass_fractions[i]))
843+
spec_lim[i] = \
844+
(cv_update_rho.species_mass_fractions[i]
845+
+ theta_spec[i]*(cell_avgs
846+
- cv_update_rho.species_mass_fractions[i]))
845847

846848
if hammer_species:
847849
# limit the species mass fraction sum to 1.0
848850
aux = actx.np.zeros_like(cv_update_rho.mass)
849851
sum_theta_y = actx.np.zeros_like(cv_update_rho.mass)
850852
zeros_spec = actx.np.zeros_like(cv_update_rho.mass)
851853
for i in range(nspecies):
852-
spec_lim[i] = actx.np.where(actx.np.less(spec_lim[i], zeros_spec),
854+
spec_lim[i] = actx.np.where(actx.np.less(spec_lim[i], zeros_spec),
853855
zeros_spec, spec_lim[i])
854856

855857
# spec_lim = actx.np.where(spec_lim > 0., spec_lim, zero_spec)
@@ -6575,7 +6577,7 @@ def spec_check(cv):
65756577
local_max = actx.np.max(ysum)
65766578
local_min = actx.np.min(ysum)
65776579
global_min = vol_min(dd_vol_fluid, ysum)
6578-
gloabl_max = vol_max(dd_vol_fluid, ysum)
6580+
global_max = vol_max(dd_vol_fluid, ysum)
65796581
global_min_loc = vol_min_loc(dd_vol_fluid, ysum)
65806582
global_max_loc = vol_max_loc(dd_vol_fluid, ysum)
65816583
if rank == 0:
@@ -6589,7 +6591,6 @@ def spec_check(cv):
65896591

65906592
return health_error
65916593

6592-
65936594
def my_health_check(fluid_state, wall_temperature):
65946595
health_error = False
65956596
cv = fluid_state.cv

0 commit comments

Comments
 (0)