Skip to main content
Holds data located on given entities (the 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 but with custom type values data. (and not double values). Inherits from:

Members

Friends

Public static functions

Function emptyCustomTypeField

Return type: CustomTypeField

Public functions

Function ~CustomTypeField

Return type:

Function CustomTypeField

Create an empty custom type field with a client. The unitary data type will be UnitaryDataType. For example, use ansys::dpf::CustomTypeField f(ansys::dpf::UseType<float>()). Parameters:
  • Client const *const client: [in] Client to create the custom property field on.
  • UnitaryDataType *
  • dp_int reserved_number_of_entities = 0 : [in] Number of entities to reserve in the scoping.
  • dp_int reserved_num_unitary_data = 0 : [in] Reserved size of data=reserved_num_unitary_data*unitary_data_num_bytes.
Return type:

Function CustomTypeField

Create a property with number of entities and data size. The unitary data type will be UnitaryDataType. For example, use ansys::dpf::CustomTypeField f(ansys::dpf::UseType<float>()). Parameters:
  • UnitaryDataType *
  • dp_int reserved_number_of_entities = 0 : [in] Number of entities to reserve in the scoping.
  • dp_int reserved_num_unitary_data = 0 : [in] Reserved size of data=reserved_num_unitary_data*unitary_data_num_bytes.
Return type:

Function CustomTypeField

Create an empty custom type field with a client. The unitary data type will be of size unitary_data_num_bytes. Parameters:
  • Client const *const client: [in] Client to create the custom property field on.
  • dp_int unitary_data_num_bytes: [in] Num bytes by unitary data.
  • dp_int reserved_number_of_entities = 0 : [in] Number of entities to reserve in the scoping.
  • dp_int reserved_num_unitary_data = 0 : [in] Reserved size of data=reserved_num_unitary_data*unitary_data_num_bytes.
Return type:

Function CustomTypeField

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 unitary_data_num_bytes: [in] Num bytes by unitary data.
  • dp_int reserved_number_of_entities = 0 : [in] Number of entities to reserve in the scoping.
  • dp_int reserved_num_unitary_data = 0 : [in] Reserved size of data=reserved_num_unitary_data*unitary_data_num_bytes.
Return type:

Function CustomTypeField

Retrieve an existing instance of CustomTypeField on a server. Parameters:
  • int id: [in] Id of the CustomTypeField object on the server’s database.
  • Client const *const client: [in] Client instance designating the IP, port and protocol to use.
Return type:

Function CustomTypeField

Parameters:
  • CustomTypeField const &
Return type:

Function CustomTypeField

Parameters:
  • CustomTypeField &&
Return type:

Function operator=

Parameters:
  • CustomTypeField const &
Return type: CustomTypeField &

Function operator=

Parameters:
  • CustomTypeField &&
Return type: CustomTypeField &

Function identicalPointers

Compare field with input field f. Parameters:
  • CustomTypeField const & f: [in] Field with which to compare.
Return type: bool

Function name

Returns: Name of CustomTypeField. Return type: std::string

Function setName

Set name of CustomTypeField. Parameters:
  • const std::string & name: [in] New name.
Return type: void

Function scoping

Returns: Scoping of the property. Return type: Scoping

Function dataSize

Returns: Size of the data container. Return type: dp_int

Function numberOfComponents

Returns: Number of components in the property data. Return type: dp_int

Function numberOfEntities

Returns: Number of entities in the Field Only implemented for in process udage. For gRPC usage, use scoping().size(). Return type: dp_int

Function numberOfElementaryData

Returns: Number of elementary data (size = number of components) contained in the CustomTypeField. Return type: dp_int

Function push_back

Push back the entity data. The unitary data type should be UnitaryDataType. Parameters:
  • dp_id entity_id: [in] Id of entity for which to push data.
  • std::vector< UnitaryDataType > const & values: [in] Vector of data for entity.
Return type: void

Function push_back

Push back the entity data. The unitary data type should be UnitaryDataType. Parameters:
  • dp_id entity_id: [in] Index of entity for which to push data.
  • const UnitaryDataType * values: [in] Ptr on data for entity.
  • dp_int size: [in] Number of entities.
Return type: void

Function setData

Set the data of the custom property field. Push back the entity data. The unitary data type should be UnitaryDataType. Parameters:
  • std::vector< UnitaryDataType > const & data: [in] Vector of data.
Return type: void

Function setData

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

Function setDataPointer

Set the data pointer of the custom type field. Parameters:
  • std::vector< dp_int > const & data: [in] Vector of data.
Return type: void

Function setDataPointer

Set the data pointer of the custom type field. Parameters:
  • dp_int const *const data: [in] List of data.
  • int size: [in] Size of list.
Return type: void

Function setScoping

Set the scoping of the custom property field. Parameters: Return type: void

Function addStringProperty

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

Function getStringProperty

Returns: True if property of given key is set. Sprop is updated with the property’s value. Parameters:
  • const char * key
  • std::string & sProp
Return type: bool

Function getData

Get all data for property entities. The unitary data type should be UnitaryDataType. Parameters:
  • std::vector< UnitaryDataType > & values_to_fill: [out] Property entity data.
Return type: void

Function data

Returns: DpfVector of data array. The unitary data type should be UnitaryDataType. Return type: DpfVector< UnitaryDataType >

Function dataPointer

Returns: DpfVector of data array. Return type: DpfVector< int >

Function entityData

Returns: DpfVector of data array of an entity, by index. The unitary data type should be UnitaryDataType. Parameters:
  • dp_index entity_index: [in] Index of entity for which to get data.
  • DpfVector< UnitaryDataType > & data: [out] Pointer to the data.
Return type: void

Function entityDataById

Returns: DpfVector of data array of an entity, by id. The unitary data type should be UnitaryDataType. Parameters:
  • dp_id entity_id: [in] Id of entity for which to get data.
  • DpfVector< UnitaryDataType > & data: [out] Pointer to the data.
Return type: void

Function reserve

Reserve the Field. Only implemented for in process udage. To reserve the size for gRPC usage, use the constructor. Parameters:
  • dp_int number_of_entities: [in] Number of entities.
  • dp_int overall_size = 0 : [in] Total size of entity data.
Return type: void

Function resize

Reserve the Field. Parameters:
  • dp_int number_of_entities: [in] Number of entities.
  • dp_int overall_size: [in] Total size of entity data.
Return type: void

Function resizeDataPointer

[in] Number of entities Resize the dataPointer array. Parameters: Return type: void

Function fieldDefinition

Returns: FieldDefinition of the field. Return type: FieldDefinition

Function support

Returns: Support of the field. Return type: Support

Function setSupport

Set the support of the Field. Parameters: Return type: void

Function setSupport

Set the support of the Field. Parameters: Return type: void

Function setSupport

Set the support of the Field. Parameters: Return type: void

Function setFieldDefinition

Set the FieldDefinition. Parameters: Return type: void

Function isOfUnitaryType

tests the type of the Field. Return type: bool

Function cloneToCustomTypeField

Creates a new custom type field object from current field without its data. Parameters:
  • ansys::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

Function cloneToField

Creates a new field object from current custom type field without its data. Parameters:
  • ansys::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

Function cloneToPropertyField

Creates a new property field object from current custom type field without its data. Parameters:
  • ansys::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

Function getHeaderAsDataTree

Get the header of the CustomTypeField as a DataTree object. Return type: DataTree

Function setHeaderAsDataTree

Set the header of the CustomTypeField using a DataTree object. Parameters:
  • const DataTree & datatree
Return type: void

Function deep_copy

Create a new CustomTypeField on a server by copying all the data of this CustomTypeField. Parameters: Return type: CustomTypeField