Kratos icon indicating copy to clipboard operation
Kratos copied to clipboard

Enhance ROM Utilities: Introduce FindNearestNeighbors Utility for ROMs.

Open SADPR opened this issue 1 year ago • 1 comments

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: FindNearestNeighbors efficiently 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_set to store the IDs of the nearest nodes, guaranteeing that each ID is unique and preventing any duplication.

SADPR avatar Apr 15 '24 09:04 SADPR

I am waiting for the PR #12274 to be merge to test this one with the final motor's HROM.

SADPR avatar Apr 16 '24 15:04 SADPR