    

 ## On this page

  

 

 # ansys::dpf::Field Class Reference

 Last update: 16.07.2025 

Data for an entity. [More...](classansys_1_1dpf_1_1Field.xhtml#details)

`#include <dpf_api.h>`

Inheritance diagram for ansys::dpf::Field:

 ![](/sites/default/files/migrate-content/dpf_cpp_client_library_2023_r2/classansys_1_1dpf_1_1Field.png)



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

 [Field](classansys_1_1dpf_1_1Field.xhtml#a5b349cc76039499cc2e45a4b59ff391c) (int reserved\_number\_of\_entity=0, const std::vector&lt; int &gt; &amp;dimensions={ 1 }, const [Location](structansys_1_1dpf_1_1Location.xhtml) &amp;loc=[locations::nodal](structansys_1_1dpf_1_1locations.xhtml#aa4e1967b0838d8597200c606c8564d29))  [Field](classansys_1_1dpf_1_1Field.xhtml#a1a7812deadb92b60a8ad382111793e55) ([Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client, int reserved\_number\_of\_entity=0, const std::vector&lt; int &gt; &amp;dimensions={ 1 }, const [Location](structansys_1_1dpf_1_1Location.xhtml) &amp;loc=[locations::nodal](structansys_1_1dpf_1_1locations.xhtml#aa4e1967b0838d8597200c606c8564d29))  [Field](classansys_1_1dpf_1_1Field.xhtml#a613eb66562508f1a4bf9d60cbda5f51e) (int id, [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client) <a id="abf1d82af297ab49ec938a14f150cc944" name="abf1d82af297ab49ec938a14f150cc944"></a> **Field** ([Field](classansys_1_1dpf_1_1Field.xhtml) const &amp;) <a id="aac8eeb1e52d0b92760d4b14a4a3e62df" name="aac8eeb1e52d0b92760d4b14a4a3e62df"></a> **Field** ([Field](classansys_1_1dpf_1_1Field.xhtml) &amp;&amp;) <a id="a3cedbbb5ad9cf1e8ee8a99ddb537c5c1" name="a3cedbbb5ad9cf1e8ee8a99ddb537c5c1"></a>[Field](classansys_1_1dpf_1_1Field.xhtml) &amp; **operator=** ([Field](classansys_1_1dpf_1_1Field.xhtml) const &amp;) <a id="a2a3e99abf9217b7db8b320931e779f40" name="a2a3e99abf9217b7db8b320931e779f40"></a>[Field](classansys_1_1dpf_1_1Field.xhtml) &amp; **operator=** ([Field](classansys_1_1dpf_1_1Field.xhtml) &amp;&amp;) bool [identicalPointers](classansys_1_1dpf_1_1Field.xhtml#a89f7fdf190bfa038716dfe935de0600f) ([Field](classansys_1_1dpf_1_1Field.xhtml) const &amp;f) const [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [numberOfComponents](classansys_1_1dpf_1_1Field.xhtml#a70f7cda2d633297489b91de6761fd625) () const [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [numberOfEntities](classansys_1_1dpf_1_1Field.xhtml#aad1f933384be1117a1338c0563cdefc0) () const [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [numberOfElementaryData](classansys_1_1dpf_1_1Field.xhtml#aad232d58b75a9171de077b48865ef317) () const [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [numberOfElementaryDataByEntityIndex](classansys_1_1dpf_1_1Field.xhtml#ae1f8f67e890a35211cbc6b260598731c) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) entityIndex) const [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [numberOfElementaryDataByEntityId](classansys_1_1dpf_1_1Field.xhtml#aacac972372720f98b3ae69c296e80c5c) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [entityId](classansys_1_1dpf_1_1Field.xhtml#ad183afaa6ffbe34608e271e2c2c05f86)) const [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) [dataSize](classansys_1_1dpf_1_1Field.xhtml#a9bb7ac154ee6720cbb98b1c09e056942) () const std::string [name](classansys_1_1dpf_1_1Field.xhtml#a64744679ebb47624268eb77552dac2c1) () const void [setName](classansys_1_1dpf_1_1Field.xhtml#a79553d0764c52a5b8162c3ba4e61b97b) (const std::string &amp;[name](classansys_1_1dpf_1_1Field.xhtml#a64744679ebb47624268eb77552dac2c1)) [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*const [data](classansys_1_1dpf_1_1Field.xhtml#a0967a8c6cee105a679dd1151a5d41004) (int &amp;size) const [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; double &gt; [data](classansys_1_1dpf_1_1Field.xhtml#ad435429e8f1b152c7b4dad665665d9a4) () const [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; int &gt; [dataPointer](classansys_1_1dpf_1_1Field.xhtml#a47656e1ead80a6f2cac7c21266429212) () const void [getData](classansys_1_1dpf_1_1Field.xhtml#a3acedce4650d3f5671aa1dec3bba92ad) (std::vector&lt; [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) &gt; &amp;data\_to\_fill) const [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*const [entityData](classansys_1_1dpf_1_1Field.xhtml#a1312be4b895a62a391eb66865897d27c) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) entity\_index, [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) &amp;size) const void [entityData](classansys_1_1dpf_1_1Field.xhtml#a025c29d3369376e0b22bcfb098a12776) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) entity\_index, [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; double &gt; &amp;[data](classansys_1_1dpf_1_1Field.xhtml#a0967a8c6cee105a679dd1151a5d41004)) const [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*const [entityDataById](classansys_1_1dpf_1_1Field.xhtml#a50ed01d59770f646c41777d496e0ff9c) ([dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) entity\_id, [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) &amp;size) const void [entityDataById](classansys_1_1dpf_1_1Field.xhtml#a076c79e9088dc22be2e2a5ccb23aa683) ([dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) entity\_id, [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; double &gt; &amp;[data](classansys_1_1dpf_1_1Field.xhtml#a0967a8c6cee105a679dd1151a5d41004)) const [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) [entityId](classansys_1_1dpf_1_1Field.xhtml#ad183afaa6ffbe34608e271e2c2c05f86) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) entity\_index) const [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) [scoping](classansys_1_1dpf_1_1Field.xhtml#aa16920741c1432c16e46ec6da26b3f04) () const [FieldDefinition](classansys_1_1dpf_1_1FieldDefinition.xhtml) [fieldDefinition](classansys_1_1dpf_1_1Field.xhtml#a860e65caa16f612746ad116429282fd3) () const [Support](classansys_1_1dpf_1_1Support.xhtml) [support](classansys_1_1dpf_1_1Field.xhtml#a773481e9f7efb04d74c72be914b317d6) () const void [setFieldDefinition](classansys_1_1dpf_1_1Field.xhtml#a471c3f541458acc9c05dfb019a99abb3) ([FieldDefinition](classansys_1_1dpf_1_1FieldDefinition.xhtml) const &amp;f) void [setScoping](classansys_1_1dpf_1_1Field.xhtml#a5220cacdfcd50fca2d5108734e1432df) ([ansys::dpf::Scoping](classansys_1_1dpf_1_1Scoping.xhtml) const &amp;s) void [setData](classansys_1_1dpf_1_1Field.xhtml#a9f7828d92496843cc5f15ee9e32f6c4a) (std::vector&lt; double &gt; const &amp;[data](classansys_1_1dpf_1_1Field.xhtml#a0967a8c6cee105a679dd1151a5d41004)) void [setData](classansys_1_1dpf_1_1Field.xhtml#ab53cf7a45c6c86b630674a1ee8935612) (double const \*const [data](classansys_1_1dpf_1_1Field.xhtml#a0967a8c6cee105a679dd1151a5d41004), int size) void [setDataPointer](classansys_1_1dpf_1_1Field.xhtml#ae41503c5a4a91ae422b359234fb30363) (std::vector&lt; int &gt; &amp;[data](classansys_1_1dpf_1_1Field.xhtml#a0967a8c6cee105a679dd1151a5d41004)) const void [setDataPointer](classansys_1_1dpf_1_1Field.xhtml#a9079f65aeb2e8b685d554f83826d45b8) (int const \*const [data](classansys_1_1dpf_1_1Field.xhtml#a0967a8c6cee105a679dd1151a5d41004), int size) const void [setSupport](classansys_1_1dpf_1_1Field.xhtml#ab71f825765a7ce1b37373443917ec23e) ([ansys::dpf::Support](classansys_1_1dpf_1_1Support.xhtml) const &amp;s) void [setSupport](classansys_1_1dpf_1_1Field.xhtml#a14d300919db7ae24a917af9e1262cea3) ([ansys::dpf::TimeFreqSupport](classansys_1_1dpf_1_1TimeFreqSupport.xhtml) const &amp;s) void [setSupport](classansys_1_1dpf_1_1Field.xhtml#ae846597f402a69d4d78d5c8b5e80d219) ([ansys::dpf::MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) const &amp;s) void [reserve](classansys_1_1dpf_1_1Field.xhtml#a3ac63a716581db77e88fa898befb1139) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) number\_of\_entities, [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) overall\_size=0) void [resize](classansys_1_1dpf_1_1Field.xhtml#a83962ecd81cbcbf54fde2d101ec01106) ([dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) number\_of\_entities, [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) overall\_size) void [fillCursor](classansys_1_1dpf_1_1Field.xhtml#a96f5eeb13fb81117d3a096e5da245eab) ([dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920) index, [FieldCursor](classansys_1_1dpf_1_1FieldCursor.xhtml) &amp;f) const void [push\_back](classansys_1_1dpf_1_1Field.xhtml#a5b717ed309ddf287134905f71ada833b) ([dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) entity\_id, std::vector&lt; [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) &gt; const &amp;values) void [push\_back](classansys_1_1dpf_1_1Field.xhtml#aae349d3de14b42f8b238f194db139fbc) ([dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) entity\_id, const [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*values, int size) void [push\_back](classansys_1_1dpf_1_1Field.xhtml#ab387a8da1a2dc0ea0f94ba7c9cc4419f) ([dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) entity\_id, [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*values, int size) [Field](classansys_1_1dpf_1_1Field.xhtml) [deep\_copy](classansys_1_1dpf_1_1Field.xhtml#aab82032844ca177841de8c3011dab297) ([ansys::dpf::Client](classansys_1_1dpf_1_1Client.xhtml) const \*const client) const [Field](classansys_1_1dpf_1_1Field.xhtml) [deep\_copy](classansys_1_1dpf_1_1Field.xhtml#aa838791f5e7d7a272b9fbe441d7e4a4f) () const ![-](/sites/default/files/migrate-content/dpf_cpp_client_library_2023_r2/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 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 [Field](classansys_1_1dpf_1_1Field.xhtml) [emptyField](classansys_1_1dpf_1_1Field.xhtml#a5b60dee96313f0f9791c11e1c7f58d5b) () <a id="details" name="details"></a>## Detailed Description

Data for an entity.

The field is the main simulation data container. In numerical simulations, results data are defined by values associated to entities (scoping), and these entities are a subset of a model (support). In DPF, field data is always associated to its scoping and support, making the field a self-describing piece of data. A field is also defined by its dimensionnality, unit, location... A field can for example, describe a displacement vector or norm, stresses and strains tensors, stresses and strains equivalent, min max over time of any result... It can be defined on a complete model or just on certain entities of the model thanks to its scoping. The data is stored as a vector of double values and each elementary entity has a number of components (thanks to the dimensionality, a displacement will have 3 components, a symmetrical stress matrix 6...)

Examples[CompleteRST.cpp](CompleteRST_8cpp-example.xhtml#_a31), [DataApis.cpp](DataApis_8cpp-example.xhtml#_a14), [DataExport.cpp](DataExport_8cpp-example.xhtml#_a17), [ModelTest.cpp](ModelTest_8cpp-example.xhtml#_a5), [OperatorsApis.cpp](OperatorsApis_8cpp-example.xhtml#_a13), and [WorkflowExamples.cpp](WorkflowExamples_8cpp-example.xhtml#_a10).

## Constructor &amp; Destructor Documentation

<a id="a5b349cc76039499cc2e45a4b59ff391c" name="a5b349cc76039499cc2e45a4b59ff391c"></a>## [◆ ](#a5b349cc76039499cc2e45a4b59ff391c)Field() \[1/3\]

 ansys::dpf::Field::Field  ( int  *reserved\_number\_of\_entity* = `0`,    const std::vector&lt; int &gt; &amp;  *dimensions* = `{ 1 }`,    const [Location](structansys_1_1dpf_1_1Location.xhtml) &amp;  *loc* = `<a class="el" href="structansys_1_1dpf_1_1locations.xhtml#aa4e1967b0838d8597200c606c8564d29">locations::nodal</a>`   ) 

Create a group of data with given dimensions and locations.

Parameters \[in\]reserved\_number\_of\_entityNumber of entities. \[in\]dimensionsDimension of each entity. \[in\]loc[Location](structansys_1_1dpf_1_1Location.xhtml "User defined location quantity.") of entities. 



<a id="a1a7812deadb92b60a8ad382111793e55" name="a1a7812deadb92b60a8ad382111793e55"></a>## [◆ ](#a1a7812deadb92b60a8ad382111793e55)Field() \[2/3\]

 ansys::dpf::Field::Field  ( [Client](classansys_1_1dpf_1_1Client.xhtml) const \*const  *client*,    int  *reserved\_number\_of\_entity* = `0`,    const std::vector&lt; int &gt; &amp;  *dimensions* = `{ 1 }`,    const [Location](structansys_1_1dpf_1_1Location.xhtml) &amp;  *loc* = `<a class="el" href="structansys_1_1dpf_1_1locations.xhtml#aa4e1967b0838d8597200c606c8564d29">locations::nodal</a>`   ) 

Create a group of data with given dimensions and locations on a server.

Parameters \[in\]clientRemote client. \[in\]reserved\_number\_of\_entityNumber of entities. \[in\]dimensionsDimension of each entity. \[in\]loc[Location](structansys_1_1dpf_1_1Location.xhtml "User defined location quantity.") of entities. 



<a id="a613eb66562508f1a4bf9d60cbda5f51e" name="a613eb66562508f1a4bf9d60cbda5f51e"></a>## [◆ ](#a613eb66562508f1a4bf9d60cbda5f51e)Field() \[3/3\]

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

Retrieve an existing instance of [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.") on a server.

Parameters \[in\]idId of the [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.") object on the server's database. \[in\]client[Client](classansys_1_1dpf_1_1Client.xhtml) instance designating the IP, port and protocol to use. 



## Member Function Documentation

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

 [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; double &gt; ansys::dpf::Field::data  ( )  const

Returns[DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) of data array. 



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

 [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*const ansys::dpf::Field::data  ( int &amp;  *size*)  const

ReturnsPointer to data array. Parameters \[out\]sizeSize of returned data array. Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a28), [DataExport.cpp](DataExport_8cpp-example.xhtml#a25), [ModelTest.cpp](ModelTest_8cpp-example.xhtml#a31), and [OperatorsApis.cpp](OperatorsApis_8cpp-example.xhtml#a15).



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

 [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; int &gt; ansys::dpf::Field::dataPointer  ( )  const

Returns[DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) of data pointer array. 



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

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

ReturnsSize of the data container. Examples[DataExport.cpp](DataExport_8cpp-example.xhtml#a26), and [ModelTest.cpp](ModelTest_8cpp-example.xhtml#a7).



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

 [Field](classansys_1_1dpf_1_1Field.xhtml) ansys::dpf::Field::deep\_copy  ( )  const

Make a deep copy locally.





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

 [Field](classansys_1_1dpf_1_1Field.xhtml) ansys::dpf::Field::deep\_copy  ( [ansys::dpf::Client](classansys_1_1dpf_1_1Client.xhtml) const \*const  *client*)  const

Make a deep copy on a given client.

Parameters \[in\]clientRemote client 



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

 static [Field](classansys_1_1dpf_1_1Field.xhtml) ansys::dpf::Field::emptyField  ( )   static 

Create an empty [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.").

ReturnsEmpty [Field](classansys_1_1dpf_1_1Field.xhtml). 



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

 [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*const ansys::dpf::Field::entityData  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *entity\_index*,    [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) &amp;  *size*   )  const

ReturnsPointer to data array of an entity, by index. Parameters \[in\]entity\_indexIndex of entity for which to get data. \[out\]sizeSize of returned data array. Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a29).



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

 void ansys::dpf::Field::entityData  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *entity\_index*,    [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; double &gt; &amp;  *data*   )  const

Returns[DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) of data array of an entity, by index. Parameters \[in\]entity\_indexIndex of entity for which to get data. \[out\]dataPointer to the data. 



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

 [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*const ansys::dpf::Field::entityDataById  ( [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e)  *entity\_id*,    [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) &amp;  *size*   )  const

ReturnsPointer to data array of an entity, by id. Parameters \[in\]entity\_idId of entity for which to get data. \[out\]sizeSize of returned data array. Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a30).



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

 void ansys::dpf::Field::entityDataById  ( [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e)  *entity\_id*,    [DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml)&lt; double &gt; &amp;  *data*   )  const

Returns[DpfVector](classansys_1_1dpf_1_1DpfVector.xhtml) of data array of an entity, by id. Parameters \[in\]entity\_idId of entity for which to get data. \[out\]dataPointer to the data. 



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

 [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e) ansys::dpf::Field::entityId  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *entity\_index*)  const

ReturnsEntity id corresponding to a given entity index Parameters \[in\]entity\_indexIndex of entity for which to get Id. 



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

 [FieldDefinition](classansys_1_1dpf_1_1FieldDefinition.xhtml) ansys::dpf::Field::fieldDefinition  ( )  const

Returns[FieldDefinition](classansys_1_1dpf_1_1FieldDefinition.xhtml) of the field. Examples[AveragingTest.cpp](AveragingTest_8cpp-example.xhtml#a9), [DataApis.cpp](DataApis_8cpp-example.xhtml#a21), and [DataExport.cpp](DataExport_8cpp-example.xhtml#a21).



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

 void ansys::dpf::Field::fillCursor  ( [dp\_index](namespaceansys_1_1dpf.xhtml#a417548d1b705a9ba54ba9429afe68920)  *index*,    [FieldCursor](classansys_1_1dpf_1_1FieldCursor.xhtml) &amp;  *f*   )  const

Get data at a given index.

Parameters \[in\]indexIndex of entity for which to get data. \[out\]f[FieldCursor](classansys_1_1dpf_1_1FieldCursor.xhtml) with which to contain data. Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a32).



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

 void ansys::dpf::Field::getData  ( std::vector&lt; [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) &gt; &amp;  *data\_to\_fill*)  const

Copy the data for all entities in a vector of double.

Parameters \[out\]data\_to\_fillVector of data for all entities. 



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

 bool ansys::dpf::Field::identicalPointers  ( [Field](classansys_1_1dpf_1_1Field.xhtml) const &amp;  *f*)  const

Compare field with input field f.

Parameters \[in\]f[Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.") with which to compare. 



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

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

ReturnsName of [Field](classansys_1_1dpf_1_1Field.xhtml). 



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

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

ReturnsNumber of components in the elementary data. Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a25).



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

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

ReturnsNumber of elementary data (size = number of components) contained in the [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity."). 



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

 [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) ansys::dpf::Field::numberOfElementaryDataByEntityId  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *entityId*)  const

ReturnsNumber of elementary data by entity id. 



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

 [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0) ansys::dpf::Field::numberOfElementaryDataByEntityIndex  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *entityIndex*)  const

ReturnsNumber of elementary data by entity index. 



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

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

ReturnsNumber of entities in the [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity."). Only implemented for in process udage. For gRPC usage, use [scoping()](classansys_1_1dpf_1_1Field.xhtml#aa16920741c1432c16e46ec6da26b3f04).size(). 



<a id="aae349d3de14b42f8b238f194db139fbc" name="aae349d3de14b42f8b238f194db139fbc"></a>## [◆ ](#aae349d3de14b42f8b238f194db139fbc)push\_back() \[1/3\]

 void ansys::dpf::Field::push\_back  ( [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e)  *entity\_id*,    const [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*  *values*,    int  *size*   ) 

Push back the entity data.

Parameters \[in\]entity\_idIndex of entity for which to push data. \[in\]valuesPtr on data for entity. \[in\]sizeNumber of entities. 



<a id="ab387a8da1a2dc0ea0f94ba7c9cc4419f" name="ab387a8da1a2dc0ea0f94ba7c9cc4419f"></a>## [◆ ](#ab387a8da1a2dc0ea0f94ba7c9cc4419f)push\_back() \[2/3\]

 void ansys::dpf::Field::push\_back  ( [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e)  *entity\_id*,    [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) \*  *values*,    int  *size*   ) 

Push back the entity data.

Parameters \[in\]entity\_idIndex of entity for which to push data. \[in\]valuesPtr on data for entity. \[in\]sizeNumber of entities. 



<a id="a5b717ed309ddf287134905f71ada833b" name="a5b717ed309ddf287134905f71ada833b"></a>## [◆ ](#a5b717ed309ddf287134905f71ada833b)push\_back() \[3/3\]

 void ansys::dpf::Field::push\_back  ( [dp\_id](namespaceansys_1_1dpf.xhtml#ab4574c9af3f2bb8011da7d1f4c8da20e)  *entity\_id*,    std::vector&lt; [dp\_double](namespaceansys_1_1dpf.xhtml#acb480013bfed185b5e34a0bdcb0e3790) &gt; const &amp;  *values*   ) 

Push back the entity data.

Parameters \[in\]entity\_idIndex of entity for which to push data. \[in\]valuesVector of data for entity. Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a19).



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

 void ansys::dpf::Field::reserve  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *number\_of\_entities*,    [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *overall\_size* = `0`   ) 

Reserve the [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity."). Only implemented for in process udage. To reserve the size for gRPC usage, use the constructor.

Parameters \[in\]number\_of\_entitiesNumber of entities. \[in\]overall\_sizeTotal size of entity data. 



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

 void ansys::dpf::Field::resize  ( [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *number\_of\_entities*,    [dp\_int](namespaceansys_1_1dpf.xhtml#a60d181a1f9d29cc7cc38b25dac4401f0)  *overall\_size*   ) 

Reserve the [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.").

Parameters \[in\]number\_of\_entitiesNumber of entities. \[in\]overall\_sizeTotal size of entity data. 



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

 [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) ansys::dpf::Field::scoping  ( )  const

Returns[Scoping](classansys_1_1dpf_1_1Scoping.xhtml) of the field. Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a17), and [DataExport.cpp](DataExport_8cpp-example.xhtml#a27).



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

 void ansys::dpf::Field::setData  ( double const \*const  *data*,    int  *size*   ) 

Set the data of the field.

Parameters \[in\]dataList of data. \[in\]sizeSize of list. 



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

 void ansys::dpf::Field::setData  ( std::vector&lt; double &gt; const &amp;  *data*) 

Set the data of the field.

Parameters \[in\]dataVector of data. Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a18), and [OperatorsApis.cpp](OperatorsApis_8cpp-example.xhtml#a14).



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

 void ansys::dpf::Field::setDataPointer  ( int const \*const  *data*,    int  *size*   )  const

Set the data pointer of the field.

Parameters \[in\]dataList of data. \[in\]sizeSize of list. 



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

 void ansys::dpf::Field::setDataPointer  ( std::vector&lt; int &gt; &amp;  *data*)  const

Set the data pointer of the field.

Parameters \[in\]dataVector of data. 



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

 void ansys::dpf::Field::setFieldDefinition  ( [FieldDefinition](classansys_1_1dpf_1_1FieldDefinition.xhtml) const &amp;  *f*) 

Set the [FieldDefinition](classansys_1_1dpf_1_1FieldDefinition.xhtml).

Examples[DataApis.cpp](DataApis_8cpp-example.xhtml#a24).



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

 void ansys::dpf::Field::setName  ( const std::string &amp;  *name*) 

Set name of [Field](classansys_1_1dpf_1_1Field.xhtml).

Parameters \[in\]nameNew name. 



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

 void ansys::dpf::Field::setScoping  ( [ansys::dpf::Scoping](classansys_1_1dpf_1_1Scoping.xhtml) const &amp;  *s*) 

set the [Scoping](classansys_1_1dpf_1_1Scoping.xhtml) of the [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.").





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

 void ansys::dpf::Field::setSupport  ( [ansys::dpf::MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) const &amp;  *s*) 

Set the support of the [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.").

Parameters \[in\]s[MeshedRegion](classansys_1_1dpf_1_1MeshedRegion.xhtml) to support. 



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

 void ansys::dpf::Field::setSupport  ( [ansys::dpf::Support](classansys_1_1dpf_1_1Support.xhtml) const &amp;  *s*) 

Set the support of the [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.").

Parameters \[in\]s[Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.") to support. 



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

 void ansys::dpf::Field::setSupport  ( [ansys::dpf::TimeFreqSupport](classansys_1_1dpf_1_1TimeFreqSupport.xhtml) const &amp;  *s*) 

Set the support of the [Field](classansys_1_1dpf_1_1Field.xhtml "Data for an entity.").

Parameters \[in\]s[TimeFreqSupport](classansys_1_1dpf_1_1TimeFreqSupport.xhtml) to support. 



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

 [Support](classansys_1_1dpf_1_1Support.xhtml) ansys::dpf::Field::support  ( )  const

Returns[Support](classansys_1_1dpf_1_1Support.xhtml) of the field.