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

[RomApp] Adding a database with SQLite #12313

Merged
merged 76 commits into from
Jun 25, 2024
Merged

Conversation

Rbravo555
Copy link
Member

@Rbravo555 Rbravo555 commented Apr 25, 2024

📝 Description
This PR adds a database for the rom simulations using the sqlite3 python library.

The RomDatabase is a property of the RomManager. The main change in the behaviour is that now all snapshots are added to the database and when the error is to be computed, the SVD of the solutions is to be calculated, the SVD residuals projected is to the calculated, etc, the database retrieves the required npy files from the respective npy_files folder and once the npy file is loaded into fast memory, the calculation proceeds with the previously existing logic.

The files generated by the database are

  • a .db file that is read by the sqlite3 library
  • a folder containing a human readable summary in excel format, here the complete database can also be exported if an optional method is called
  • a folder containing the .npy files. The database actually contains a hash, that is a kind of key created using the parameters used to generate the file, therefore each snapshot, right basis, left basis, residuals projected, all have a unique hash. The RomDatabase class contains methods to retrieve each of them.
  • a folder containing the neural networks trained for the ANN-Enhanced PROM

🆕 Changelog

  • Added rom_database.py script containing the RomDataBase class
  • Modified the methods Fit and Test in the RomManager to work with the new database
  • Test has been added

Copy link
Member

@roigcarlo roigcarlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some comments.

Also, if possible, make a little doc (couple of lines) for the functions that are missing one (specially in the RomDatabase class)

@NicolasSR
Copy link
Contributor

Looks good to me, I checked mostly the parts that have to do with the ANN

@Rbravo555
Copy link
Member Author

Looks good to me, I checked mostly the parts that have to do with the ANN

Can I get an approval?

@Rbravo555 Rbravo555 merged commit 6d033da into master Jun 25, 2024
11 checks passed
@Rbravo555 Rbravo555 deleted the RomApp_RomDataBaseWithSQLite branch June 25, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

7 participants