    

 ## On this page

  

 

 # ansys::dpf::FieldsContainer Class Reference

 Last update: 16.07.2025 

Contains a group of fields. [More...](classansys_1_1dpf_1_1FieldsContainer.xhtml#details)

`#include <dpf_api.h>`

Inheritance diagram for ansys::dpf::FieldsContainer:

 ![](/sites/default/files/migrate-content/dpf_cpp_client_library_2024_r1/classansys_1_1dpf_1_1FieldsContainer.png)



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

 [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml#acf61fba680e2cf1bfeefc199751fc8aa) ([Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client)  [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml#ac721796f129c6e8986be8ce5977eefcc) ([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))  [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml#a8f56a88941a626857bb11528368f08e6) (int [id](classansys_1_1dpf_1_1FieldsContainer.xhtml#a3e262e4f6ade30a6a42198a117839751), [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client)  [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml#a22e1ed19ab76ad96df74d2084c9ea4f4) (const std::vector&lt; std::string &gt; &amp;[labels](structansys_1_1dpf_1_1labels.xhtml)) <a id="a85f22edc2a63a092cf00e9fc839a28e6" name="a85f22edc2a63a092cf00e9fc839a28e6"></a> **FieldsContainer** ([FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) const &amp;) <a id="ad5ccfb39967a33d0dc8eeba9283516dd" name="ad5ccfb39967a33d0dc8eeba9283516dd"></a> **FieldsContainer** ([FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) &amp;&amp;) <a id="a8c309f116e976d6270f9e7ccbc320fad" name="a8c309f116e976d6270f9e7ccbc320fad"></a>[FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) &amp; **operator=** ([FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) const &amp;) <a id="aa96ceca38395e18ccdb58fe89c8a124a" name="aa96ceca38395e18ccdb58fe89c8a124a"></a>[FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) &amp; **operator=** ([FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) &amp;&amp;) [Field](classansys_1_1dpf_1_1Field.xhtml) [operator\[\]](classansys_1_1dpf_1_1FieldsContainer.xhtml#aea6b234cdf457204b5fa9c8e62c7b691) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) index) [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [size](classansys_1_1dpf_1_1FieldsContainer.xhtml#a0f93949d1256055fd0a85a70cd62aab4) () const [Field](classansys_1_1dpf_1_1Field.xhtml) [at](classansys_1_1dpf_1_1FieldsContainer.xhtml#addfee935e69fe9fb9e0e533449f9a5bc) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) const [Field](classansys_1_1dpf_1_1Field.xhtml) [at](classansys_1_1dpf_1_1FieldsContainer.xhtml#a475eafcf1caa61c8113d4ea4dbcaa881) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) const void [update](classansys_1_1dpf_1_1FieldsContainer.xhtml#a9f0704e94d480481e50abd20df33317c) ([Field](classansys_1_1dpf_1_1Field.xhtml) &amp;f, [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) void [reserve](classansys_1_1dpf_1_1FieldsContainer.xhtml#a83521da3efc008468f37f05153691696) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [size](classansys_1_1dpf_1_1FieldsContainer.xhtml#a0f93949d1256055fd0a85a70cd62aab4)) void [resize](classansys_1_1dpf_1_1FieldsContainer.xhtml#a5790b17b68590cdecccc9642df172d39) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [size](classansys_1_1dpf_1_1FieldsContainer.xhtml#a0f93949d1256055fd0a85a70cd62aab4)) void [addLabel](classansys_1_1dpf_1_1FieldsContainer.xhtml#aa9912d3ca0991feecc57765ec816505a) (std::string const &amp;label) void [addLabel](classansys_1_1dpf_1_1FieldsContainer.xhtml#a1d5a4855c67db5f95789024142140a1f) (std::string const &amp;label, [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) default\_value) void [addLabels](classansys_1_1dpf_1_1FieldsContainer.xhtml#a9e099c6e48bb4786e95168f1e69a635f) (std::vector&lt; std::string &gt; const &amp;[labels](structansys_1_1dpf_1_1labels.xhtml)) void [add](classansys_1_1dpf_1_1FieldsContainer.xhtml#a0c6bd75cbd78e7a25784ccc4a9f609d5) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space, [Field](classansys_1_1dpf_1_1Field.xhtml) const &amp;f) [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [getSizeFor](classansys_1_1dpf_1_1FieldsContainer.xhtml#a8daf89e0cf634d805ab5d476c20fd608) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space) const std::vector&lt; [Field](classansys_1_1dpf_1_1Field.xhtml) &gt; [getFields](classansys_1_1dpf_1_1FieldsContainer.xhtml#aaa1bd58f282cf7e3bebb1fd1cfe6adbc) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space) const [Field](classansys_1_1dpf_1_1Field.xhtml) [getField](classansys_1_1dpf_1_1FieldsContainer.xhtml#aeb12b6212b016653f1eb325f19a9d1ce) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space) const std::vector&lt; int &gt; [getFieldsIndeces](classansys_1_1dpf_1_1FieldsContainer.xhtml#a3a8ce9d9bf9a5ad8e4e3efb22d224cef) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space) const std::vector&lt; std::string &gt; [labels](classansys_1_1dpf_1_1FieldsContainer.xhtml#acf312b3596240066b8f1371989ef61fd) () const [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) [getLabelSpace](classansys_1_1dpf_1_1FieldsContainer.xhtml#add7a3418e9a0efb753d0c48d0359a261) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index) const [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) [labelScoping](classansys_1_1dpf_1_1FieldsContainer.xhtml#afd031defd3088051030347232478ee35) (std::string const &amp;label) const std::vector&lt; [Field](classansys_1_1dpf_1_1Field.xhtml) &gt; [getFieldsForTimeId](classansys_1_1dpf_1_1FieldsContainer.xhtml#a45536132d19f7a61af3ff18e660ad8de) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) time\_id, [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) complex\_id=0) const bool [hasLabel](classansys_1_1dpf_1_1FieldsContainer.xhtml#ac73c0843a3b6ed0604428a21a9be416f) (std::string const &amp;label) const [Support](classansys_1_1dpf_1_1Support.xhtml) [support](classansys_1_1dpf_1_1FieldsContainer.xhtml#ab7f848fe1501deb9257a041f1fac0b44) (std::string const &amp;label=[labels::time](structansys_1_1dpf_1_1labels.xhtml#a22ee1a5e3be8ad98c20c5ca52e247914)) const void [setSupport](classansys_1_1dpf_1_1FieldsContainer.xhtml#afdd882211d61a75c92fbc18a9e813113) ([ansys::dpf::Support](classansys_1_1dpf_1_1Support.xhtml) const &amp;[support](classansys_1_1dpf_1_1FieldsContainer.xhtml#ab7f848fe1501deb9257a041f1fac0b44), std::string const &amp;label=[labels::time](structansys_1_1dpf_1_1labels.xhtml#a22ee1a5e3be8ad98c20c5ca52e247914)) void [setSupport](classansys_1_1dpf_1_1FieldsContainer.xhtml#a12fb445a1e6ec8e1dc05e2463fb17641) ([ansys::dpf::TimeFreqSupport](classansys_1_1dpf_1_1TimeFreqSupport.xhtml) const &amp;[support](classansys_1_1dpf_1_1FieldsContainer.xhtml#ab7f848fe1501deb9257a041f1fac0b44), std::string const &amp;label=[labels::time](structansys_1_1dpf_1_1labels.xhtml#a22ee1a5e3be8ad98c20c5ca52e247914)) [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) [createSubFieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml#a218a256c1ff051e4c3b9e979f1af3599) ([LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;lab\_space) const std::string [name](classansys_1_1dpf_1_1FieldsContainer.xhtml#a760ef1dc58e7a70fe2b7367f552f7cef) () const void [setName](classansys_1_1dpf_1_1FieldsContainer.xhtml#ad1a087694be9c5bed7a8f2b5d16b89b8) (std::string [name](classansys_1_1dpf_1_1FieldsContainer.xhtml#a760ef1dc58e7a70fe2b7367f552f7cef)) [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) [id](classansys_1_1dpf_1_1FieldsContainer.xhtml#a3e262e4f6ade30a6a42198a117839751) () const void [setId](classansys_1_1dpf_1_1FieldsContainer.xhtml#a18bc8706153e4f3bd44c1a0476fa40e2) ([dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) [id](classansys_1_1dpf_1_1FieldsContainer.xhtml#a3e262e4f6ade30a6a42198a117839751)) [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) [deep\_copy](classansys_1_1dpf_1_1FieldsContainer.xhtml#a7292a30f43f3d0276829f2a704569304) ([ansys::dpf::Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client=nullptr) const ![-](/sites/default/files/migrate-content/dpf_cpp_client_library_2024_r1/closed.png) Public Member Functions inherited from [ansys::dpf::DpfTypes](classansys_1_1dpf_1_1DpfTypes.xhtml)virtual bool [empty](classansys_1_1dpf_1_1DpfTypes.xhtml#a39cd546c42518e2332be8f287db95459) () const virtual bool [hasInternalObject](classansys_1_1dpf_1_1DpfTypes.xhtml#ae198f89868d85c7db6dc1a934a1d3c15) () const virtual std::string [describe](classansys_1_1dpf_1_1DpfTypes.xhtml#a9977945710983bc03d2940fa007847b2) () const so::API const \* [callAPI](classansys_1_1dpf_1_1DpfTypes.xhtml#aea34d37e0c080126eff70db34bf46597) () const bool [isOnCommonAPI](classansys_1_1dpf_1_1DpfTypes.xhtml#a9f9789ff61cc9d400a2a344830706b73) () const bool [getClient](classansys_1_1dpf_1_1DpfTypes.xhtml#a968afd9daa0b0f13b65a2ac61369d73a) ([Client](classansys_1_1dpf_1_1Client.xhtml) &amp;client) const bool [hasBeenMovedLocally](classansys_1_1dpf_1_1DpfTypes.xhtml#a1a5634202c15404b6b24e8f50e51cb66) () const bool [isSameObject](classansys_1_1dpf_1_1DpfTypes.xhtml#aa64d5f8fcd7d85ad6ebf708494dbefd7) ([DpfTypes](classansys_1_1dpf_1_1DpfTypes.xhtml) const &amp;rhs) const ## <a id="pub-static-methods" name="pub-static-methods"></a>Static Public Member Functions

static [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) [emptyFieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml#af4bcbf19662088a80192c4306e76eab9) () <a id="details" name="details"></a>## Detailed Description

Contains a group of fields.

[FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) is a group of fields, used mainly in transient, harmonic, modal or multi-steps static analysis, where we can have a field for each time step or for each frequency. Consequently the fields container can describle a complete analysis with all its details.

The fields container is designed as a set of fields ordered through labels and ids. Labels identify how the fields are filtered. The most common fields container have the label "time" with ids corresponding to each time sets, the label "complex" will allow to separate real parts (id=0) from imaginary parts (id=1) in a harmonic analysis.

See also[Using collections and labels](group__group__12.xhtml) Examples[AveragingTest.cpp](AveragingTest_8cpp-example.xhtml#_a6), [CompleteRST.cpp](CompleteRST_8cpp-example.xhtml#_a29), [DataApis.cpp](DataApis_8cpp-example.xhtml#_a37), [DataExport.cpp](DataExport_8cpp-example.xhtml#_a4), [ModelTest.cpp](ModelTest_8cpp-example.xhtml#_a44), [OperatorsApis.cpp](OperatorsApis_8cpp-example.xhtml#_a5), [ResultTest.cpp](ResultTest_8cpp-example.xhtml#_a22), and [WorkflowExamples.cpp](WorkflowExamples_8cpp-example.xhtml#_a5).

## Constructor &amp; Destructor Documentation

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

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

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

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

Create a collection of fields 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 fields. 



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

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

Retrieve an existing instance of [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml "Contains a group of fields.") on a server.

Parameters \[in\]idId of the [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml "Contains a group of fields.") 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="a22e1ed19ab76ad96df74d2084c9ea4f4" name="a22e1ed19ab76ad96df74d2084c9ea4f4"></a>## [◆ ](#a22e1ed19ab76ad96df74d2084c9ea4f4)FieldsContainer() \[4/4\]

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

Create a collection of fields with the given labels.

Parameters \[in\]labelsLabels for fields. 



## Member Function Documentation

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

 void ansys::dpf::FieldsContainer::add  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *lab\_space*,    [Field](classansys_1_1dpf_1_1Field.xhtml) const &amp;  *f*   ) 

Add [Field](classansys_1_1dpf_1_1Field.xhtml) to [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml).

Parameters \[in\]lab\_space[LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) to which to add [Field](classansys_1_1dpf_1_1Field.xhtml). \[in\]f[Field](classansys_1_1dpf_1_1Field.xhtml) to add to [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml). Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a42), and [DataExport.cpp](DataExport_8cpp-example.xhtml#a34).



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

 void ansys::dpf::FieldsContainer::addLabel  ( std::string const &amp;  *label*) 

Add new label to field.

Parameters \[in\]labelNew label. Examples[DataExport.cpp](DataExport_8cpp-example.xhtml#a33).



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

 void ansys::dpf::FieldsContainer::addLabel  ( std::string const &amp;  *label*,    [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e)  *default\_value*   ) 

Add new label with value.

Parameters \[in\]labelNew label. \[in\]default\_valueValue of label. 



<a id="a9e099c6e48bb4786e95168f1e69a635f" name="a9e099c6e48bb4786e95168f1e69a635f"></a>## [◆ ](#a9e099c6e48bb4786e95168f1e69a635f)addLabels()

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

Add vector of labels to field.

Parameters \[in\]labelsVector of labels to add. Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a38).



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

 [Field](classansys_1_1dpf_1_1Field.xhtml) ansys::dpf::FieldsContainer::at  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *index*) 

Get field at index.

Returns[Field](classansys_1_1dpf_1_1Field.xhtml) given by index. Parameters \[in\]indexIndex of field within container. Examples[AveragingTest.cpp](AveragingTest_8cpp-example.xhtml#a8), and [CompleteRST.cpp](CompleteRST_8cpp-example.xhtml#a32).



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

 const [Field](classansys_1_1dpf_1_1Field.xhtml) ansys::dpf::FieldsContainer::at  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *index*)  const

Get field at index.

Returns[Field](classansys_1_1dpf_1_1Field.xhtml) given by index. Parameters \[in\]indexIndex of field. 



<a id="a218a256c1ff051e4c3b9e979f1af3599" name="a218a256c1ff051e4c3b9e979f1af3599"></a>## [◆ ](#a218a256c1ff051e4c3b9e979f1af3599)createSubFieldsContainer()

 [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) ansys::dpf::FieldsContainer::createSubFieldsContainer  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *lab\_space*)  const

Create a new fields container with all the fields corresponding to the label space in input.

ReturnsCreated fields container. Parameters \[in\]lab\_space[LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) from which to get fields. 



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

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

Create a new [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml "Contains a group of fields.") on a server by copying all the data of this [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml "Contains a group of fields.").

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



<a id="af4bcbf19662088a80192c4306e76eab9" name="af4bcbf19662088a80192c4306e76eab9"></a>## [◆ ](#af4bcbf19662088a80192c4306e76eab9)emptyFieldsContainer()

 static [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) ansys::dpf::FieldsContainer::emptyFieldsContainer  ( )   static 

Create an empty fields container.

ReturnsEmpty [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml). Examples[DataExport.cpp](DataExport_8cpp-example.xhtml#a42).



<a id="aeb12b6212b016653f1eb325f19a9d1ce" name="aeb12b6212b016653f1eb325f19a9d1ce"></a>## [◆ ](#aeb12b6212b016653f1eb325f19a9d1ce)getField()

 [Field](classansys_1_1dpf_1_1Field.xhtml) ansys::dpf::FieldsContainer::getField  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *lab\_space*)  const

ReturnsFirst [Field](classansys_1_1dpf_1_1Field.xhtml) given by [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) Parameters \[in\]lab\_space[LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) for which to get field. Examples[DataExport.cpp](DataExport_8cpp-example.xhtml#a37).



<a id="aaa1bd58f282cf7e3bebb1fd1cfe6adbc" name="aaa1bd58f282cf7e3bebb1fd1cfe6adbc"></a>## [◆ ](#aaa1bd58f282cf7e3bebb1fd1cfe6adbc)getFields()

 std::vector&lt; [Field](classansys_1_1dpf_1_1Field.xhtml) &gt; ansys::dpf::FieldsContainer::getFields  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *lab\_space*)  const

ReturnsFields given by [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) Parameters \[in\]lab\_space[LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) for which to get fields. 



<a id="a45536132d19f7a61af3ff18e660ad8de" name="a45536132d19f7a61af3ff18e660ad8de"></a>## [◆ ](#a45536132d19f7a61af3ff18e660ad8de)getFieldsForTimeId()

 std::vector&lt; [Field](classansys_1_1dpf_1_1Field.xhtml) &gt; ansys::dpf::FieldsContainer::getFieldsForTimeId  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *time\_id*,    [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *complex\_id* = `0`   )  const

ReturnsReal or imaginary (by default real) Fields at given time set. Parameters \[in\]time\_idTime Set Id (1 to # of time sets). \[in\]complex\_idFlag indicating to return imaginary part of result (0 = real part, 1 = imaginary part). 



<a id="a3a8ce9d9bf9a5ad8e4e3efb22d224cef" name="a3a8ce9d9bf9a5ad8e4e3efb22d224cef"></a>## [◆ ](#a3a8ce9d9bf9a5ad8e4e3efb22d224cef)getFieldsIndeces()

 std::vector&lt; int &gt; ansys::dpf::FieldsContainer::getFieldsIndeces  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *lab\_space*)  const

Returns[Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.") indices for field given by [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) Parameters \[in\]lab\_space[LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) defining field for which to get indices. 



<a id="add7a3418e9a0efb753d0c48d0359a261" name="add7a3418e9a0efb753d0c48d0359a261"></a>## [◆ ](#add7a3418e9a0efb753d0c48d0359a261)getLabelSpace()

 [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) ansys::dpf::FieldsContainer::getLabelSpace  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *index*)  const

Returns[LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) for given field index. Parameters \[in\]indexIndex of field. 



<a id="a8daf89e0cf634d805ab5d476c20fd608" name="a8daf89e0cf634d805ab5d476c20fd608"></a>## [◆ ](#a8daf89e0cf634d805ab5d476c20fd608)getSizeFor()

 [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) ansys::dpf::FieldsContainer::getSizeFor  ( [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) const &amp;  *lab\_space*)  const

ReturnsNumber of fields for given [LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml). Parameters \[in\]lab\_space[LabelSpace](classansys_1_1dpf_1_1LabelSpace.xhtml) for which to get number of fields. 



<a id="ac73c0843a3b6ed0604428a21a9be416f" name="ac73c0843a3b6ed0604428a21a9be416f"></a>## [◆ ](#ac73c0843a3b6ed0604428a21a9be416f)hasLabel()

 bool ansys::dpf::FieldsContainer::hasLabel  ( std::string const &amp;  *label*)  const

ReturnsIndication that [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml) has field given by label. Parameters \[in\]label[Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.") label. 



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

 [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) ansys::dpf::FieldsContainer::id  ( )  const

ReturnsId of [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml). 



<a id="acf312b3596240066b8f1371989ef61fd" name="acf312b3596240066b8f1371989ef61fd"></a>## [◆ ](#acf312b3596240066b8f1371989ef61fd)labels()

 std::vector&lt; std::string &gt; ansys::dpf::FieldsContainer::labels  ( )  const

ReturnsVector of labels of fields container. 



<a id="afd031defd3088051030347232478ee35" name="afd031defd3088051030347232478ee35"></a>## [◆ ](#afd031defd3088051030347232478ee35)labelScoping()

 [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) ansys::dpf::FieldsContainer::labelScoping  ( std::string const &amp;  *label*)  const

Returns[Scoping](classansys_1_1dpf_1_1Scoping.xhtml) for field given by label. Parameters \[in\]label[Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.") for which to get scoping. 



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

 std::string ansys::dpf::FieldsContainer::name  ( )  const

ReturnsName of [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml). 



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

 [Field](classansys_1_1dpf_1_1Field.xhtml) ansys::dpf::FieldsContainer::operator\[\]  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *index*) 

Get field at index.

Returns[Field](classansys_1_1dpf_1_1Field.xhtml) given by index. Parameters \[in\]indexIndex of field within container. 



<a id="a83521da3efc008468f37f05153691696" name="a83521da3efc008468f37f05153691696"></a>## [◆ ](#a83521da3efc008468f37f05153691696)reserve()

 void ansys::dpf::FieldsContainer::reserve  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *size*) 

Reserve space for fields

Parameters \[in\]sizeNumber of fields for which to reserve space. 



<a id="a5790b17b68590cdecccc9642df172d39" name="a5790b17b68590cdecccc9642df172d39"></a>## [◆ ](#a5790b17b68590cdecccc9642df172d39)resize()

 void ansys::dpf::FieldsContainer::resize  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *size*) 

Resize container to given size.

Parameters \[in\]sizeSet container to number of fields. 



<a id="a18bc8706153e4f3bd44c1a0476fa40e2" name="a18bc8706153e4f3bd44c1a0476fa40e2"></a>## [◆ ](#a18bc8706153e4f3bd44c1a0476fa40e2)setId()

 void ansys::dpf::FieldsContainer::setId  ( [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e)  *id*) 

Set Id of [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml).

Parameters \[in\]idNew id. 



<a id="ad1a087694be9c5bed7a8f2b5d16b89b8" name="ad1a087694be9c5bed7a8f2b5d16b89b8"></a>## [◆ ](#ad1a087694be9c5bed7a8f2b5d16b89b8)setName()

 void ansys::dpf::FieldsContainer::setName  ( std::string  *name*) 

Set name of [FieldsContainer](classansys_1_1dpf_1_1FieldsContainer.xhtml).

Parameters \[in\]nameNew name. 



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

 void ansys::dpf::FieldsContainer::setSupport  ( [ansys::dpf::Support](classansys_1_1dpf_1_1Support.xhtml) const &amp;  *support*,    std::string const &amp;  *label* = `<a class="el" href="structansys_1_1dpf_1_1labels.xhtml#a22ee1a5e3be8ad98c20c5ca52e247914">labels::time</a>`   ) 

Set [Support](classansys_1_1dpf_1_1Support.xhtml) for given label.

Parameters \[in\]support[Support](classansys_1_1dpf_1_1Support.xhtml) value. \[in\]label[Label](structansys_1_1dpf_1_1Label.xhtml) for which to set support. Examples[DataExport.cpp](DataExport_8cpp-example.xhtml#a35).



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

 void ansys::dpf::FieldsContainer::setSupport  ( [ansys::dpf::TimeFreqSupport](classansys_1_1dpf_1_1TimeFreqSupport.xhtml) const &amp;  *support*,    std::string const &amp;  *label* = `<a class="el" href="structansys_1_1dpf_1_1labels.xhtml#a22ee1a5e3be8ad98c20c5ca52e247914">labels::time</a>`   ) 

Set [TimeFreqSupport](classansys_1_1dpf_1_1TimeFreqSupport.xhtml) for given label.

Parameters \[in\]support[Support](classansys_1_1dpf_1_1Support.xhtml) value. \[in\]label[Label](structansys_1_1dpf_1_1Label.xhtml) for which to set support. 



<a id="a0f93949d1256055fd0a85a70cd62aab4" name="a0f93949d1256055fd0a85a70cd62aab4"></a>## [◆ ](#a0f93949d1256055fd0a85a70cd62aab4)size()

 [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) ansys::dpf::FieldsContainer::size  ( )  const

Get Number of fields in container.

ReturnsNumber of fields. Examples[AveragingTest.cpp](AveragingTest_8cpp-example.xhtml#a33), [DataExport.cpp](DataExport_8cpp-example.xhtml#a47), [ModelTest.cpp](ModelTest_8cpp-example.xhtml#a46), and [ResultTest.cpp](ResultTest_8cpp-example.xhtml#a24).



<a id="ab7f848fe1501deb9257a041f1fac0b44" name="ab7f848fe1501deb9257a041f1fac0b44"></a>## [◆ ](#ab7f848fe1501deb9257a041f1fac0b44)support()

 [Support](classansys_1_1dpf_1_1Support.xhtml) ansys::dpf::FieldsContainer::support  ( std::string const &amp;  *label* = `<a class="el" href="structansys_1_1dpf_1_1labels.xhtml#a22ee1a5e3be8ad98c20c5ca52e247914">labels::time</a>`)  const

Returns[Support](classansys_1_1dpf_1_1Support.xhtml) for given label. Parameters \[in\]label[Label](structansys_1_1dpf_1_1Label.xhtml) for which to get [Support](classansys_1_1dpf_1_1Support.xhtml). Examples[DataExport.cpp](DataExport_8cpp-example.xhtml#a48).



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

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

Update [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.") at index

Parameters \[in\]fNew field data. \[in\]indexIndex of field within container.