Skip to content

Commit

Permalink
Merge branch 'main' into add_4th_order_protection
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jan 8, 2025
2 parents f248336 + 1289879 commit 6c9e9be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyro/compressible/problems/convection.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def init_data(my_data, rp):
ymom[:, :] = 0.0
dens[:, :] = dens_cutoff

# create a seeded random number generator
rng = np.random.default_rng(12345)

# set the density to be stratified in the y-direction
myg = my_data.grid

Expand Down Expand Up @@ -75,7 +78,7 @@ def init_data(my_data, rp):
ener[:, :] = p[:, :]/(gamma - 1.0)

# pairs of random numbers between [-1, 1]
vel_pert = 2.0 * np.random.random_sample((myg.qx, myg.qy, 2)) - 1
vel_pert = 2.0 * rng.random(size=(myg.qx, myg.qy, 2)) - 1

cs = np.sqrt(gamma * p / dens)

Expand Down

0 comments on commit 6c9e9be

Please sign in to comment.