GenericSupport#

class ansys.dpf.core.generic_support.GenericSupport(name: str = '', generic_support=None, server=None)#

Can support a location or label to describe its domain with its scope and properties.

Parameters:
  • generic_support (ctypes.c_void_p, ansys.grpc.dpf.tgeneric_support_pb2.GenericSupport) –

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

Examples

Create a generic support.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import GenericSupport
>>> support = GenericSupport("phase")
>>> field = dpf.Field(location="phase", nature=dpf.natures.scalar)
>>> support.set_support_of_property("viscosity", field)
>>> field = dpf.StringField()
>>> support.set_support_of_property("names", field)
>>> field = dpf.PropertyField(location="phase", nature=dpf.natures.scalar)
>>> support.set_support_of_property("type", field)
>>> support.available_field_supported_properties()
['viscosity']
>>> support.available_string_field_supported_properties()
['names']
>>> support.available_prop_field_supported_properties()
['type']
>>> field = support.field_support_by_property("viscosity")

Notes

Class available with server’s version starting at 5.0 (Ansys 2023R1).

available_field_supported_properties()#

Returns the list of property names supported by a Field.

Return type:

list

Notes

Available with server’s version starting at 5.0.

available_prop_field_supported_properties()#

Returns the list of property names supported by a PropertyField.

Return type:

list

Notes

Available with server’s version starting at 5.0.

available_string_field_supported_properties()#

Returns the list of property names supported by a StringField.

Return type:

list

Notes

Available with server’s version starting at 5.0.

field_support_by_property(property_name: str)#

Returns a Field supporting (describing) a given property.

Return type:

Field

Notes

Available with server’s version starting at 5.0.

prop_field_support_by_property(property_name: str)#

Returns a PropertyField supporting (describing) a given property.

Return type:

PropertyField

Notes

Available with server’s version starting at 5.0.

string_field_support_by_property(property_name: str)#

Returns a StringField supporting (describing) a given property.

Return type:

StringField

Notes

Available with server’s version starting at 5.0.

set_support_of_property(property_name: str, field_support)#

Support a Property by Field data.

Parameters:
Return type:

None