FieldDefinition#

class ansys.dpf.core.field_definition.FieldDefinition(field_definition=None, server=None)#

Contains the physical and mathematical description of the field.

Parameters:
  • field_definition (optional) – The default is None.

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

Overview#

add_quantity_type

Add a new Quantity Type.

num_quantity_types

Return number of available quantity types.

is_of_quantity_type

Check if the field definition is of a given quantity type.

deep_copy

Create a deep copy of the field_definition’s data on a given server.

location

Field location.

name

Field name.

unit

Units of the field.

shell_layers

Order of the shell layers.

dimensionality

Dimensionality.

quantity_types

Getter for Quantity Types.

__del__

Delete the current instance.

Import detail#

from ansys.dpf.core.field_definition import FieldDefinition

Property detail#

property FieldDefinition.location#

Field location.

Returns:

Location string, such as ansys.dpf.core.locations.nodal, ansys.dpf.core.locations.elemental or ansys.dpf.core.locations.time_freq.

Return type:

str

property FieldDefinition.name#

Field name.

Return type:

str

property FieldDefinition.unit#

Units of the field.

Returns:

Units of the field.

Return type:

str

property FieldDefinition.shell_layers#

Order of the shell layers.

Returns:

shell_layersLayerIndependent is returned for fields unrelated to layers.

Return type:

shell_layers

property FieldDefinition.dimensionality#

Dimensionality.

Returns:

dimensionality – Nature and size of the elementary data.

Return type:

Dimensionality

property FieldDefinition.quantity_types#

Getter for Quantity Types.

Returns:

All quantity types of the elementary data for this FieldDefinition.

Return type:

str

Method detail#

FieldDefinition.add_quantity_type(quantity_type_to_add)#

Add a new Quantity Type.

Parameters:

quantity_type_to_add (str) – Quantity type to add

FieldDefinition.num_quantity_types()#

Return number of available quantity types.

Returns:

num_quantity_types – Number of quantity types

Return type:

int

FieldDefinition.is_of_quantity_type(quantity_type)#

Check if the field definition is of a given quantity type.

Parameters:

quantity_type (str) – Quantity type to check

Returns:

is_of_quantity_type – True if the field definition is of the given quantity type

Return type:

bool

FieldDefinition.deep_copy(server=None)#

Create a deep copy of the field_definition’s data on a given server.

This can be useful to pass data from one server instance to another.

Parameters:

server (DPFServer, optional)

Returns:

field_definition_copy

Return type:

FieldDefinition

FieldDefinition.__del__()#

Delete the current instance.