KS mat generation
Hello, could you share a snippet for how you generate the Data_KS.mat in tutorial 10 ?
Thanks!
Hi @dgm2 👋🏻 Since the dataset was relatively small we used scipy.integrate.solve_ivp to evolve the dynamic and a simple pseudospectral method for computing the derivatives (scipy has this functionality).
You can take a look here, where they solve the KdV equation, we use a very similar structure. Hope it helps!😄
PS. If you want to generate a lot of data in the PyTorch format (with GPU) you can also have a look at this excellent work. You can play with the source code to obtain the test case we used in tutorial 10 :)
Hi, thanks for the answer. Could you share a minimal python snippet to generate Data_KS.mat using scipy.integrate.solve_ivp please? Many thanks!
Hi @dgm2, on the scipy page you can find everything for the Python implementation! If you don't have further questions about the package, I will close the issue.