mac
#
- class ansys.dpf.core.operators.math.mac.mac(fields_containerA=None, fields_containerB=None, ponderation=None, config=None, server=None)#
Bases:
ansys.dpf.core.dpf_operator.Operator
Computes MAC Matrix between two fields container, both for real and complex cases. For mixed cases (real-complex and complex) only the real part is considered. Providing inputs with the same component scoping is an user responsability.
- Parameters:
fields_containerA (FieldsContainer) – Fields container a.
fields_containerB (FieldsContainer) – Fields container b.
ponderation (Field) – Field m, optional weighting for mac matrix computation.
- Returns:
field – Mac matrix for all the combinations between mode fields of field container a and field container b. results listed row by row.
- Return type:
Examples
>>> from ansys.dpf import core as dpf
>>> # Instantiate operator >>> op = dpf.operators.math.mac()
>>> # Make input connections >>> my_fields_containerA = dpf.FieldsContainer() >>> op.inputs.fields_containerA.connect(my_fields_containerA) >>> my_fields_containerB = dpf.FieldsContainer() >>> op.inputs.fields_containerB.connect(my_fields_containerB) >>> my_ponderation = dpf.Field() >>> op.inputs.ponderation.connect(my_ponderation)
>>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.math.mac( ... fields_containerA=my_fields_containerA, ... fields_containerB=my_fields_containerB, ... ponderation=my_ponderation, ... )
>>> # Get output data >>> result_field = op.outputs.field()
Overview#
Returns the default config of the operator. |
Import detail#
from ansys.dpf.core.operators.math.mac import mac
Property detail#
- property mac.inputs#
Enables to connect inputs to the operator
- Returns:
inputs
- Return type:
- property mac.outputs#
Enables to get outputs of the operator by evaluating it
- Returns:
outputs
- Return type:
Method detail#
- static mac.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.