From 219e5447341e550c7fdeda0e134658d5902b4e4c Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 3 Oct 2024 00:06:16 +0200 Subject: [PATCH] update steps for 1D data generation --- pdebench/data_gen/data_gen_NLE/README.md | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/pdebench/data_gen/data_gen_NLE/README.md b/pdebench/data_gen/data_gen_NLE/README.md index 7b5ff70..b0ce900 100644 --- a/pdebench/data_gen/data_gen_NLE/README.md +++ b/pdebench/data_gen/data_gen_NLE/README.md @@ -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 +```