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

Reformat the CNODE structure #47

Merged
merged 89 commits into from
Oct 1, 2024
Merged

Reformat the CNODE structure #47

merged 89 commits into from
Oct 1, 2024

Conversation

SCiarella
Copy link
Member

This branch removes a lot of overhead from the CNODE struct.
This is a major change from the main branch, but the performance gains justify it completely.
Basically this branch shows that pre and pos force operations are not needed.

At the moment, only the Burgers examples have been updated.

SCiarella and others added 30 commits June 7, 2024 13:32
We now use view+reshape to allow the manipulation of the same data in two ways
* linear view, in order to easily concatenate fields with different grid sizes in an array of size (linear, batch)
* grid view, in order to implement discretized forces in a more natural way

In the current implementation, there is almost no overhead in using either of the two shapes.
Currently the only example that has been adapted is 02.01.
Use only grid view via ArrayPartition
luisaforozco and others added 15 commits September 26, 2024 15:56
* Move things around:
- Delete test.jl didn't have anything meaningful.
- Delete INS_SciMLInterface.jl: code there was outdated. We've developed a better version of it in INS/lib/SciMLCompat.
- Create subfolders in src and adapt CoupleNODE.jl to expose the memebers accordingly.
- Delete circular import of grid.
- Delete grid.jl. Most probably we are going to use INS, but we can always check this file back in the tags.
- Update NS_solvers.jl to use the function in CoupleNODE (similar to the one in lib/SciMLCompat).
- Update NS_closure.jl to match the zygote part of scripts Enzyve_vs_Zygote from SciMLCompat.

* Proposes the workflow for generating data and training via apriori and a-posteriori fitting in the script simulations/NavierStokes_2D/scripts/NeuralClosure+SciML.jl.
We've also added a module NavierStokes that contains utilities necessary for this purpose.

---------
Co-authored-by: Luisa Orozco <99738896+luisaforozco@users.noreply.github.com>
Co-authored-by: Victor Azizi <victor@lipsum.eu>
Co-authored-by: SCiarella <58949181+SCiarella@users.noreply.github.com>
@luisaforozco
Copy link
Contributor

LGTM,
A question:
Should we fix the NeuralClosure dependency first (i.e. bringing the code that we use form NeuralClosure to this repo)?
and a request:
Can we squash and merge? I see a lot of commits, let's try to summarize in the merge commit. (I offer to do that myself)

@luisaforozco luisaforozco merged commit a63d87b into main Oct 1, 2024
3 of 4 checks passed
@luisaforozco luisaforozco deleted the dev branch October 1, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants