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

# ansys::dpf::MeshesContainer Class Reference

`#include <dpf_api.h>`

Inherits ansys::dpf::CollectionBase.

## Public Member Functions

| Type | Name |
| - | - |
| | **MeshesContainer** ([MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) const &) |
| | **MeshesContainer** ([MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) &&) noexcept |
| | [MeshesContainer](#aa4c802341a32f409bface24c08750256) ([Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Client.md) const \*const client) |
| | [MeshesContainer](#a0ac20f2c12dfe98d977cb6bb5c7a85fa) ([Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Client.md) const \*const client, std::vector\< std::string > const &[labels](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1labels.md)) |
| | [MeshesContainer](#abb7d8aa6a81104550acd750be0341d52) (int id, [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Client.md) const \*const client) |
| | [MeshesContainer](#ad5852e1110c3ac20a9e139a68a54bff4) (std::vector\< std::string > const &[labels](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1labels.md)) |
| [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) & | **operator=** ([MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) const &) |
| [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) & | **operator=** ([MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) &&) noexcept |
| [MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshedRegion.md) | [operator\[\]](#a7a7b3e5a05bbd093a14531d846c0557a) ([dp\_int](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/namespaceansys_1_1dpf#a60d181a1f9d29cc7cc38b25dac4401f0) index) |
| [MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshedRegion.md) | [at](#aa5faa82275582751a35b9f8f7fa52532) ([dp\_index](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/namespaceansys_1_1dpf#a417548d1b705a9ba54ba9429afe68920) index) |
| const [MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshedRegion.md) | [at](#ab45cbc57a611d133effd85a07026ccf8) ([dp\_index](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/namespaceansys_1_1dpf#a417548d1b705a9ba54ba9429afe68920) index) const |
| void | [update](#ad9bf573f6faf5c3d6a69509acebfd029) ([MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshedRegion.md) \&f, [dp\_index](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/namespaceansys_1_1dpf#a417548d1b705a9ba54ba9429afe68920) index) |
| void | [add](#aff23c8528d5364caf5a959d252576c94) ([LabelSpace](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1LabelSpace.md) const &[labels](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1labels.md), [MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshedRegion.md) const \&f) |
| std::vector\< [MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshedRegion.md) > | [getMeshes](#a2be495164acdc7891bc8efa173d6ad60) ([LabelSpace](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1LabelSpace.md) const \&label\_space) const |
| [MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshedRegion.md) | [getMesh](#a9b94613788b1ced87b9a1ad5b94dcefd) ([LabelSpace](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1LabelSpace.md) const \&label\_space) const |
|  std::vector\< int > | **getMeshesIndices** ([LabelSpace](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1LabelSpace.md) const \&lab\_space) const |
| [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) | **createSubMeshesContainer** ([LabelSpace](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1LabelSpace.md) const \&lab\_space) const create a [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) with all the meshes corresponding to the label space in input |
| [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) | [deep\_copy](#a4d6dc89fa32881ff246e53fc919f6d57) ([ansys::dpf::Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Client.md) const \*const client=nullptr) const |

## Static Public Member Functions

| Type | Name |
| - | - |
| static [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) | [emptyMeshesContainer](#a5adfd625ae0bbadf1ac7b46caed156cf) () |

## Detailed Description

Contains a group of meshes. The meshes container is designed as a set of meshes ordered through labels and ids. Labels identify how the fields are filtered. The most common meshes container have the label "body" with ids corresponding to each body entity.

**See also**

[MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshedRegion.md)

[Using collections and labels](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/group__group__12.md)

**Examples**

[DataExport.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/DataExport_8cpp-example.md).

## Constructor & Destructor Documentation

### MeshesContainer() \[1/4]

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

Create a new meshes container on a server.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | client | [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Client.md) instance designating the IP, port and protocol to use. |

### MeshesContainer() \[2/4]

```cpp theme={null}
ansys::dpf::MeshesContainer::MeshesContainer(
    Client const *const client,
    std::vector< std::string > const & labels
)
```

Create a collection of meshes with the given labels on a server.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | client | [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Client.md) instance designating the IP, port and protocol to use. |
| \[in] | labels | Labels for meshes. |

### MeshesContainer() \[3/4]

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

Retrieve an existing instance of [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) on a server. \


**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | id | Id of the [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) object on the server's database. |
| \[in] | client | [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Client.md) instance designating the IP, port and protocol to use. |

### MeshesContainer() \[4/4]

```cpp theme={null}
ansys::dpf::MeshesContainer::MeshesContainer(std::vector< std::string > const & labels)
```

Create mesh container for a group of meshed regions with the given labels.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | labels | Labels for group of meshed regions. |

## Member Function Documentation

### add()

```cpp theme={null}
void ansys::dpf::MeshesContainer::add(
    LabelSpace const & labels,
    MeshedRegion const & f
)
```

Add meshed region with given label space.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | labels | [Label](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Label.md) space for meshed region. |
| \[in] | f | Meshed region to add. |

**Examples**

[DataExport.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/DataExport_8cpp-example.md).

### at() \[1/2]

```cpp theme={null}
MeshedRegion ansys::dpf::MeshesContainer::at(dp_index index)
```

**Returns**

Meshed region for given index.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | Index of meshed region to get. |

### at() \[2/2]

```cpp theme={null}
const MeshedRegion ansys::dpf::MeshesContainer::at(dp_index index) const
```

**Returns**

Meshed region for given index.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | Index of meshed region to get. |

### deep\_copy()

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

Create a new [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) on a server by copying all the data of this [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md).

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | client | [Client](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Client.md) instance designating the IP, port and protocol to use. |

### emptyMeshesContainer()

```cpp theme={null}
static MeshesContainer ansys::dpf::MeshesContainer::emptyMeshesContainer()
```

`static`

Create an empty mesh container.

**Returns**

Empty mesh container.

### getMesh()

```cpp theme={null}
MeshedRegion ansys::dpf::MeshesContainer::getMesh(LabelSpace const & label_space) const
```

**Returns**

First meshed region for given label space.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | label\_space | [Label](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Label.md) space for which to get meshed region. |

### getMeshes()

```cpp theme={null}
std::vector< MeshedRegion > ansys::dpf::MeshesContainer::getMeshes(
    LabelSpace const & label_space
) const
```

**Returns**

Vector of meshed regions for given label space.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | label\_space | [Label](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Label.md) space for which to get meshed regions. |

### operator\[]\()

```cpp theme={null}
MeshedRegion ansys::dpf::MeshesContainer::operator[](dp_int index)
```

**Returns**

Meshed region for given index.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | Index of mesh within container. |

### update()

```cpp theme={null}
void ansys::dpf::MeshesContainer::update(
    MeshedRegion & f,
    dp_index index
)
```

Update a meshed region at index.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | f | New meshed region. |
| \[in] | index | Index of meshed region to update. |
