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] Fixing Ids issues in ROM files. #12140

Merged
merged 5 commits into from
Mar 7, 2024
Merged

[RomApp] Fixing Ids issues in ROM files. #12140

merged 5 commits into from
Mar 7, 2024

Conversation

Rbravo555
Copy link
Member

@Rbravo555 Rbravo555 commented Mar 4, 2024

📝 Description
This PR fixes a bug we encountered whenever the model part of the Full Order Model contains irregular indexes of Nodes, Elements and/or Conditions.

The previous implementation assumes all entities are present starting with the entity with Id=1, and the last entity's Id is equal to the number of entities.

🆕 Changelog

  • In calculate_rom_basis_output_process.py: The file storing the ids "RightBasisMatrix.npy" now contains the proper ids, and not a simple np.arange
  • In hrom_training_utility.py: The ids are mapped using python dictionaries from numpy ids to Kratos entities Ids

@Rbravo555 Rbravo555 requested a review from a team as a code owner March 4, 2024 15:25
@Rbravo555 Rbravo555 marked this pull request as draft March 4, 2024 16:44
@Rbravo555 Rbravo555 marked this pull request as ready for review March 6, 2024 15:00
Copy link
Contributor

@SADPR SADPR left a comment

Choose a reason for hiding this comment

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

I tested it and it works well. The code its correct.

@SADPR SADPR merged commit fca03cf into master Mar 7, 2024
16 of 17 checks passed
@SADPR SADPR deleted the RomApp_FixBugIndexes branch March 7, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants