Skip to content

Commit

Permalink
update steps for 1D data generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kmario23 authored Oct 2, 2024
1 parent b470a48 commit 219e544
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions pdebench/data_gen/data_gen_NLE/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,62 @@ dim: 2
python data_gen/data_gen_NLE/Data_Merge.py
```

----------------------------

#### Data generation for 1D Advection Equation:

```
# generate data and save as .npy array
cd PDEBench/pdebench/data_gen/data_gen_NLE/AdvectionEq
# Either generate a single file
CUDA_VISIBLE_DEVICES='2,3' python3 advection_multi_solution_Hydra.py +multi=beta1e0.yaml
# Or generate all files
bash run_trainset.sh
# serialize to hdf5 by transforming npy file
# before executing Data_Merge.py, change "type" and "savedir" values in PDEBench/pdebench/data_gen/data_gen_NLE/config/config.yaml
cd ..
python Data_Merge.py
```

--------------

#### Data generation for 1D Burgers' Equation:

```
# generate data and save as .npy array
cd PDEBench/pdebench/data_gen/data_gen_NLE/BurgersEq/
# Either generate a single file
CUDA_VISIBLE_DEVICES='0,2' python3 burgers_multi_solution_Hydra.py +multi=1e-1.yaml
# Or generate all files
bash run_trainset.sh
# serialize to hdf5 by transforming npy file
# before executing Data_Merge.py, change "type" and "savedir" values in PDEBench/pdebench/data_gen/data_gen_NLE/config/config.yaml
cd ..
python Data_Merge.py
```

---------------

#### Data generation for 1D Reaction Diffusion Equation:

```
# generate data and save as .npy array
cd PDEBench/pdebench/data_gen/data_gen_NLE/ReactionDiffusionEq/
# Either generate a single file
CUDA_VISIBLE_DEVICES='0,1' python3 reaction_diffusion_multi_solution_Hydra.py +multi=Rho2e0_Nu5e0.yaml
# Or generate all files
bash run_trainset.sh
# serialize to hdf5 by transforming npy file
# before executing Data_Merge.py, change "type" and "savedir" values in PDEBench/pdebench/data_gen/data_gen_NLE/config/config.yaml
cd ..
python Data_Merge.py
```

0 comments on commit 219e544

Please sign in to comment.