    

 ## On this page

  

 

 # ansys::dpf::ScopingsContainer 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="a98f063603783bdb8947982e927b2a516" name="a98f063603783bdb8947982e927b2a516"></a> **ScopingsContainer** ([ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) const &amp;) <a id="a537e44964af7b5d2dcd8b830f767dbc4" name="a537e44964af7b5d2dcd8b830f767dbc4"></a> **ScopingsContainer** ([ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) &amp;&amp;) noexcept  [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml#ab5ca28dd2c6971bcdc6c05ac9e2ab0cb) ([Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client)  [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml#aed23cb82bda6642f331cfe841701525a) ([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))  [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a7d11bd51f92baa443d303095b7e432c3) (int id, [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client)  [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a62fa8d44f5d7faf885ed3fad4c4c4c97) (std::vector&lt; std::string &gt; const &amp;[labels](structansys_1_1dpf_1_1labels.xhtml)) <a id="a88e8eb80b0d732f01257cbb430c9f6bf" name="a88e8eb80b0d732f01257cbb430c9f6bf"></a>[ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) &amp; **operator=** ([ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) const &amp;) <a id="a166689f1f66dec10d0fca9617659298a" name="a166689f1f66dec10d0fca9617659298a"></a>[ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) &amp; **operator=** ([ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) &amp;&amp;) noexcept [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) [operator\[\]](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a9477378fc07a99bb193afa7b594ac67f) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) index) [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) [at](classansys_1_1dpf_1_1ScopingsContainer.xhtml#ab1fdfc75b55ff6cd3c2475f1241734e4) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) const [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) [at](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a857bbd814a0a207fd94bd93ad2fe745c) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) const void [update](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a091782e39cd46714cd923cf784d8d30b) ([Scoping](classansys_1_1dpf_1_1Scoping.xhtml) &amp;f, [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) void [add](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a84dd455cbed983a8c00cc30c4365427f) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;[labels](structansys_1_1dpf_1_1labels.xhtml), [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) const &amp;f) std::vector&lt; [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) &gt; [getScopings](classansys_1_1dpf_1_1ScopingsContainer.xhtml#aecc5c3362d12b433b29fd9e5ca450418) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;[labels](structansys_1_1dpf_1_1labels.xhtml)) const std::vector&lt; [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) &gt; [getScopingsIndices](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a2a8782dceeb20d78578011c3b3accfff) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space) const [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) [getScoping](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a72ac39c1f6bd56ac3ebe624369b3249f) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;[labels](structansys_1_1dpf_1_1labels.xhtml)) const [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) [createSubScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a937781f3a15cc04f81d38e290eb348e3) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space) const [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) [deep\_copy](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a223fbc11c3fb729488a5f33772b2b2cf) ([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 [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) [emptyScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml#a915d28f8d3b7869182ca79f9c4269b4c) () <a id="details" name="details"></a>## Detailed Description

Contains a group of scopings.

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

Generally, a defined [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) will contain [Scoping](classansys_1_1dpf_1_1Scoping.xhtml "Define a set of entities by ids.") entities to apply on the [MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml "Holds the mesh for a given region (body, faces, skin, ...)") entities of a corresponding [MeshesContainer](classansys_1_1dpf_1_1MeshesContainer.xhtml).

See also[Scoping](classansys_1_1dpf_1_1Scoping.xhtml "Define a set of entities by ids.") [Using collections and labels](group__group__12.xhtml) Examples[AveragingTest.cpp](AveragingTest_8cpp-example.xhtml#_a29), and [WorkflowExamples.cpp](WorkflowExamples_8cpp-example.xhtml#_a18).

## Constructor &amp; Destructor Documentation

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

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

Create a new scopings 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="aed23cb82bda6642f331cfe841701525a" name="aed23cb82bda6642f331cfe841701525a"></a>## [◆ ](#aed23cb82bda6642f331cfe841701525a)ScopingsContainer() \[2/4\]

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

Create a group of scopings 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 group of scopings. 



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

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

Retrieve an existing instance of [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) on a server.

Parameters \[in\]idId of the [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.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="a62fa8d44f5d7faf885ed3fad4c4c4c97" name="a62fa8d44f5d7faf885ed3fad4c4c4c97"></a>## [◆ ](#a62fa8d44f5d7faf885ed3fad4c4c4c97)ScopingsContainer() \[4/4\]

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

Create a group of scopings with the given labels.

Parameters \[in\]labelsLabels for group of scopings. 



## Member Function Documentation

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

 void ansys::dpf::ScopingsContainer::add  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *labels*,    [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) const &amp;  *f*   ) 

Add new scoping with given labels to group.

Parameters \[in\]labels[Label](structansys_1_1dpf_1_1Label.xhtml) space to use for new scoping. \[in\]f[Scoping](classansys_1_1dpf_1_1Scoping.xhtml) to add to group. 



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

 [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) ansys::dpf::ScopingsContainer::at  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *index*) 

Returns[Scoping](classansys_1_1dpf_1_1Scoping.xhtml) at given index. Parameters \[in\]indexIndex of scoping to get. 



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

 const [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) ansys::dpf::ScopingsContainer::at  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *index*)  const

Returns[Scoping](classansys_1_1dpf_1_1Scoping.xhtml) at given index. Parameters \[in\]indexIndex of scoping to get. 



<a id="a937781f3a15cc04f81d38e290eb348e3" name="a937781f3a15cc04f81d38e290eb348e3"></a>## [◆ ](#a937781f3a15cc04f81d38e290eb348e3)createSubScopingsContainer()

 [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) ansys::dpf::ScopingsContainer::createSubScopingsContainer  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *lab\_space*)  const

Create a new [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) with all the scopings corresponding to the label space in input

Parameters \[in\]lab\_space[Label](structansys_1_1dpf_1_1Label.xhtml) space for which to create new scopings container. 



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

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

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

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



<a id="a915d28f8d3b7869182ca79f9c4269b4c" name="a915d28f8d3b7869182ca79f9c4269b4c"></a>## [◆ ](#a915d28f8d3b7869182ca79f9c4269b4c)emptyScopingsContainer()

 static [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml) ansys::dpf::ScopingsContainer::emptyScopingsContainer  ( )   static 

Create an empty scopings container.

ReturnsEmpty [ScopingsContainer](classansys_1_1dpf_1_1ScopingsContainer.xhtml). 



<a id="a72ac39c1f6bd56ac3ebe624369b3249f" name="a72ac39c1f6bd56ac3ebe624369b3249f"></a>## [◆ ](#a72ac39c1f6bd56ac3ebe624369b3249f)getScoping()

 [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) ansys::dpf::ScopingsContainer::getScoping  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *labels*)  const

ReturnsFirst scoping for given label space. Parameters \[in\]labels[Label](structansys_1_1dpf_1_1Label.xhtml) space for which to get first scoping. 



<a id="aecc5c3362d12b433b29fd9e5ca450418" name="aecc5c3362d12b433b29fd9e5ca450418"></a>## [◆ ](#aecc5c3362d12b433b29fd9e5ca450418)getScopings()

 std::vector&lt; [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) &gt; ansys::dpf::ScopingsContainer::getScopings  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *labels*)  const

ReturnsVector of scopings for given label space. Parameters \[in\]labels[Label](structansys_1_1dpf_1_1Label.xhtml) space for whict to get scopings. 



<a id="a2a8782dceeb20d78578011c3b3accfff" name="a2a8782dceeb20d78578011c3b3accfff"></a>## [◆ ](#a2a8782dceeb20d78578011c3b3accfff)getScopingsIndices()

 std::vector&lt; [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) &gt; ansys::dpf::ScopingsContainer::getScopingsIndices  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *lab\_space*)  const

Returns[Scoping](classansys_1_1dpf_1_1Scoping.xhtml "Define a set of entities by ids.") indices for scopings given by [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) Parameters \[in\]lab\_space[LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) defining scopings for which to get indices. 



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

 [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) ansys::dpf::ScopingsContainer::operator\[\]  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *index*) 

Returns[Scoping](classansys_1_1dpf_1_1Scoping.xhtml) at given index. Parameters \[in\]indexIndex of scoping. 



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

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

Update [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) at given index.

Parameters \[in\]fNew scoping. \[in\]indexIndex of scoping to update.