> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# composite:nearest_neighbor_operator

**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`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#meshed-region) | Meshed region with the elements for which the nearest neighbors should be found. |
| **Pin 1** Required | target\_mesh | [`abstract_meshed_region`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#meshed-region) | Mesh with the target elements. |
| **Pin 2** Required | number\_of\_neighbors | [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#standard-types) | Number of neighbors to be found. |

## Outputs

| Output | Name | Expected type(s) | Description |
| - | - | - | - |
| **Pin 0** | neighbors\_source\_to\_target | [`property_field`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#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`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#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`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#standard-types) | 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.
