Kratos
Kratos copied to clipboard
Enhance ROM Utilities: Introduce FindNearestNeighbors Utility for ROMs.
PR Description
This PR introduces a new utility function, FindNearestNeighbors, to the RomAuxiliaryUtilities within Kratos Rom Application. This function is essential for cosimulation scenarios where information needs to be accurately passed between interfaces of different model parts.
Details
- Functionality:
FindNearestNeighborsefficiently finds the closest node in the master node set for each node in a given list. It employs a spatial binning technique to expedite the search process, ensuring performance even with large node sets. - Use Case: Particularly useful in cosimulation environments where matching nodes across interfaces is crucial for accurate data transfer and interaction between different physical models.
Implementation
- The utility function uses an
unordered_setto store the IDs of the nearest nodes, guaranteeing that each ID is unique and preventing any duplication.
I am waiting for the PR #12274 to be merge to test this one with the final motor's HROM.