Repository navigation
Conversation
This was referenced Oct 15, 2026
Closed
Rbravo555
marked this pull request as ready for review
October 21, 2026 10:00
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR adds a first version of the RomApplication on top of the Kratos
Futuresolving strategies. It needs Kratos compiled with-DKRATOS_USE_FUTURE=ON; without it nothing new is compiled and the new tests are skipped. The legacy ROM builder and solvers are not modified and remain the default. The architecture and the open questions are in the discussion #14902.The ROM is split in three parts: a decoder
u = D(q)in Python, the Future scheme for the full order system, and a C++ projector that builds, projects and solves the reduced system. The nonlinear loop on the reduced coordinates is done in Python.At this stage it runs static problems (Future
StaticScheme). Time integration schemes will be added when they are available in the core.The fixed DOFs can be decoded in two ways,
"fixed_dofs_decoding":"basis"(default,u0 + Phi qon all the DOFs) or"prescribed"(the values imposed in each step,FixedDofsDecoder, wrapping any decoder). The ROM solution is the same with both.Current limitations:
rom_datafolder of the RomManager.ImplicitScheme::Buildassembles all the entities without weights, so it needs either a derived scheme in the RomApplication or a small extension of the core.CreateFutureRomAnalysisInstance, which wraps a standard analysis stage.🆕 Changelog
future/rom_projector.h: addedRomProjector(C++):BuildEffectiveSystem(),Project()(Galerkin, fixed DOFs through the basis),SolveReduced(),SetSolution()custom_python/add_future_utilities_to_python.h/.cpp,rom_python_application.cpp: exportedRomProjectorin the newKratosROM.FuturesubmoduleCMakeLists.txt: compiles the Future utilities only withKRATOS_USE_FUTURE=ONpython_scripts/future/rom_decoders.py: addedRomDecoder(NumberOfRomDofs(),Decode(),Jacobian(),InitializeSolutionStep()),LinearDecoderandFixedDofsDecoder(fixed DOFs with the values prescribed in the step, zero rows of the Jacobian)python_scripts/future/rom_future_solver.py: addedFutureRomSolver(Newton loop on the reduced coordinates, with the convergence criterion of the legacy displacement criterion: ratio or absolute norm of the increment of the free DOFs,relative_toleranceandabsolute_tolerance) andNumpyRomProjector(NumPy reference ofRomProjector); setting"fixed_dofs_decoding"("basis"or"prescribed")python_scripts/future/future_rom_analysis.py: addedCreateFutureRomAnalysisInstance()(the nonlinear settings not given take themax_iterationand, with a displacement criterion, the tolerances of the solver of the case; linear analyses in one iteration, as the legacy linear strategy; the scheme moves the mesh when the solver does,move_mesh_flag; the decoder wrapped in aFixedDofsDecoderwith"prescribed")test_future_rom_projector.cpp: addedFutureRomProjectorGalerkinandFutureRomProjectorEquationIdPermutation(same reduced system and solution with the node ids, and so the equation ids, permuted)test_future_rom.py: addedtestStructuralStaticRom2D,testStructuralStaticTotalLagrangianRom2D(geometrically nonlinear cantilever),testConvDiffStationaryRom2D(against the legacy ROM builder and solvers) andtestConvDiffStationaryRomFixedDofsDecoding(prescribed values on the fixed DOFs, same solution as"basis")tests/future_rom_test_files/TotalLagrangianROM: data oftestStructuralStaticTotalLagrangianRom2Dtest_RomApplication.py: addedTestFutureRomto the small suite🧱 Stacked PRs
PRs built on this one. Each is retargeted to the next base when its base merges.
flowchart RL master["master"] p14850["#14850 Futures in the RomApp"] p14903["#14903 Future HROM"] p14953["#14953 Future HROM training"] p14955["#14955 Reduced residual criterion"] p14911["#14911 Nonlinear decoders: base"] p14912["#14912 Quadratic decoder"] p14913["#14913 ANN-enhanced decoder"] p14914["#14914 RBF-enhanced decoder"] p14850 --> master p14903 --> p14850 p14953 --> p14903 p14955 --> p14850 p14911 --> p14850 p14912 --> p14911 p14913 --> p14911 p14914 --> p14911 classDef ready fill:#d8f0d8,stroke:#444 classDef draft fill:#dde7f5,stroke:#444 classDef merged fill:#e6dcf5,stroke:#444 class p14850,p14903,p14953,p14911,p14912,p14913,p14914,p14955 readyGreen: ready for review, blue: draft, purple: merged.