Skip to content

[RomApp] Deployment of ANN Enhanced ROMs (no RomManager) - #14834

Merged
Rbravo555 merged 2 commits into
masterfrom
rom/standalone_ann_enhanced_rom
Oct 7, 2026
Merged

Rbravo555 merged 2 commits into
masterfrom
rom/standalone_ann_enhanced_rom

Conversation

@Rbravo555

@Rbravo555 Rbravo555 commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

📝 Description

ANN-enhanced ROMs (galerkin_ann, lspg_ann) could only be run through the RomManager, because the network and basis were read from its database. This PR lets them run without it, reading everything from the ROM folder.

To run standalone, the ROM folder needs:

  • RightBasisMatrix.npy
  • SingularValues.npy (the singular values used to scale the basis during training)
  • model_weights.npy
  • RomParameters.json with "ann_enhanced_settings": {"modes": [n_inf, n_sup]}

These files can come from a network trained outside the RomManager, or from the new export method.

🆕 Changelog

  • rom_nn_interface.py: added NN_ROM_Interface.FromNumpyFiles(rom_data_folder, modes), which builds the interface from the files above. The database constructor is unchanged.
  • rom_analysis.py: when no interface is passed, it builds one from the ROM folder using ann_enhanced_settings in RomParameters.json.
  • rom_manager.py: added ExportAnnEnhancedRom, which writes a trained model to a standalone folder.
  • Tests:
    • testFluidGalerkinRom2D_ANN_Standalone runs a stored model without a database.
    • testFluidGalerkinRom2D_ANN_Export exports a model with the RomManager and runs it standalone.

@Rbravo555 Rbravo555 self-assigned this Sep 30, 2026
@Rbravo555 Rbravo555 added the ROM label Sep 30, 2026

@NicolasSR NicolasSR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks ready to merge

@Rbravo555
Rbravo555 merged commit a231795 into master Oct 7, 2026
10 checks passed
@Rbravo555
Rbravo555 deleted the rom/standalone_ann_enhanced_rom branch October 7, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants