    

 ## On this page

  

 

 # ansys::dpf::MeshesContainer Class Reference

 Last update: 16.07.2025 

`#include <dpf_api.h>`

Inherits ansys::dpf::CollectionBase.

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

<a id="ab5d10a6e0af1de794c5dd5ff5274a56c" name="ab5d10a6e0af1de794c5dd5ff5274a56c"></a> **MeshesContainer** ([MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) const &amp;) <a id="a1950bf0757d24a5441b3b0326454ab6e" name="a1950bf0757d24a5441b3b0326454ab6e"></a> **MeshesContainer** ([MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) &amp;&amp;) noexcept  [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml#aa4c802341a32f409bface24c08750256) ([Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client)  [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml#a0ac20f2c12dfe98d977cb6bb5c7a85fa) ([Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client, std::vector&lt; std::string &gt; const &amp;[labels](structansys_1_1dpf_1_1labels.xhtml))  [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml#abb7d8aa6a81104550acd750be0341d52) (int id, [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client)  [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml#ad5852e1110c3ac20a9e139a68a54bff4) (std::vector&lt; std::string &gt; const &amp;[labels](structansys_1_1dpf_1_1labels.xhtml)) <a id="afe5811d03325be342ac58977d37ab0d0" name="afe5811d03325be342ac58977d37ab0d0"></a>[MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) &amp; **operator=** ([MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) const &amp;) <a id="a64a2fe24398371036df24ec2b5b26027" name="a64a2fe24398371036df24ec2b5b26027"></a>[MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) &amp; **operator=** ([MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) &amp;&amp;) noexcept [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) [operator\[\]](classansys_1_1dpf_1_1MeshesContainer.xhtml#a7a7b3e5a05bbd093a14531d846c0557a) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) index) [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) [at](classansys_1_1dpf_1_1MeshesContainer.xhtml#aa5faa82275582751a35b9f8f7fa52532) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) const [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) [at](classansys_1_1dpf_1_1MeshesContainer.xhtml#ab45cbc57a611d133effd85a07026ccf8) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) const void [update](classansys_1_1dpf_1_1MeshesContainer.xhtml#ad9bf573f6faf5c3d6a69509acebfd029) ([MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) &amp;f, [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) void [add](classansys_1_1dpf_1_1MeshesContainer.xhtml#aff23c8528d5364caf5a959d252576c94) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;[labels](structansys_1_1dpf_1_1labels.xhtml), [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) const &amp;f) std::vector&lt; [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) &gt; [getMeshes](classansys_1_1dpf_1_1MeshesContainer.xhtml#a2be495164acdc7891bc8efa173d6ad60) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;label\_space) const [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) [getMesh](classansys_1_1dpf_1_1MeshesContainer.xhtml#a9b94613788b1ced87b9a1ad5b94dcefd) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;label\_space) const <a id="a699c93ca9f77f9a96f4aa4a8744c1596" name="a699c93ca9f77f9a96f4aa4a8744c1596"></a>std::vector&lt; int &gt; **getMeshesIndices** ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space) const <a id="afe73c105be73ed4fe598145f852552fe" name="afe73c105be73ed4fe598145f852552fe"></a>[MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) **createSubMeshesContainer** ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space) const create a [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) with all the meshes corresponding to the label space in input   
 [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) [deep\_copy](classansys_1_1dpf_1_1MeshesContainer.xhtml#a4d6dc89fa32881ff246e53fc919f6d57) ([ansys::dpf::Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client=nullptr) const ## <a id="pub-static-methods" name="pub-static-methods"></a>Static Public Member Functions

static [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) [emptyMeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml#a5adfd625ae0bbadf1ac7b46caed156cf) () <a id="details" name="details"></a>## 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](classansys_1_1dpf_1_1MeshedRegion.xhtml "Holds the mesh for a given region (body, faces, skin, ...)") [Using collections and labels](group__group__12.xhtml) Examples[DataExport.cpp](DataExport_8cpp-example.xhtml#_a5).

## Constructor &amp; Destructor Documentation

<a id="aa4c802341a32f409bface24c08750256" name="aa4c802341a32f409bface24c08750256"></a>## [◆ ](#aa4c802341a32f409bface24c08750256)MeshesContainer() \[1/4\]

 ansys::dpf::MeshesContainer::MeshesContainer  ( [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const  *client*) 

Create a new meshes container on a server.

Parameters \[in\]client[Client](classansys_1_1dpf_1_1Client.xhtml) instance designating the IP, port and protocol to use. 



<a id="a0ac20f2c12dfe98d977cb6bb5c7a85fa" name="a0ac20f2c12dfe98d977cb6bb5c7a85fa"></a>## [◆ ](#a0ac20f2c12dfe98d977cb6bb5c7a85fa)MeshesContainer() \[2/4\]

 ansys::dpf::MeshesContainer::MeshesContainer  ( [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const  *client*,    std::vector&lt; std::string &gt; const &amp;  *labels*   ) 

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

Parameters \[in\]client[Client](classansys_1_1dpf_1_1Client.xhtml) instance designating the IP, port and protocol to use. \[in\]labelsLabels for meshes. 



<a id="abb7d8aa6a81104550acd750be0341d52" name="abb7d8aa6a81104550acd750be0341d52"></a>## [◆ ](#abb7d8aa6a81104550acd750be0341d52)MeshesContainer() \[3/4\]

 ansys::dpf::MeshesContainer::MeshesContainer  ( int  *id*,    [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const  *client*   ) 

Retrieve an existing instance of [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) on a server.

Parameters \[in\]idId of the [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) object on the server's database. \[in\]client[Client](classansys_1_1dpf_1_1Client.xhtml) instance designating the IP, port and protocol to use. 



<a id="ad5852e1110c3ac20a9e139a68a54bff4" name="ad5852e1110c3ac20a9e139a68a54bff4"></a>## [◆ ](#ad5852e1110c3ac20a9e139a68a54bff4)MeshesContainer() \[4/4\]

 ansys::dpf::MeshesContainer::MeshesContainer  ( std::vector&lt; std::string &gt; const &amp;  *labels*) 

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

Parameters \[in\]labelsLabels for group of meshed regions. 



## Member Function Documentation

<a id="aff23c8528d5364caf5a959d252576c94" name="aff23c8528d5364caf5a959d252576c94"></a>## [◆ ](#aff23c8528d5364caf5a959d252576c94)add()

 void ansys::dpf::MeshesContainer::add  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *labels*,    [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) const &amp;  *f*   ) 

Add meshed region with given label space.

Parameters \[in\]labels[Label](structansys_1_1dpf_1_1Label.xhtml) space for meshed region. \[in\]fMeshed region to add. Examples[DataExport.cpp](DataExport_8cpp-example.xhtml#a38).



<a id="aa5faa82275582751a35b9f8f7fa52532" name="aa5faa82275582751a35b9f8f7fa52532"></a>## [◆ ](#aa5faa82275582751a35b9f8f7fa52532)at() \[1/2\]

 [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) ansys::dpf::MeshesContainer::at  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *index*) 

ReturnsMeshed region for given index. Parameters \[in\]indexIndex of meshed region to get. 



<a id="ab45cbc57a611d133effd85a07026ccf8" name="ab45cbc57a611d133effd85a07026ccf8"></a>## [◆ ](#ab45cbc57a611d133effd85a07026ccf8)at() \[2/2\]

 const [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) ansys::dpf::MeshesContainer::at  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *index*)  const

ReturnsMeshed region for given index. Parameters \[in\]indexIndex of meshed region to get. 



<a id="a4d6dc89fa32881ff246e53fc919f6d57" name="a4d6dc89fa32881ff246e53fc919f6d57"></a>## [◆ ](#a4d6dc89fa32881ff246e53fc919f6d57)deep\_copy()

 [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) ansys::dpf::MeshesContainer::deep\_copy  ( [ansys::dpf::Client](classansys_1_1dpf_1_1Client.xhtml) const \*const  *client* = `nullptr`)  const

Create a new [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) on a server by copying all the data of this [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml).

Parameters \[in\]client[Client](classansys_1_1dpf_1_1Client.xhtml) instance designating the IP, port and protocol to use. 



<a id="a5adfd625ae0bbadf1ac7b46caed156cf" name="a5adfd625ae0bbadf1ac7b46caed156cf"></a>## [◆ ](#a5adfd625ae0bbadf1ac7b46caed156cf)emptyMeshesContainer()

 static [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml) ansys::dpf::MeshesContainer::emptyMeshesContainer  ( )   static 

Create an empty mesh container.

ReturnsEmpty mesh container. 



<a id="a9b94613788b1ced87b9a1ad5b94dcefd" name="a9b94613788b1ced87b9a1ad5b94dcefd"></a>## [◆ ](#a9b94613788b1ced87b9a1ad5b94dcefd)getMesh()

 [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) ansys::dpf::MeshesContainer::getMesh  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *label\_space*)  const

ReturnsFirst meshed region for given label space. Parameters \[in\]label\_space[Label](structansys_1_1dpf_1_1Label.xhtml) space for which to get meshed region. 



<a id="a2be495164acdc7891bc8efa173d6ad60" name="a2be495164acdc7891bc8efa173d6ad60"></a>## [◆ ](#a2be495164acdc7891bc8efa173d6ad60)getMeshes()

 std::vector&lt; [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) &gt; ansys::dpf::MeshesContainer::getMeshes  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *label\_space*)  const

ReturnsVector of meshed regions for given label space. Parameters \[in\]label\_space[Label](structansys_1_1dpf_1_1Label.xhtml) space for which to get meshed regions. 



<a id="a7a7b3e5a05bbd093a14531d846c0557a" name="a7a7b3e5a05bbd093a14531d846c0557a"></a>## [◆ ](#a7a7b3e5a05bbd093a14531d846c0557a)operator\[\]()

 [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) ansys::dpf::MeshesContainer::operator\[\]  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *index*) 

ReturnsMeshed region for given index. Parameters \[in\]indexIndex of mesh within container. 



<a id="ad9bf573f6faf5c3d6a69509acebfd029" name="ad9bf573f6faf5c3d6a69509acebfd029"></a>## [◆ ](#ad9bf573f6faf5c3d6a69509acebfd029)update()

 void ansys::dpf::MeshesContainer::update  ( [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) &amp;  *f*,    [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *index*   ) 

Update a meshed region at index.

Parameters \[in\]fNew meshed region. \[in\]indexIndex of meshed region to update.