Skip to main content

DPF Framework 2025 R2

composite:nearest_neighbor_operator

Last update: 03.06.2026

Version: 0.0.0

Description

Go through all elements of the source mesh and find the n nearest neighbors in the target mesh. The distance is computed from element center to element center.

Inputs

Input Name Expected type(s) Description
Pin 0
Required
source_mesh abstract_meshed_region Meshed region with the elements for which the nearest neighbors should be found.
Pin 1
Required
target_mesh abstract_meshed_region Mesh with the target elements.
Pin 2
Required
number_of_neighbors int32 Number of neighbors to be found.

Outputs

Output Name Expected type(s) Description
Pin 0 neighbors_source_to_target property_field Property field with an entry for each element ID of the source mesh with the element ID(s) of the neighbors of the target mesh. See output neighbors_target_to_source for the inverse result (Pin 1).
Pin 1 neighbors_target_to_source property_field Property field with an entry for each element ID of the target mesh with the element ID(s) of the neighbors of the source mesh. The field contains only the elements which have neighbors. See output neighbors_source_to_target for the inverse result (Pin 0)

Configurations

Name Expected type(s) Default value Description
mutex bool false If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.

Scripting

Category: composite

Plugin: composite

Scripting name: nearest_neighbor_operator

Full name: composite.nearest_neighbor_operator

Internal name: composite::nearest_neighbor_operator

License: None

Changelog

  • Version 0.0.0: Initial release.

Connect with Ansys