GenericSupport#

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

Bases: ansys.dpf.core.support.Support

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).

Overview#

set_support_of_property

Support a Property by Field data.

field_support_by_property

Return a Field supporting (describing) a given property.

prop_field_support_by_property

Return a PropertyField supporting (describing) a given property.

string_field_support_by_property

Return a StringField supporting (describing) a given property.

available_field_supported_properties

Return the list of property names supported by a Field.

available_prop_field_supported_properties

Return the list of property names supported by a PropertyField.

available_string_field_supported_properties

Return the list of property names supported by a StringField.

get_type

Type of the support as a string.

get_as_time_freq_support

Get the support as a TimeFreqSupport object.

get_as_meshed_region

Get the support as a MeshedRegion object.

get_as_cyclic_support

Get the support as a CyclicSupport object.

get_as_generic_support

Get the support as a GenericSupport object.

deep_copy

Create a deep copy of the Support on a given server.

__del__

Clean up resources associated with the instance.

Import detail#

from ansys.dpf.core.generic_support import GenericSupport

Method detail#

GenericSupport.set_support_of_property(property_name: str, field_support) None#

Support a Property by Field data.

Parameters:
GenericSupport.field_support_by_property(property_name: str)#

Return a Field supporting (describing) a given property.

Return type:

Field

Notes

Available with server’s version starting at 5.0.

GenericSupport.prop_field_support_by_property(property_name: str)#

Return a PropertyField supporting (describing) a given property.

Return type:

PropertyField

Notes

Available with server’s version starting at 5.0.

GenericSupport.string_field_support_by_property(property_name: str)#

Return a StringField supporting (describing) a given property.

Return type:

StringField

Notes

Available with server’s version starting at 5.0.

GenericSupport.available_field_supported_properties()#

Return the list of property names supported by a Field.

Return type:

list

Notes

Available with server’s version starting at 5.0.

GenericSupport.available_prop_field_supported_properties()#

Return the list of property names supported by a PropertyField.

Return type:

list

Notes

Available with server’s version starting at 5.0.

GenericSupport.available_string_field_supported_properties()#

Return the list of property names supported by a StringField.

Return type:

list

Notes

Available with server’s version starting at 5.0.

GenericSupport.get_type() str#

Type of the support as a string.

Returns:

type – Type of the support as a string

Return type:

str

GenericSupport.get_as_time_freq_support() ansys.dpf.core.time_freq_support.TimeFreqSupport#

Get the support as a TimeFreqSupport object.

Returns:

TimeFreqSupport – TimeFreqSupport object

Return type:

TimeFreqSupport

GenericSupport.get_as_meshed_region() ansys.dpf.core.meshed_region.MeshedRegion#

Get the support as a MeshedRegion object.

Returns:

MeshedRegion – MeshedRegion object

Return type:

MeshedRegion

GenericSupport.get_as_cyclic_support() ansys.dpf.core.cyclic_support.CyclicSupport#

Get the support as a CyclicSupport object.

Returns:

CyclicSupport – CyclicSupport object

Return type:

CyclicSupport

GenericSupport.get_as_generic_support() ansys.dpf.core.generic_support.GenericSupport#

Get the support as a GenericSupport object.

Returns:

GenericSupport – GenericSupport object

Return type:

GenericSupport

GenericSupport.deep_copy(server=None)#

Create a deep copy of the Support on a given server.

Parameters:

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.

Returns:

support

Return type:

Support

GenericSupport.__del__()#

Clean up resources associated with the instance.

This method calls the deleter function to release resources. If an exception occurs during deletion, a warning is issued.

Raises:

Warning – If an exception occurs while attempting to delete resources.