From dbb166f80b205179258a025ea2e53e24d8b30002 Mon Sep 17 00:00:00 2001 From: Yash Bhangale Date: Wed, 11 Sep 2024 19:35:00 -0700 Subject: [PATCH] ENH: Removed spatial_grid from pde setup, spatial_grid taken from sim_params from now on --- src/gen_experiments/pdes.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gen_experiments/pdes.py b/src/gen_experiments/pdes.py index a2b1bcd..c5a1143 100644 --- a/src/gen_experiments/pdes.py +++ b/src/gen_experiments/pdes.py @@ -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}, @@ -125,7 +121,6 @@ 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}, @@ -133,7 +128,6 @@ def kdv(t, u, dx, nx): "coeff_true": [ {"u_11": -1, "u_1111": -1, "uu_1": -1}, ], - "spatial_grid": np.linspace(0, 100, 1024), }, } @@ -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 = [