GenericDataContainer#

class ansys.dpf.core.generic_data_container.GenericDataContainer(generic_data_container=None, server=None)#

Maps properties to their DPF supported Data Types.

Parameters:
  • generic_data_container (ctypes.c_void_p, ansys.grpc.dpf.generic_data_container_pb2.GenericDataContainer message, optional # noqa: E501) –

  • server (DPFServer, optional) – Server with channel connected to the remote or local instance. The default is None, in which case an attempt is made to use the global server.

Notes

Class available with server’s version starting at 7.0 (Ansys 2024 R1 pre0).

set_property(property_name: str, prop: int | float | str | ansys.dpf.core.field.Field | ansys.dpf.core.string_field.StringField | ansys.dpf.core.generic_data_container.GenericDataContainer | ansys.dpf.core.scoping.Scoping)#

Register given property with the given name.

Parameters:
get_property(property_name, output_type: None | type | ansys.dpf.core.common.types = None)#

Get property with given name.

Parameters:
  • property_name (str) – Property name.

  • output_type (None, type, types, optional) – Expected type of the output. By default, type is deduced using GenericDataContainer.get_property_description.

Return type:

Property object instance.

get_property_description()#

Get a dictionary description of properties by name and data type

Returns:

description – Description of the GenericDataContainer’s contents

Return type:

dict