> ## 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.

# mapping:apply mechanical native mapping

**Version: 0.0.0**

## Description

Maps source data from source mesh to target mesh (computes interpolation).This operator needs to be used with the prepare mechanical native mapping associated one.

## Inputs

This table lists the input pins for this operator. Input pins define the data that the operator requires to perform its operation.
Some inputs are required, while others are optional and provide additional configuration.
Each parameter is detailed in the sections that follow the table.

| Pin number | Name | Status | Expected type(s) |
| - | - | - | - |
| **0** | [source\_mesh](#input_0) | Required | [`abstract_meshed_region`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#meshed-region) |
| **1** | [source\_mesh\_id](#input_1) | Required | [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#standard-types) |
| **2** | [target\_mesh](#input_2) | Required | [`abstract_meshed_region`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#meshed-region) |
| **3** | [target\_mesh\_id](#input_3) | Required | [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#standard-types) |
| **4** | [mapping\_manager\_data](#input_4) | Required | |
| **5** | [source\_data](#input_5) | Required | [`fields_container`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#fields-container) |
| **6** | [target\_scoping](#input_6) | | [`scoping`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#scoping) |

### source\_mesh (Pin 0)

* **Required:** Yes
* **Expected type(s):** [`abstract_meshed_region`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#meshed-region)

Source mesh

### source\_mesh\_id (Pin 1)

* **Required:** Yes
* **Expected type(s):** [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#standard-types)

Source mesh id

### target\_mesh (Pin 2)

* **Required:** Yes
* **Expected type(s):** [`abstract_meshed_region`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#meshed-region)

Target mesh

### target\_mesh\_id (Pin 3)

* **Required:** Yes
* **Expected type(s):** [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#standard-types)

Target mesh id

### mapping\_manager\_data (Pin 4)

* **Required:** Yes
* **Expected type(s):**

### source\_data (Pin 5)

* **Required:** Yes
* **Expected type(s):** [`fields_container`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#fields-container)

Source data

### target\_scoping (Pin 6)

* **Required:** No
* **Expected type(s):** [`scoping`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#scoping)

Target scoping the result will be scoped on

## Outputs

This table lists the output pins for this operator.
Output pins provide the results of the operator's computation and can be connected to inputs of other operators or retrieved for further processing.
Each output is detailed in the sections that follow the table.

| Pin number | Name | Expected type(s) |
| - | - | - |
| **0** | [mapped\_data](#output_0) | [`fields_container`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#fields-container) |
| **1** | [mapping\_warning\_codes](#output_1) | [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#standard-types) |

### mapped\_data (Pin 0)

* **Expected type(s):** [`fields_container`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#fields-container)

Mapped data

### mapping\_warning\_codes (Pin 1)

* **Expected type(s):** [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#standard-types)

contains the warning codes from the mapping manager kernel

## Configurations

This operator supports [configuration options](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/operator-configurations.md) that modify its behavior.

### [mutex](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/operator-configurations.md#mutex)

* **Expected type(s):** [`bool`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#standard-types)
* **Default value:** false

If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.

## Scripting

This operator can be accessed through scripting interfaces using these identifiers.

**Category**: mapping

**Plugin**: N/A

**Scripting name**: apply\_mechanical\_native\_mapping

**Full name**: mapping.apply\_mechanical\_native\_mapping

**Internal name**: mechanical\_native\_mapping::apply

**License**: any\_dpf\_supported\_increments

## Examples

These examples demonstrate how to use this operator in different programming environments.
Each example shows how to instantiate the operator, connect the required inputs, and retrieve the output.

<details>
  <summary>C++</summary>

  ```cpp theme={null}
  #include "dpf_api.h"

  ansys::dpf::Operator op("mechanical_native_mapping::apply"); // operator instantiation
  op.connect(0, my_source_mesh);
  op.connect(1, my_source_mesh_id);
  op.connect(2, my_target_mesh);
  op.connect(3, my_target_mesh_id);
  op.connect(4, my_mapping_manager_data);
  op.connect(5, my_source_data);
  op.connect(6, my_target_scoping);
  ansys::dpf::FieldsContainer my_mapped_data = op.getOutput<ansys::dpf::FieldsContainer>(0);
  int my_mapping_warning_codes = op.getOutput<int>(1);
  ```
</details>

<details>
  <summary>CPython</summary>

  ```python theme={null}
  import ansys.dpf.core as dpf

  op = dpf.operators.mapping.apply_mechanical_native_mapping() # operator instantiation
  op.inputs.source_mesh.connect(my_source_mesh)
  op.inputs.source_mesh_id.connect(my_source_mesh_id)
  op.inputs.target_mesh.connect(my_target_mesh)
  op.inputs.target_mesh_id.connect(my_target_mesh_id)
  op.inputs.mapping_manager_data.connect(my_mapping_manager_data)
  op.inputs.source_data.connect(my_source_data)
  op.inputs.target_scoping.connect(my_target_scoping)
  my_mapped_data = op.outputs.mapped_data()
  my_mapping_warning_codes = op.outputs.mapping_warning_codes()
  ```
</details>

<details>
  <summary>IPython</summary>

  ```python theme={null}
  import mech_dpf
  import Ans.DataProcessing as dpf

  op = dpf.operators.mapping.apply_mechanical_native_mapping() # operator instantiation
  op.inputs.source_mesh.Connect(my_source_mesh)
  op.inputs.source_mesh_id.Connect(my_source_mesh_id)
  op.inputs.target_mesh.Connect(my_target_mesh)
  op.inputs.target_mesh_id.Connect(my_target_mesh_id)
  op.inputs.mapping_manager_data.Connect(my_mapping_manager_data)
  op.inputs.source_data.Connect(my_source_data)
  op.inputs.target_scoping.Connect(my_target_scoping)
  my_mapped_data = op.outputs.mapped_data.GetData()
  my_mapping_warning_codes = op.outputs.mapping_warning_codes.GetData()
  ```
</details>

## Changelog

* Version 0.0.0: Initial release.
