Skip to content

Commit

Permalink
ENH: Removed spatial_grid from pde setup, spatial_grid taken from sim…
Browse files Browse the repository at this point in the history
…_params from now on
  • Loading branch information
yb6599 committed Sep 12, 2024
1 parent 02e9cf0 commit dbb166f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/gen_experiments/pdes.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,26 +97,22 @@ def kdv(t, u, dx, nx):
"input_features": ["u"],
"time_args": [0.1, 10],
"coeff_true": [{"u_11": 1}],
"spatial_grid": np.arange(0, 10, 0.1),
},
"diffuse1D_periodic": {
"rhsfunc": {"func": diffuse1D_periodic, "dimension": 1},
"input_features": ["u"],
"coeff_true": [{"u_11": 1}],
"spatial_grid": np.linspace(-8, 8, 256),
},
"burgers1D_dirichlet": {
"rhsfunc": {"func": burgers1D_dirichlet, "dimension": 1},
"input_features": ["u"],
"time_args": [0.1, 10],
"coeff_true": [{"u_11": 1, "uu_1": 1}],
"spatial_grid": np.arange(0, 10, 0.1),
},
"burgers1D_periodic": {
"rhsfunc": {"func": burgers1D_periodic, "dimension": 1},
"input_features": ["u"],
"coeff_true": [{"u_11": 0.1, "uu_1": -1}],
"spatial_grid": np.linspace(-8, 8, 256),
},
"ks_dirichlet": {
"rhsfunc": {"func": ks_dirichlet, "dimension": 1},
Expand All @@ -125,15 +121,13 @@ def kdv(t, u, dx, nx):
"coeff_true": [
{"u_11": -1, "u_1111": -1, "uu_1": -1},
],
"spatial_grid": np.arange(0, 10, 0.1),
},
"ks_periodic": {
"rhsfunc": {"func": ks_periodic, "dimension": 1},
"input_features": ["u"],
"coeff_true": [
{"u_11": -1, "u_1111": -1, "uu_1": -1},
],
"spatial_grid": np.linspace(0, 100, 1024),
},
}

Expand All @@ -148,7 +142,7 @@ def data_prep(
logger.info(f"Beginning Data Generation for {group}")
rhsfunc = pde_setup[group]["rhsfunc"]["func"]
dimension = pde_setup[group]["rhsfunc"]["dimension"]
spatial_grid = pde_setup[group]["spatial_grid"]
spatial_grid = sim_params["spatial_grid"]
initial_condition = sim_params["init_cond"]
dt = sim_params["dt"]
spatial_args = [
Expand Down

0 comments on commit dbb166f

Please sign in to comment.