Skip to main content

DPF Cpp Client Library 2026 R1

Class ansys::dpf::PropertyField

Last update: 25.03.2026

Holds Integral (int32) data describing a Property located on given entities (the Property Field's data is bounded with its scoping). Is the equivalent of the Field but with integral values data (and not double values).

Inherits from:

Members

Friends

Public static functions

Function emptyPropertyField

static PropertyField ansys::dpf::PropertyField::emptyPropertyField()

Return type: PropertyField

Function createPropertyFieldWithTransformation

static PropertyField ansys::dpf::PropertyField::createPropertyFieldWithTransformation(Workflow transformation_wf, int reserved_number_of_entity=0, int reserved_data_size=0, std::string const &input_name_to_connect="input_field", std::string const &output_name_to_eval="transformed_field")

Instantiate a PropertyField with Transformation. For each call to a getter, the workflow in input is connected this PropertyField to input_name_to_connect and the PropertyField output in output_name_to_eval is used as the getter instance.

Parameters:

  • Workflow transformation_wf: [in] Transformation workflow.
  • int reserved_number_of_entity = 0
  • int reserved_data_size = 0
  • std::string const & input_name_to_connect = "input_field" : [in] Name of the input of the workflow to connect. Should take a Field.
  • std::string const & output_name_to_eval = "transformed_field" : [in] Name of the output of the workflow to evaluate. Should return a Field.

Return type: PropertyField

Public functions

Function ~PropertyField

virtual ansys::dpf::PropertyField::~PropertyField()

Return type:

Function PropertyField

ansys::dpf::PropertyField::PropertyField(Client const *const client, dp_int number_of_entities=0, dp_int data_size=0, const Location &loc=Location())

Create an empty property field with a client.

Parameters:

  • Client const *const client: [in] Client to create the property field on.
  • dp_int number_of_entities = 0 : [in] Number of entities.
  • dp_int data_size = 0 : [in] Reserved size of data.
  • const Location & loc = Location() : [in] Location of entities.

Return type:

Function PropertyField

ansys::dpf::PropertyField::PropertyField(dp_int number_of_entities=0, dp_int data_size=0)

Create a property with number of entities and data size.

Parameters:

  • dp_int number_of_entities = 0 : [in] Number of entities.
  • dp_int data_size = 0 : [in] Reserved size of data.

Return type:

Function PropertyField

ansys::dpf::PropertyField::PropertyField(int id, Client const *const client)

Retrieve an existing instance of PropertyField on a server.

Parameters:

  • int id: [in] Id of the Field object on the server's database.
  • Client const *const client: [in] Client instance designating the IP, port and protocol to use.

Return type:

Function PropertyField

ansys::dpf::PropertyField::PropertyField(PropertyField const &)

Parameters:

  • PropertyField const &

Return type:

Function PropertyField

ansys::dpf::PropertyField::PropertyField(PropertyField &&) noexcept

Parameters:

  • PropertyField &&

Return type:

Function operator=

PropertyField & ansys::dpf::PropertyField::operator=(PropertyField const &)

Parameters:

  • PropertyField const &

Return type: PropertyField &

Function operator=

PropertyField & ansys::dpf::PropertyField::operator=(PropertyField &&) noexcept

Parameters:

  • PropertyField &&

Return type: PropertyField &

Function fieldDefinition

FieldDefinition ansys::dpf::PropertyField::fieldDefinition() const

Returns:

FieldDefinition of the field.

Return type: FieldDefinition

Function setFieldDefinition

void ansys::dpf::PropertyField::setFieldDefinition(FieldDefinition const &f)

Set the FieldDefinition.

Parameters:

Return type: void

Function support

Support ansys::dpf::PropertyField::support() const

Returns:

Support of the PropertyField.

Return type: Support

Function setSupport

void ansys::dpf::PropertyField::setSupport(ansys::dpf::Support const &s)

Set the support of the PropertyField.

Parameters:

Return type: void

Function setSupport

void ansys::dpf::PropertyField::setSupport(ansys::dpf::TimeFreqSupport const &s)

Set the support of the Field.

Parameters:

Return type: void

Function setSupport

void ansys::dpf::PropertyField::setSupport(ansys::dpf::MeshedRegion const &s)

Set the support of the Field.

Parameters:

Return type: void

Function name

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

Returns:

Name of PropertyField.

Return type: std::string

Function setName

void ansys::dpf::PropertyField::setName(const std::string &name)

Set name of PropertyField.

Parameters:

  • const std::string & name: [in] New name.

Return type: void

Function location

Location ansys::dpf::PropertyField::location() const

Returns:

Location of the property.

Return type: Location

Function scoping

Scoping ansys::dpf::PropertyField::scoping() const

Returns:

Scoping of the property.

Return type: Scoping

Function dataSize

dp_int ansys::dpf::PropertyField::dataSize() const

Returns:

Size of the data container.

Return type: dp_int

Function numberOfComponents

dp_int ansys::dpf::PropertyField::numberOfComponents() const

Returns:

Number of components in the property data.

Return type: dp_int

Function numberOfElementaryData

dp_int ansys::dpf::PropertyField::numberOfElementaryData() const

Returns:

Number of elementary data (size = number of components) contained in the PropertyField.

Return type: dp_int

Function push_back

void ansys::dpf::PropertyField::push_back(dp_id entity_id, std::vector< int > const &values)

Push back the entity data.

Parameters:

  • dp_id entity_id: [in] Id of entity for which to push data.
  • std::vector< int > const & values: [in] Vector of data for entity.

Return type: void

Function push_back

void ansys::dpf::PropertyField::push_back(dp_id entity_id, const int *values, int size)

Push back the entity data.

Parameters:

  • dp_id entity_id: [in] Index of entity for which to push data.
  • const int * values: [in] Ptr on data for entity.
  • int size: [in] Number of entities.

Return type: void

Function push_back

void ansys::dpf::PropertyField::push_back(dp_id entity_id, int *values, int size)

Push back the entity data.

Parameters:

  • dp_id entity_id: [in] Index of entity for which to push data.
  • int * values: [in] Ptr on data for entity.
  • int size: [in] Number of entities.

Return type: void

Function setData

void ansys::dpf::PropertyField::setData(std::vector< int > const &data)

Set the data of the property field.

Parameters:

  • std::vector< int > const & data: [in] Vector of data.

Return type: void

Function setData

void ansys::dpf::PropertyField::setData(int const *const data, int size)

Set the data of the property field.

Parameters:

  • int const *const data: [in] List of data.
  • int size: [in] Size of list.

Return type: void

Function setDataPointer

void ansys::dpf::PropertyField::setDataPointer(std::vector< int > const &data)

Set the data pointer of the property field.

Parameters:

  • std::vector< int > const & data: [in] Vector of data.

Return type: void

Function setDataPointer

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

Set the data pointer of the property field.

Parameters:

  • int *const data: [in] List of data.
  • int size: [in] Size of list.

Return type: void

Function setScoping

void ansys::dpf::PropertyField::setScoping(ansys::dpf::Scoping const &s)

Set the scoping of the property field.

Parameters:

Return type: void

Function dataByIndex

const dp_int * ansys::dpf::PropertyField::dataByIndex(dp_index entity_index, int &size) const

Returns:

Pointer to entity data given by index.

Parameters:

  • dp_index entity_index: [in] Index of entity for which to get data.
  • int & size: [out] Size of return data.

Return type: const dp_int *

Function dataById

const dp_int * ansys::dpf::PropertyField::dataById(dp_id entity_id, int &size) const

Returns:

Pointer to entity data given by id.

Parameters:

  • dp_id entity_id: [in] Id of entity for which to get data.
  • int & size: [out] Size of return data.

Return type: const dp_int *

Function fillCursor

void ansys::dpf::PropertyField::fillCursor(dp_index index, PropFieldCursor &cursor) const

Get data at a given index.

Parameters:

Return type: void

Function getIds

void ansys::dpf::PropertyField::getIds(std::vector< dp_id > &ids_to_fill) const

Get ids of property entities.

Parameters:

  • std::vector< dp_id > & ids_to_fill: [out] Entity ids.

Return type: void

Function getData

void ansys::dpf::PropertyField::getData(std::vector< dp_int > &values_to_fill) const

Get all data for property entities.

Parameters:

  • std::vector< dp_int > & values_to_fill: [out] Property entity data.

Return type: void

Function data

DpfVector< int > ansys::dpf::PropertyField::data() const

Returns:

DpfVector of data array.

Return type: DpfVector< int >

Function dataPointer

DpfVector< int > ansys::dpf::PropertyField::dataPointer() const

Returns:

DpfVector of data array.

Return type: DpfVector< int >

Function entityData

void ansys::dpf::PropertyField::entityData(dp_index entity_index, DpfVector< int > &data) const

Returns:

DpfVector of data array of an entity, by index.

Parameters:

  • dp_index entity_index: [in] Index of entity for which to get data.
  • DpfVector< int > & data: [out] Pointer to the data.

Return type: void

Function entityDataById

void ansys::dpf::PropertyField::entityDataById(dp_id entity_id, DpfVector< int > &data) const

Returns:

DpfVector of data array of an entity, by id.

Parameters:

  • dp_id entity_id: [in] Id of entity for which to get data.
  • DpfVector< int > & data: [out] Pointer to the data.

Return type: void

Function reserve

void ansys::dpf::PropertyField::reserve(dp_int number_of_entities, dp_int overall_size=0)

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

void ansys::dpf::PropertyField::resize(dp_int number_of_entities, dp_int overall_size)

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 deep_copy

PropertyField ansys::dpf::PropertyField::deep_copy(ansys::dpf::Client const *const client=nullptr) const

Make a deep copy on a given client.

Parameters:

Return type: PropertyField

Function cloneToCustomTypeField

CustomTypeField ansys::dpf::PropertyField::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 property 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

Field ansys::dpf::PropertyField::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 property 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

PropertyField ansys::dpf::PropertyField::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 property 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

DataTree ansys::dpf::PropertyField::getHeaderAsDataTree() const

Get the header of the PropertyField as a DataTree object.

Return type: DataTree

Function setHeaderAsDataTree

void ansys::dpf::PropertyField::setHeaderAsDataTree(const DataTree &datatree)

Set the header of the PropertyField using a DataTree object.

Parameters:

  • const DataTree & datatree

Return type: void

Connect with Ansys