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

# Class ansys::dpf::Scoping

![][C++]
![][public]

Define a set of entities by [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

The scoping is entities ids representing a subset of the model's support. Typically, scoping can represent node ids, element ids, time steps, frequencies, joints... Its location indicates what kind of entity the scoping is referring to. Scopings are used to identify the entities where a field is scoped or to choose (through an input pin) a subset on which an operator should compute its result.

**Inherits from**:

* [ansys::dpf::DpfTypes](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md)

## Members

* [at](#classansys-dpf-scoping-1a0fc75ac65a5b13727b77e2c155828ccd)
* [callAPI](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1aea34d37e0c080126eff70db34bf46597)
* [deep\_copy](#classansys-dpf-scoping-1a6abd0899c21554c8babd5985710edadc)
* [describe](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a9977945710983bc03d2940fa007847b2)
* [emplace](#classansys-dpf-scoping-1a94f0dd35d07efdc472ef072b42f9cfda)
* [empty](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a39cd546c42518e2332be8f287db95459)
* [emptyScoping](#classansys-dpf-scoping-1a5c2fcf31c8714d27cec3455a94552650)
* [getClient](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a968afd9daa0b0f13b65a2ac61369d73a)
* [getHash](#classansys-dpf-scoping-1a860cdcd91dc058236d1769fa6b880533)
* [getHashableKey](#classansys-dpf-scoping-1a7081b6456a9fadb2031fa2f65028c123)
* [getIds](#classansys-dpf-scoping-1a7377823a48ee69e439a8589627c5e6c0)
* [hasBeenMovedLocally](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a1a5634202c15404b6b24e8f50e51cb66)
* [hashIds](#classansys-dpf-scoping-1a0b2cb58e52e98cd3e3a97c5fd8889e8b)
* [hasInternalObject](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1ae198f89868d85c7db6dc1a934a1d3c15)
* [idByIndex](#classansys-dpf-scoping-1ae35e47f2cceccf7ad9ed4590bd10ff89)
* [identicalPointers](#classansys-dpf-scoping-1a5666c29a9074bd286801882ed3105de1)
* [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b)
* [ids](#classansys-dpf-scoping-1a14dbd1c25bbfc1c3a3dc3ab9b5762d8c)
* [indexById](#classansys-dpf-scoping-1ab80b20d56d63ce48c08ce6b7428e06c2)
* [isOnCommonAPI](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a9f9789ff61cc9d400a2a344830706b73)
* [isSameObject](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1aa64d5f8fcd7d85ad6ebf708494dbefd7)
* [location](#classansys-dpf-scoping-1a516b4489a94ff02ecc880f170b8f93a9)
* [operator=](#classansys-dpf-scoping-1af6234c489fca21ae452862aa318bc725)
* [operator=](#classansys-dpf-scoping-1afc257d442c28fa0bed7e8967f630e24f)
* [reserve](#classansys-dpf-scoping-1a6b57f31ddd1d7f0b33451cb374ff3fb1)
* [resize](#classansys-dpf-scoping-1a82964b0127f36300908474a507cdd01a)
* [Scoping](#classansys-dpf-scoping-1a6d0e48f879e9e6647f659a0010de361f)
* [Scoping](#classansys-dpf-scoping-1a3f86c065a82a7ae05cbf16fc424fab39)
* [Scoping](#classansys-dpf-scoping-1a9e087ca8b1a487f2afc83b848746fba2)
* [Scoping](#classansys-dpf-scoping-1a11202e16776f413ef89146f6a528a1b1)
* [Scoping](#classansys-dpf-scoping-1ae1d319d0e8a3704e26556a8b11da2273)
* [Scoping](#classansys-dpf-scoping-1a95d3c08798fc15fb9daf34de74972518)
* [Scoping](#classansys-dpf-scoping-1a6ba7035c72a55f1213134becfdcca71a)
* [setHashableKey](#classansys-dpf-scoping-1a0415713e75068c4b5ba8a57cc2497fa2)
* [setIds](#classansys-dpf-scoping-1a021a022f87287b786ff9b3c92deb0e69)
* [setIds](#classansys-dpf-scoping-1aad7349f7505d953324c71900cf3d020c)
* [setLocation](#classansys-dpf-scoping-1abfc7b7b2376db292a67d05e9b7828367)
* [size](#classansys-dpf-scoping-1aeae5e27bd752bdf0da3cc2d64fbe118a)
* [\~DpfTypes](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1ab7c83b6ea160c2b115e056f6c312112f)
* [\~Scoping](#classansys-dpf-scoping-1ad23775a1b1a5abb8c34c706298863119)

## Friends

## Public functions

### Function Scoping

![][public]

```cpp theme={null}
ansys::dpf::Scoping::Scoping()
```

Create a new scoping.

**Return type**:

### Function Scoping

![][public]

```cpp theme={null}
ansys::dpf::Scoping::Scoping(std::vector< dp_id > const &ids, ansys::dpf::Location location)
```

Create a scoping of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b) at a location.

**Parameters**:

* std::vector\< [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) > const & **ids**: \[in] Vector of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).
* [ansys::dpf::Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md) **location**: \[in] [Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md) of scoping.

**Return type**:

### Function Scoping

![][public]

```cpp theme={null}
ansys::dpf::Scoping::Scoping(std::vector< dp_id > const &ids, ansys::dpf::Location location, Client const *const client)
```

Create a scoping of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b) at a location.

**Parameters**:

* std::vector\< [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) > const & **ids**: \[in] Vector of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).
* [ansys::dpf::Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md) **location**: \[in] [Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md) of scoping.
* [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) const \*const **client**: \[in] [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) instance designating the IP, port and protocol to use.

**Return type**:

### Function Scoping

![][public]

```cpp theme={null}
ansys::dpf::Scoping::Scoping(Client const *const client)
```

Create a new scoping on a server.

**Parameters**:

* [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) const \*const **client**: \[in] [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) instance designating the IP, port and protocol to use.

**Return type**:

### Function Scoping

![][public]

```cpp theme={null}
ansys::dpf::Scoping::Scoping(int id, Client const *const client)
```

Retrieve an existing instance of [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-scoping.md) on a server.

**Parameters**:

* int **id**: \[in] Id of the [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-scoping.md) object on the server's database.
* [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) const \*const **client**: \[in] [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) instance designating the IP, port and protocol to use.

**Return type**:

### Function \~Scoping

![][public]

```cpp theme={null}
virtual ansys::dpf::Scoping::~Scoping()
```

**Return type**:

### Function Scoping

![][public]

```cpp theme={null}
ansys::dpf::Scoping::Scoping(Scoping const &)
```

**Parameters**:

* Scoping const &

**Return type**:

### Function Scoping

![][public]

```cpp theme={null}
ansys::dpf::Scoping::Scoping(Scoping &&) noexcept
```

**Parameters**:

* Scoping &&

**Return type**:

### Function operator=

![][public]

```cpp theme={null}
Scoping & ansys::dpf::Scoping::operator=(Scoping const &)
```

**Parameters**:

* Scoping const &

**Return type**: Scoping &

### Function operator=

![][public]

```cpp theme={null}
Scoping & ansys::dpf::Scoping::operator=(Scoping &&) noexcept
```

**Parameters**:

* Scoping &&

**Return type**: Scoping &

### Function location

![][public]
![][const]

```cpp theme={null}
ansys::dpf::Location ansys::dpf::Scoping::location() const
```

**Returns**:

[Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md) of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Return type**: [ansys::dpf::Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md)

### Function setLocation

![][public]

```cpp theme={null}
void ansys::dpf::Scoping::setLocation(ansys::dpf::Location location)
```

Set location of scoping.

**Parameters**:

* [ansys::dpf::Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md) **location**: \[in] New location for scoping.

**Return type**: void

### Function setIds

![][public]

```cpp theme={null}
void ansys::dpf::Scoping::setIds(std::vector< dp_id > const &ids)
```

Update scoping to vector of new [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Parameters**:

* std::vector\< [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) > const & **ids**: \[in] New [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Return type**: void

### Function setIds

![][public]

```cpp theme={null}
void ansys::dpf::Scoping::setIds(dp_id *ids, dp_int size)
```

Update scoping to list of new [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Parameters**:

* [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) \* **ids**: \[in] List of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).
* [dp\_int](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **size**: \[in] Number of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Return type**: void

### Function identicalPointers

![][public]
![][const]

```cpp theme={null}
bool ansys::dpf::Scoping::identicalPointers(Scoping const &f) const
```

Compare scoping with input scoping f.

**Parameters**:

* Scoping const & **f**: \[in] [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-scoping.md) with which to compare.

**Return type**: bool

### Function size

![][public]
![][const]

```cpp theme={null}
dp_int ansys::dpf::Scoping::size() const
```

**Returns**:

Number of entries in scoping.

**Return type**: [dp\_int](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0)

### Function idByIndex

![][public]
![][const]

```cpp theme={null}
dp_id ansys::dpf::Scoping::idByIndex(dp_int index) const
```

**Returns**:

Id at index offset into vector of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Parameters**:

* [dp\_int](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **index**: \[in] index into vector of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Return type**: [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e)

### Function indexById

![][public]
![][const]

```cpp theme={null}
dp_index ansys::dpf::Scoping::indexById(dp_int id) const
```

**Returns**:

Index of id within vector of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Returns**:

-1 if id not found.

**Parameters**:

* [dp\_int](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **id**: \[in] id.

**Return type**: [dp\_index](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a417548d1b705a9ba54ba9429afe68920)

### Function at

![][public]
![][const]

```cpp theme={null}
dp_id ansys::dpf::Scoping::at(dp_int index) const
```

**Returns**:

Id at index offset into vector of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Parameters**:

* [dp\_int](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **index**

**Return type**: [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e)

### Function ids

![][public]
![][const]

```cpp theme={null}
const dp_id * ansys::dpf::Scoping::ids(dp_int &size) const
```

**Returns**:

Pointer to list of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Parameters**:

* [dp\_int](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) & **size**: \[out] Length of list.

**Return type**: const [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) \*

### Function ids

![][public]
![][const]

```cpp theme={null}
DpfVector< int > ansys::dpf::Scoping::ids() const
```

**Returns**:

[DpfVector](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-dpfvector.md) of ids array.

**Return type**: DpfVector\< int >

### Function getIds

![][public]
![][const]

```cpp theme={null}
void ansys::dpf::Scoping::getIds(std::vector< dp_id > &ids_to_fill) const
```

Update ids\_to\_fill with scoping [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Parameters**:

* std::vector\< [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) > & **ids\_to\_fill**: \[out] vector of [ids](#classansys-dpf-scoping-1acf26749e29d9f23de6c70806ccfaea6b).

**Return type**: void

### Function emplace

![][public]

```cpp theme={null}
void ansys::dpf::Scoping::emplace(dp_index index, dp_id id)
```

Set offset index into scoping to new id.

**Parameters**:

* [dp\_index](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a417548d1b705a9ba54ba9429afe68920) **index**: \[in] [Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md) for new id.
* [dp\_id](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) **id**: \[in] New id.

**Return type**: void

### Function hashIds

![][public]
![][const]

```cpp theme={null}
std::string ansys::dpf::Scoping::hashIds() const
```

**Return type**: std::string

### Function reserve

![][public]

```cpp theme={null}
void ansys::dpf::Scoping::reserve(dp_int size)
```

Reserve the container of ids.

**Parameters**:

* [dp\_int](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **size**

**Return type**: void

### Function resize

![][public]

```cpp theme={null}
void ansys::dpf::Scoping::resize(dp_int size)
```

Resize the container of ids.

**Parameters**:

* [dp\_int](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **size**

**Return type**: void

### Function getHashableKey

![][public]
![][const]

```cpp theme={null}
std::string ansys::dpf::Scoping::getHashableKey() const
```

Set and get an simpler hashable entity (here topology identifiers) instead of the full FE [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-scoping.md) to save time

**Return type**: std::string

### Function setHashableKey

![][public]
![][const]

```cpp theme={null}
void ansys::dpf::Scoping::setHashableKey(const std::string &unique_identifier) const
```

**Parameters**:

* const std::string & **unique\_identifier**

**Return type**: void

### Function getHash

![][public]
![][const]

```cpp theme={null}
size_t ansys::dpf::Scoping::getHash() const
```

Compute and get the hash of a scoping

**Return type**: size\_t

### Function deep\_copy

![][public]
![][const]

```cpp theme={null}
Scoping ansys::dpf::Scoping::deep_copy(ansys::dpf::Client const *const client=nullptr, const bool b_copy_ids=true) const
```

Create a new [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-scoping.md) on a server by copying all the data of this [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-scoping.md).

**Parameters**:

* [ansys::dpf::Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) const \*const **client** = nullptr : \[in] [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-client.md) instance designating the IP, port and protocol to use.
* const bool **b\_copy\_ids** = true : \[in] Boolean that allows to decide if scoping ids are to be copied

**Return type**: Scoping

## Public static functions

### Function emptyScoping

![][public]
![][static]

```cpp theme={null}
static Scoping ansys::dpf::Scoping::emptyScoping()
```

Create an empty scoping.
**Returns**:

Empty [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-scoping.md)

**Return type**: Scoping

[C++]: https://img.shields.io/badge/language-C%2B%2B-blue "C++"

[const]: https://img.shields.io/badge/-const-lightblue "const"

[public]: https://img.shields.io/badge/-public-brightgreen "public"

[static]: https://img.shields.io/badge/-static-lightgrey "static"
