PINA icon indicating copy to clipboard operation
PINA copied to clipboard

KS mat generation

Open dgm2 opened this issue 1 year ago • 3 comments

Hello, could you share a snippet for how you generate the Data_KS.mat in tutorial 10 ? Thanks!

dgm2 avatar Jun 05 '24 07:06 dgm2

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 :)

dario-coscia avatar Jun 05 '24 09:06 dario-coscia

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!

dgm2 avatar Jul 09 '24 16:07 dgm2

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.

ndem0 avatar Jul 16 '24 15:07 ndem0