rotate#

class ansys.dpf.core.operators.geo.rotate.rotate(field=None, field_rotation_matrix=None, config=None, server=None)#

Bases: ansys.dpf.core.dpf_operator.Operator

Applies a transformation (rotation) matrix on a field.

Parameters:
  • field (Field or FieldsContainer) – Field or fields container with only one field is expected

  • field_rotation_matrix (Field) – 3-3 rotation matrix

Returns:

field

Return type:

Field

Examples

>>> from ansys.dpf import core as dpf
>>> # Instantiate operator
>>> op = dpf.operators.geo.rotate()
>>> # Make input connections
>>> my_field = dpf.Field()
>>> op.inputs.field.connect(my_field)
>>> my_field_rotation_matrix = dpf.Field()
>>> op.inputs.field_rotation_matrix.connect(my_field_rotation_matrix)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.geo.rotate(
...     field=my_field,
...     field_rotation_matrix=my_field_rotation_matrix,
... )
>>> # Get output data
>>> result_field = op.outputs.field()

Overview#

inputs

Enables to connect inputs to the operator

outputs

Enables to get outputs of the operator by evaluating it

default_config

Returns the default config of the operator.

Import detail#

from ansys.dpf.core.operators.geo.rotate import rotate

Property detail#

property rotate.inputs#

Enables to connect inputs to the operator

Returns:

inputs

Return type:

InputsRotate

property rotate.outputs#

Enables to get outputs of the operator by evaluating it

Returns:

outputs

Return type:

OutputsRotate

Method detail#

static rotate.default_config(server=None)#

Returns the default config of the operator.

This config can then be changed to the user needs and be used to instantiate the operator. The Configuration allows to customize how the operation will be processed by the operator.

Parameters:

server (server.DPFServer, optional) – Server with channel connected to the remote or local instance. When None, attempts to use the global server.