Skip to content

Commit

Permalink
Add slider to choose IC seed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceyron committed May 22, 2024
1 parent af2d422 commit 6cd6b37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion understanding_normalized_and_difficulty_nd.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
num_points = st.slider("Number of points", 16, 256, 48)
num_steps = st.slider("Number of steps", 1, 300, 50)
num_modes_init = st.slider("Number of modes in the initial condition", 1, 40, 5)
ic_seed = st.slider("Initial condition seed", 0, 100, 0)
num_substeps = st.slider("Number of substeps", 1, 100, 1)

v_range = st.slider("Value range", 0.1, 10.0, 1.0)
Expand Down Expand Up @@ -283,7 +284,7 @@
ic_gen = ex.ic.RandomTruncatedFourierSeries(
num_spatial_dims, cutoff=num_modes_init, max_one=True
)
u_0 = ic_gen(num_points, key=jax.random.PRNGKey(0))
u_0 = ic_gen(num_points, key=jax.random.PRNGKey(ic_seed))

trj = ex.rollout(stepper, num_steps, include_init=True)(u_0)

Expand Down

0 comments on commit 6cd6b37

Please sign in to comment.