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

# mesh:from scoping

**Version: 0.0.0**

## Description

Extracts a meshed region from another meshed region based on a scoping. Regarding the property fields of the meshed region: the 'Elemental', 'Face', and 'Nodal' property fields are scoped to the elements, faces or nodes of the output mesh, the 'Global' property fields are transferred from the input mesh to the output mesh without changes, and the rest of the property fields are not present in the output mesh.

## 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) |
| - | - | - | - |
| **1** | [scoping](#input_1) | Required | [`scoping`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#scoping) |
| **2** | [inclusive](#input_2) | | [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#standard-types) |
| **3** | [nodes\_only](#input_3) | | [`bool`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#standard-types) |
| **7** | [mesh](#input_7) | Required | [`abstract_meshed_region`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#meshed-region) |

### scoping (Pin 1)

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

if nodal/face scoping, then the scoping is transposed respecting the inclusive pin

### inclusive (Pin 2)

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

if inclusive == 1 then all the elements/faces adjacent to the nodes/faces ids in input are added, if inclusive == 0, only the elements/faces which have all their nodes/faces in the scoping are included

### nodes\_only (Pin 3)

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

returns mesh with nodes only (without any elements or property fields). Default is false.

### mesh (Pin 7)

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

## 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** | [mesh](#output_0) | [`abstract_meshed_region`](https://developer.synopsys.com/docs/dpf/dpf-framework/2025-r2/core-concepts/dpf-types#meshed-region) |

### mesh (Pin 0)

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

## 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**: mesh

**Plugin**: core

**Scripting name**: from\_scoping

**Full name**: mesh.from\_scoping

**Internal name**: mesh::by\_scoping

**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("mesh::by_scoping"); // operator instantiation
  op.connect(1, my_scoping);
  op.connect(2, my_inclusive);
  op.connect(3, my_nodes_only);
  op.connect(7, my_mesh);
  ansys::dpf::MeshedRegion my_mesh = op.getOutput<ansys::dpf::MeshedRegion>(0);
  ```
</details>

<details>
  <summary>CPython</summary>

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

  op = dpf.operators.mesh.from_scoping() # operator instantiation
  op.inputs.scoping.connect(my_scoping)
  op.inputs.inclusive.connect(my_inclusive)
  op.inputs.nodes_only.connect(my_nodes_only)
  op.inputs.mesh.connect(my_mesh)
  my_mesh = op.outputs.mesh()
  ```
</details>

<details>
  <summary>IPython</summary>

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

  op = dpf.operators.mesh.from_scoping() # operator instantiation
  op.inputs.scoping.Connect(my_scoping)
  op.inputs.inclusive.Connect(my_inclusive)
  op.inputs.nodes_only.Connect(my_nodes_only)
  op.inputs.mesh.Connect(my_mesh)
  my_mesh = op.outputs.mesh.GetData()
  ```
</details>

## Changelog

* Version 0.0.0: Initial release.
