Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KS mat generation #303

Closed
dgm2 opened this issue Jun 5, 2024 · 3 comments
Closed

KS mat generation #303

dgm2 opened this issue Jun 5, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@dgm2
Copy link

dgm2 commented Jun 5, 2024

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

@dgm2 dgm2 added the help wanted Extra attention is needed label Jun 5, 2024
@dario-coscia
Copy link
Collaborator

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

@dgm2
Copy link
Author

dgm2 commented Jul 9, 2024

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!

@ndem0
Copy link
Member

ndem0 commented Jul 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants