    

 ## On this page

  

 

 # Class ansys::dpf::CustomTypeField

 Last update: 25.03.2026 

<a id="classansys-dpf-customtypefield"></a>

![](https://img.shields.io/badge/language-C%2B%2B-blue "C++")![](https://img.shields.io/badge/-public-brightgreen "public")

Holds data located on given entities (the [Field](classansys-dpf-field.md#classansys-dpf-field)'s data is bounded with its scoping). The unitary data type can be chosen by the user (it can be int32, float, char...). Is the equivalent of the [Field](classansys-dpf-field.md#classansys-dpf-field) but with custom type values data. (and not double values).

**Inherits from**:

- [ansys::dpf::DpfTypes](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes)

## Members

- [addStringProperty](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a3ca5cbffa4bbe8c0e5e1d939b26f4f94)
- [callAPI](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1aea34d37e0c080126eff70db34bf46597)
- [cloneToCustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1ab2a21d596a016b4c26ca7c473bdeacbb)
- [cloneToField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1ad26abff54c365f24acc5478333fbf5e6)
- [cloneToPropertyField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a270f68abf019d27334dcccfbc1d4c2c9)
- [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a3f3bcfe7e41a277df9619b1aa57fa3f6)
- [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1ab406c3bad50d8560bd4e0122e5257516)
- [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a24749f43868490f570557f637e0f18d7)
- [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a5fc6284afa25d77a2d3c2d9476ae4890)
- [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1ab7ed23561c3de173edc279a7082959ce)
- [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a256a79d53f5c20515f42ab81d0c93ad4)
- [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1aa22f298ed933028ca623284a2966fbae)
- [data](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a0cfbce21104bd69617abc711be0ab2da)
- [dataPointer](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a58c899e74917dcbc48d90c9ed9d4a499)
- [dataSize](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a6563cb6e8c2c18961279c483e978d086)
- [deep\_copy](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a918343f671097069e91390acc73a9e83)
- [describe](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a9977945710983bc03d2940fa007847b2)
- [empty](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a39cd546c42518e2332be8f287db95459)
- [emptyCustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1aeff7d3639c760d711ebbc4d8deb9dceb)
- [entityData](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a82bad4fa98d5bae26ab4f4f85170e8ce)
- [entityDataById](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1aaf0626decc9970026265b871e403a49a)
- [fieldDefinition](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a20ed27c8f1a5e278b76160301c1d0e15)
- [getClient](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a968afd9daa0b0f13b65a2ac61369d73a)
- [getData](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a5d1e69ec2b7dd5476db37086e9860e35)
- [getHeaderAsDataTree](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1aab0e655a759fa2acf65e4cacee5a558b)
- [getStringProperty](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1adb7c358bfe17c43a2a7ed62634227d9b)
- [hasBeenMovedLocally](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a1a5634202c15404b6b24e8f50e51cb66)
- [hasInternalObject](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1ae198f89868d85c7db6dc1a934a1d3c15)
- [identicalPointers](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a68e070597207532f062a067d3fe81bde)
- [isOfUnitaryType](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1aaa87bd9510ed16d0038c738385932023)
- [isOnCommonAPI](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1a9f9789ff61cc9d400a2a344830706b73)
- [isSameObject](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1aa64d5f8fcd7d85ad6ebf708494dbefd7)
- [name](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1af9c06ed629af1d110016d3039908e2e4)
- [numberOfComponents](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a578a721aeee9907c35e366954d1354b9)
- [numberOfElementaryData](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a8708b9441d40eb600c33b734d3eb283c)
- [numberOfEntities](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1aa9e1da353050b2c8680bb16905093bbe)
- [operator=](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a1b45c053c45379dcbda125fd584bdf77)
- [operator=](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a8435711e90293d60fc13e45ff9775bb2)
- [push\_back](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a570a1b90c94c38350e28270376cfe840)
- [push\_back](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1ae709fae553fd2913b51bb0c27e18539c)
- [reserve](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a0387f74d0adb7e718e07311a05ac1e2d)
- [resize](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1ab8ae09255c5fb3b3ed8aa7e8c0c835cd)
- [resizeDataPointer](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a32ea47aaddf00c00a2d243567e3f2495)
- [scoping](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a042c55cecb14366c797e50d45d7309de)
- [setData](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a5ba412a54fefc3048596746369a0af9f)
- [setData](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a60880df78d5d536ba3317d36ce8dac25)
- [setDataPointer](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1ada28e8b7fbadb7a21f0b244bbcf6bf8a)
- [setDataPointer](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1aba81e2a4cb0c3559eed1189abddc52a3)
- [setFieldDefinition](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a3c0e7ea1d3e5eaf8feaa633d7bf88e87)
- [setHeaderAsDataTree](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a0f9c8db836e630abab6e914bfad781a2)
- [setName](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1aa4e89d6febec7ca3f83b6ab0dd505b6d)
- [setScoping](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a46281c0e95a5ea8aa038882f6b210f82)
- [setSupport](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a6cc095d24302187139b81ad7843d5835)
- [setSupport](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a1dc844fe2af7407a8333269be5cf99cd)
- [setSupport](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a686bc9eade56aa283e052f81da8fec9b)
- [support](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1ac395281a74f1a78df961f443a32648a1)
- [~CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a07dba2c5b6fccedaa06182c3b2749b22)
- [~DpfTypes](classansys-dpf-dpftypes.md#classansys-dpf-dpftypes-1ab7c83b6ea160c2b115e056f6c312112f)

## Friends

## Public static functions

<a id="classansys-dpf-customtypefield-1aeff7d3639c760d711ebbc4d8deb9dceb"></a>

### Function emptyCustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-static-lightgrey "static")

```cpp
static CustomTypeField ansys::dpf::CustomTypeField::emptyCustomTypeField()

```

**Return type**: CustomTypeField

## Public functions

<a id="classansys-dpf-customtypefield-1a07dba2c5b6fccedaa06182c3b2749b22"></a>

### Function ~CustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
virtual ansys::dpf::CustomTypeField::~CustomTypeField()

```

**Return type**:

<a id="classansys-dpf-customtypefield-1a3f3bcfe7e41a277df9619b1aa57fa3f6"></a>

### Function CustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ansys::dpf::CustomTypeField::CustomTypeField(Client const *const client, UnitaryDataType *, dp_int reserved_number_of_entities=0, dp_int reserved_num_unitary_data=0)

```

Create an empty custom type field with a client. The unitary data type will be UnitaryDataType. For example, use [ansys::dpf::CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield) f(ansys::dpf::UseType()).

**Parameters**:

- [Client](classansys-dpf-client.md#classansys-dpf-client) const \*const **client**: \[in\] [Client](classansys-dpf-client.md#classansys-dpf-client) to create the custom property field on.
- UnitaryDataType \*
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **reserved\_number\_of\_entities** = 0 : \[in\] Number of entities to reserve in the scoping.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **reserved\_num\_unitary\_data** = 0 : \[in\] Reserved size of data=reserved\_num\_unitary\_data\*unitary\_data\_num\_bytes.

**Return type**:

<a id="classansys-dpf-customtypefield-1ab406c3bad50d8560bd4e0122e5257516"></a>

### Function CustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ansys::dpf::CustomTypeField::CustomTypeField(UnitaryDataType *, dp_int reserved_number_of_entities=0, dp_int reserved_num_unitary_data=0)

```

Create a property with number of entities and data size. The unitary data type will be UnitaryDataType. For example, use [ansys::dpf::CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield) f(ansys::dpf::UseType()).

**Parameters**:

- UnitaryDataType \*
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **reserved\_number\_of\_entities** = 0 : \[in\] Number of entities to reserve in the scoping.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **reserved\_num\_unitary\_data** = 0 : \[in\] Reserved size of data=reserved\_num\_unitary\_data\*unitary\_data\_num\_bytes.

**Return type**:

<a id="classansys-dpf-customtypefield-1a24749f43868490f570557f637e0f18d7"></a>

### Function CustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ansys::dpf::CustomTypeField::CustomTypeField(Client const *const client, dp_int unitary_data_num_bytes, dp_int reserved_number_of_entities=0, dp_int reserved_num_unitary_data=0)

```

Create an empty custom type field with a client. The unitary data type will be of size unitary\_data\_num\_bytes.

**Parameters**:

- [Client](classansys-dpf-client.md#classansys-dpf-client) const \*const **client**: \[in\] [Client](classansys-dpf-client.md#classansys-dpf-client) to create the custom property field on.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **unitary\_data\_num\_bytes**: \[in\] Num bytes by unitary data.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **reserved\_number\_of\_entities** = 0 : \[in\] Number of entities to reserve in the scoping.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **reserved\_num\_unitary\_data** = 0 : \[in\] Reserved size of data=reserved\_num\_unitary\_data\*unitary\_data\_num\_bytes.

**Return type**:

<a id="classansys-dpf-customtypefield-1a5fc6284afa25d77a2d3c2d9476ae4890"></a>

### Function CustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ansys::dpf::CustomTypeField::CustomTypeField(dp_int unitary_data_num_bytes, dp_int reserved_number_of_entities=0, dp_int reserved_num_unitary_data=0)

```

Create a property with number of entities and data size. The unitary data type will be of size unitary\_data\_num\_bytes.

**Parameters**:

- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **unitary\_data\_num\_bytes**: \[in\] Num bytes by unitary data.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **reserved\_number\_of\_entities** = 0 : \[in\] Number of entities to reserve in the scoping.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **reserved\_num\_unitary\_data** = 0 : \[in\] Reserved size of data=reserved\_num\_unitary\_data\*unitary\_data\_num\_bytes.

**Return type**:

<a id="classansys-dpf-customtypefield-1ab7ed23561c3de173edc279a7082959ce"></a>

### Function CustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ansys::dpf::CustomTypeField::CustomTypeField(int id, Client const *const client)

```

Retrieve an existing instance of [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield) on a server.

**Parameters**:

- int **id**: \[in\] Id of the [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield) object on the server's database.
- [Client](classansys-dpf-client.md#classansys-dpf-client) const \*const **client**: \[in\] [Client](classansys-dpf-client.md#classansys-dpf-client) instance designating the IP, port and protocol to use.

**Return type**:

<a id="classansys-dpf-customtypefield-1a256a79d53f5c20515f42ab81d0c93ad4"></a>

### Function CustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ansys::dpf::CustomTypeField::CustomTypeField(CustomTypeField const &)

```

**Parameters**:

- CustomTypeField const &amp;

**Return type**:

<a id="classansys-dpf-customtypefield-1aa22f298ed933028ca623284a2966fbae"></a>

### Function CustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
ansys::dpf::CustomTypeField::CustomTypeField(CustomTypeField &&) noexcept

```

**Parameters**:

- CustomTypeField &amp;&amp;

**Return type**:

<a id="classansys-dpf-customtypefield-1a1b45c053c45379dcbda125fd584bdf77"></a>

### Function operator=

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
CustomTypeField & ansys::dpf::CustomTypeField::operator=(CustomTypeField const &)

```

**Parameters**:

- CustomTypeField const &amp;

**Return type**: CustomTypeField &amp;

<a id="classansys-dpf-customtypefield-1a8435711e90293d60fc13e45ff9775bb2"></a>

### Function operator=

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
CustomTypeField & ansys::dpf::CustomTypeField::operator=(CustomTypeField &&) noexcept

```

**Parameters**:

- CustomTypeField &amp;&amp;

**Return type**: CustomTypeField &amp;

<a id="classansys-dpf-customtypefield-1a68e070597207532f062a067d3fe81bde"></a>

### Function identicalPointers

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
bool ansys::dpf::CustomTypeField::identicalPointers(CustomTypeField const &f) const

```

Compare field with input field f.

**Parameters**:

- CustomTypeField const &amp; **f**: \[in\] [Field](classansys-dpf-field.md#classansys-dpf-field) with which to compare.

**Return type**: bool

<a id="classansys-dpf-customtypefield-1af9c06ed629af1d110016d3039908e2e4"></a>

### Function name

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
std::string ansys::dpf::CustomTypeField::name() const

```

**Returns**:

Name of [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield).

**Return type**: std::string

<a id="classansys-dpf-customtypefield-1aa4e89d6febec7ca3f83b6ab0dd505b6d"></a>

### Function setName

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setName(const std::string &name)

```

Set name of [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield).

**Parameters**:

- const std::string &amp; **name**: \[in\] New name.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a042c55cecb14366c797e50d45d7309de"></a>

### Function scoping

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
Scoping ansys::dpf::CustomTypeField::scoping() const

```

**Returns**:

[Scoping](classansys-dpf-scoping.md#classansys-dpf-scoping) of the property.

**Return type**: [Scoping](classansys-dpf-scoping.md#classansys-dpf-scoping)

<a id="classansys-dpf-customtypefield-1a6563cb6e8c2c18961279c483e978d086"></a>

### Function dataSize

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
dp_int ansys::dpf::CustomTypeField::dataSize() const

```

**Returns**:

Size of the data container.

**Return type**: [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0)

<a id="classansys-dpf-customtypefield-1a578a721aeee9907c35e366954d1354b9"></a>

### Function numberOfComponents

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
dp_int ansys::dpf::CustomTypeField::numberOfComponents() const

```

**Returns**:

Number of components in the property data.

**Return type**: [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0)

<a id="classansys-dpf-customtypefield-1aa9e1da353050b2c8680bb16905093bbe"></a>

### Function numberOfEntities

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
dp_int ansys::dpf::CustomTypeField::numberOfEntities() const

```

**Returns**:

Number of entities in the [Field](classansys-dpf-field.md#classansys-dpf-field) Only implemented for in process udage. For gRPC usage, use [scoping()](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield-1a042c55cecb14366c797e50d45d7309de).size().

**Return type**: [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0)

<a id="classansys-dpf-customtypefield-1a8708b9441d40eb600c33b734d3eb283c"></a>

### Function numberOfElementaryData

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
dp_int ansys::dpf::CustomTypeField::numberOfElementaryData() const

```

**Returns**:

Number of elementary data (size = number of components) contained in the [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield).

**Return type**: [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0)

<a id="classansys-dpf-customtypefield-1a570a1b90c94c38350e28270376cfe840"></a>

### Function push\_back

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::push_back(dp_id entity_id, std::vector< UnitaryDataType > const &values)

```

Push back the entity data. The unitary data type should be UnitaryDataType.

**Parameters**:

- [dp\_id](namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) **entity\_id**: \[in\] Id of entity for which to push data.
- std::vector&lt; UnitaryDataType &gt; const &amp; **values**: \[in\] Vector of data for entity.

**Return type**: void

<a id="classansys-dpf-customtypefield-1ae709fae553fd2913b51bb0c27e18539c"></a>

### Function push\_back

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::push_back(dp_id entity_id, const UnitaryDataType *values, dp_int size)

```

Push back the entity data. The unitary data type should be UnitaryDataType.

**Parameters**:

- [dp\_id](namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) **entity\_id**: \[in\] Index of entity for which to push data.
- const UnitaryDataType \* **values**: \[in\] Ptr on data for entity.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **size**: \[in\] Number of entities.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a5ba412a54fefc3048596746369a0af9f"></a>

### Function setData

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setData(std::vector< UnitaryDataType > const &data)

```

Set the data of the custom property field.

Push back the entity data. The unitary data type should be UnitaryDataType.

**Parameters**:

- std::vector&lt; UnitaryDataType &gt; const &amp; **data**: \[in\] Vector of data.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a60880df78d5d536ba3317d36ce8dac25"></a>

### Function setData

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setData(UnitaryDataType const *const data, int size)

```

Set the data of the custom property field. The unitary data type should be UnitaryDataType.

**Parameters**:

- UnitaryDataType const \*const **data**: \[in\] List of data.
- int **size**: \[in\] Size of list.

**Return type**: void

<a id="classansys-dpf-customtypefield-1ada28e8b7fbadb7a21f0b244bbcf6bf8a"></a>

### Function setDataPointer

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setDataPointer(std::vector< dp_int > const &data)

```

Set the data pointer of the custom type field.

**Parameters**:

- std::vector&lt; [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) &gt; const &amp; **data**: \[in\] Vector of data.

**Return type**: void

<a id="classansys-dpf-customtypefield-1aba81e2a4cb0c3559eed1189abddc52a3"></a>

### Function setDataPointer

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setDataPointer(dp_int const *const data, int size)

```

Set the data pointer of the custom type field.

**Parameters**:

- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) const \*const **data**: \[in\] List of data.
- int **size**: \[in\] Size of list.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a46281c0e95a5ea8aa038882f6b210f82"></a>

### Function setScoping

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setScoping(ansys::dpf::Scoping const &s)

```

Set the scoping of the custom property field.

**Parameters**:

- [ansys::dpf::Scoping](classansys-dpf-scoping.md#classansys-dpf-scoping) const &amp; **s**

**Return type**: void

<a id="classansys-dpf-customtypefield-1a3ca5cbffa4bbe8c0e5e1d939b26f4f94"></a>

### Function addStringProperty

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
void ansys::dpf::CustomTypeField::addStringProperty(const char *key, const char *sProp) const

```

Add property of given key and string value. If key is already set, then value is updated with sProp.

**Parameters**:

- const char \* **key**
- const char \* **sProp**

**Return type**: void

<a id="classansys-dpf-customtypefield-1adb7c358bfe17c43a2a7ed62634227d9b"></a>

### Function getStringProperty

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
bool ansys::dpf::CustomTypeField::getStringProperty(const char *key, std::string &sProp) const

```

**Returns**:

True if property of given key is set. Sprop is updated with the property's value.

**Parameters**:

- const char \* **key**
- std::string &amp; **sProp**

**Return type**: bool

<a id="classansys-dpf-customtypefield-1a5d1e69ec2b7dd5476db37086e9860e35"></a>

### Function getData

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
void ansys::dpf::CustomTypeField::getData(std::vector< UnitaryDataType > &values_to_fill) const

```

Get all data for property entities. The unitary data type should be UnitaryDataType.

**Parameters**:

- std::vector&lt; UnitaryDataType &gt; &amp; **values\_to\_fill**: \[out\] Property entity data.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a0cfbce21104bd69617abc711be0ab2da"></a>

### Function data

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
DpfVector< UnitaryDataType > ansys::dpf::CustomTypeField::data() const

```

**Returns**:

[DpfVector](classansys-dpf-dpfvector.md#classansys-dpf-dpfvector) of data array. The unitary data type should be UnitaryDataType.

**Return type**: DpfVector&lt; UnitaryDataType &gt;

<a id="classansys-dpf-customtypefield-1a58c899e74917dcbc48d90c9ed9d4a499"></a>

### Function dataPointer

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
DpfVector< int > ansys::dpf::CustomTypeField::dataPointer() const

```

**Returns**:

[DpfVector](classansys-dpf-dpfvector.md#classansys-dpf-dpfvector) of data array.

**Return type**: DpfVector&lt; int &gt;

<a id="classansys-dpf-customtypefield-1a82bad4fa98d5bae26ab4f4f85170e8ce"></a>

### Function entityData

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
void ansys::dpf::CustomTypeField::entityData(dp_index entity_index, DpfVector< UnitaryDataType > &data) const

```

**Returns**:

[DpfVector](classansys-dpf-dpfvector.md#classansys-dpf-dpfvector) of data array of an entity, by index. The unitary data type should be UnitaryDataType.

**Parameters**:

- [dp\_index](namespaceansys-dpf.md#namespaceansys-dpf-1a417548d1b705a9ba54ba9429afe68920) **entity\_index**: \[in\] Index of entity for which to get data.
- DpfVector&lt; UnitaryDataType &gt; &amp; **data**: \[out\] Pointer to the data.

**Return type**: void

<a id="classansys-dpf-customtypefield-1aaf0626decc9970026265b871e403a49a"></a>

### Function entityDataById

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
void ansys::dpf::CustomTypeField::entityDataById(dp_id entity_id, DpfVector< UnitaryDataType > &data) const

```

**Returns**:

[DpfVector](classansys-dpf-dpfvector.md#classansys-dpf-dpfvector) of data array of an entity, by id. The unitary data type should be UnitaryDataType.

**Parameters**:

- [dp\_id](namespaceansys-dpf.md#namespaceansys-dpf-1ab4574c9af3f2bb8011da7d1f4c8da20e) **entity\_id**: \[in\] Id of entity for which to get data.
- DpfVector&lt; UnitaryDataType &gt; &amp; **data**: \[out\] Pointer to the data.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a0387f74d0adb7e718e07311a05ac1e2d"></a>

### Function reserve

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::reserve(dp_int number_of_entities, dp_int overall_size=0)

```

Reserve the [Field](classansys-dpf-field.md#classansys-dpf-field). Only implemented for in process udage. To reserve the size for gRPC usage, use the constructor.

**Parameters**:

- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **number\_of\_entities**: \[in\] Number of entities.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **overall\_size** = 0 : \[in\] Total size of entity data.

**Return type**: void

<a id="classansys-dpf-customtypefield-1ab8ae09255c5fb3b3ed8aa7e8c0c835cd"></a>

### Function resize

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::resize(dp_int number_of_entities, dp_int overall_size)

```

Reserve the [Field](classansys-dpf-field.md#classansys-dpf-field).

**Parameters**:

- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **number\_of\_entities**: \[in\] Number of entities.
- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **overall\_size**: \[in\] Total size of entity data.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a32ea47aaddf00c00a2d243567e3f2495"></a>

### Function resizeDataPointer

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::resizeDataPointer(dp_int number_of_entities)

```

\[in\] Number of entities

Resize the dataPointer array.

**Parameters**:

- [dp\_int](namespaceansys-dpf.md#namespaceansys-dpf-1a60d181a1f9d29cc7cc38b25dac4401f0) **number\_of\_entities**

**Return type**: void

<a id="classansys-dpf-customtypefield-1a20ed27c8f1a5e278b76160301c1d0e15"></a>

### Function fieldDefinition

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
FieldDefinition ansys::dpf::CustomTypeField::fieldDefinition() const

```

**Returns**:

[FieldDefinition](classansys-dpf-fielddefinition.md#classansys-dpf-fielddefinition) of the field.

**Return type**: [FieldDefinition](classansys-dpf-fielddefinition.md#classansys-dpf-fielddefinition)

<a id="classansys-dpf-customtypefield-1ac395281a74f1a78df961f443a32648a1"></a>

### Function support

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
Support ansys::dpf::CustomTypeField::support() const

```

**Returns**:

[Support](classansys-dpf-support.md#classansys-dpf-support) of the field.

**Return type**: Support

<a id="classansys-dpf-customtypefield-1a6cc095d24302187139b81ad7843d5835"></a>

### Function setSupport

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setSupport(ansys::dpf::Support &s)

```

Set the support of the [Field](classansys-dpf-field.md#classansys-dpf-field).

**Parameters**:

- [ansys::dpf::Support](classansys-dpf-support.md#classansys-dpf-support) &amp; **s**: \[in\] [Field](classansys-dpf-field.md#classansys-dpf-field) to support.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a1dc844fe2af7407a8333269be5cf99cd"></a>

### Function setSupport

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setSupport(ansys::dpf::TimeFreqSupport &s)

```

Set the support of the [Field](classansys-dpf-field.md#classansys-dpf-field).

**Parameters**:

- [ansys::dpf::TimeFreqSupport](classansys-dpf-timefreqsupport.md#classansys-dpf-timefreqsupport) &amp; **s**: \[in\] [Field](classansys-dpf-field.md#classansys-dpf-field) to support.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a686bc9eade56aa283e052f81da8fec9b"></a>

### Function setSupport

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setSupport(ansys::dpf::MeshedRegion &s)

```

Set the support of the [Field](classansys-dpf-field.md#classansys-dpf-field).

**Parameters**:

- [ansys::dpf::MeshedRegion](classansys-dpf-meshedregion.md#classansys-dpf-meshedregion) &amp; **s**: \[in\] [Field](classansys-dpf-field.md#classansys-dpf-field) to support.

**Return type**: void

<a id="classansys-dpf-customtypefield-1a3c0e7ea1d3e5eaf8feaa633d7bf88e87"></a>

### Function setFieldDefinition

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setFieldDefinition(FieldDefinition const &f)

```

Set the [FieldDefinition](classansys-dpf-fielddefinition.md#classansys-dpf-fielddefinition).

**Parameters**:

- [FieldDefinition](classansys-dpf-fielddefinition.md#classansys-dpf-fielddefinition) const &amp; **f**

**Return type**: void

<a id="classansys-dpf-customtypefield-1aaa87bd9510ed16d0038c738385932023"></a>

### Function isOfUnitaryType

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
bool ansys::dpf::CustomTypeField::isOfUnitaryType() const

```

tests the type of the [Field](classansys-dpf-field.md#classansys-dpf-field).

**Return type**: bool

<a id="classansys-dpf-customtypefield-1ab2a21d596a016b4c26ca7c473bdeacbb"></a>

### Function cloneToCustomTypeField

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
CustomTypeField ansys::dpf::CustomTypeField::cloneToCustomTypeField(ansys::dpf::Client const *const client=nullptr, bool const copy_ids=true, bool const copy_data_ptr=true, bool const copy_support=true) const

```

Creates a new custom type field object from current field without its data.

**Parameters**:

- [ansys::dpf::Client](classansys-dpf-client.md#classansys-dpf-client) const \*const **client** = nullptr : \[in\] Remote client
- bool const **copy\_ids** = true : \[in\] Boolean to decide if scoping ids are to be copied
- bool const **copy\_data\_ptr** = true : \[in\] Boolean to decide if data pointer is to be copied
- bool const **copy\_support** = true : \[in\] Boolean to decide if the support reference is to be copied

**Return type**: CustomTypeField

<a id="classansys-dpf-customtypefield-1ad26abff54c365f24acc5478333fbf5e6"></a>

### Function cloneToField

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
Field ansys::dpf::CustomTypeField::cloneToField(ansys::dpf::Client const *const client=nullptr, bool const copy_ids=true, bool const copy_data_ptr=true, bool const copy_support=true) const

```

Creates a new field object from current custom type field without its data.

**Parameters**:

- [ansys::dpf::Client](classansys-dpf-client.md#classansys-dpf-client) const \*const **client** = nullptr : \[in\] Remote client
- bool const **copy\_ids** = true : \[in\] Boolean to decide if scoping ids are to be copied
- bool const **copy\_data\_ptr** = true : \[in\] Boolean to decide if data pointer is to be copied
- bool const **copy\_support** = true : \[in\] Boolean to decide if the support reference is to be copied

**Return type**: [Field](classansys-dpf-field.md#classansys-dpf-field)

<a id="classansys-dpf-customtypefield-1a270f68abf019d27334dcccfbc1d4c2c9"></a>

### Function cloneToPropertyField

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
PropertyField ansys::dpf::CustomTypeField::cloneToPropertyField(ansys::dpf::Client const *const client=nullptr, bool const copy_ids=true, bool const copy_data_ptr=true, bool const copy_support=true) const

```

Creates a new property field object from current custom type field without its data.

**Parameters**:

- [ansys::dpf::Client](classansys-dpf-client.md#classansys-dpf-client) const \*const **client** = nullptr : \[in\] Remote client
- bool const **copy\_ids** = true : \[in\] Boolean to decide if scoping ids are to be copied
- bool const **copy\_data\_ptr** = true : \[in\] Boolean to decide if data pointer is to be copied
- bool const **copy\_support** = true : \[in\] Boolean to decide if the support reference is to be copied

**Return type**: [PropertyField](classansys-dpf-propertyfield.md#classansys-dpf-propertyfield)

<a id="classansys-dpf-customtypefield-1aab0e655a759fa2acf65e4cacee5a558b"></a>

### Function getHeaderAsDataTree

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
DataTree ansys::dpf::CustomTypeField::getHeaderAsDataTree() const

```

Get the header of the [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield) as a [DataTree](classansys-dpf-datatree.md#classansys-dpf-datatree) object.

**Return type**: DataTree

<a id="classansys-dpf-customtypefield-1a0f9c8db836e630abab6e914bfad781a2"></a>

### Function setHeaderAsDataTree

![](https://img.shields.io/badge/-public-brightgreen "public")

```cpp
void ansys::dpf::CustomTypeField::setHeaderAsDataTree(const DataTree &datatree)

```

Set the header of the [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield) using a [DataTree](classansys-dpf-datatree.md#classansys-dpf-datatree) object.

**Parameters**:

- const DataTree &amp; **datatree**

**Return type**: void

<a id="classansys-dpf-customtypefield-1a918343f671097069e91390acc73a9e83"></a>

### Function deep\_copy

![](https://img.shields.io/badge/-public-brightgreen "public")![](https://img.shields.io/badge/-const-lightblue "const")

```cpp
CustomTypeField ansys::dpf::CustomTypeField::deep_copy(ansys::dpf::Client const *const client=nullptr) const

```

Create a new [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield) on a server by copying all the data of this [CustomTypeField](classansys-dpf-customtypefield.md#classansys-dpf-customtypefield).

**Parameters**:

- [ansys::dpf::Client](classansys-dpf-client.md#classansys-dpf-client) const \*const **client** = nullptr : \[in\] [Client](classansys-dpf-client.md#classansys-dpf-client) instance designating the IP, port and protocol to use.

**Return type**: CustomTypeField