ansys.dpf.core.operators.averaging.to_nodal#
- class ansys.dpf.core.operators.averaging.to_nodal(field=None, mesh_scoping=None, merge_solid_shell=None, shell_layer=None, config=None, server=None)#
Bases:
ansys.dpf.core.dpf_operator.Operator
Transforms a field into a Nodal field using an averaging process. The result is computed on a given node’s scoping.
- Parameters:
field (Field or FieldsContainer) – field or fields container with only one field is expected
mesh_scoping (Scoping, optional)
merge_solid_shell (bool, optional) – For shell/solid mixed fields, group in the same field all solids and shells (false by default). If this pin is true, a shell_layer needs to be specified.
shell_layer (int, optional) – 0: Top, 1: Bottom, 2: BottomTop, 3: Mid, 4: BottomTopMid. If merge_solid_shell is true, this pin needs to be specified to a value that extracts only one layer (Top, Bottom or Mid).
- Returns:
field
- Return type:
Examples
>>> from ansys.dpf import core as dpf
>>> # Instantiate operator >>> op = dpf.operators.averaging.to_nodal()
>>> # Make input connections >>> my_field = dpf.Field() >>> op.inputs.field.connect(my_field) >>> my_mesh_scoping = dpf.Scoping() >>> op.inputs.mesh_scoping.connect(my_mesh_scoping) >>> my_merge_solid_shell = bool() >>> op.inputs.merge_solid_shell.connect(my_merge_solid_shell) >>> my_shell_layer = int() >>> op.inputs.shell_layer.connect(my_shell_layer)
>>> # Instantiate operator and connect inputs in one line >>> op = dpf.operators.averaging.to_nodal( ... field=my_field, ... mesh_scoping=my_mesh_scoping, ... merge_solid_shell=my_merge_solid_shell, ... shell_layer=my_shell_layer, ... )
>>> # Get output data >>> result_field = op.outputs.field()
- _inputs#
- _outputs#
- static _spec() ansys.dpf.core.operators.specification.Specification #
- static default_config(server: ansys.dpf.core.server_types.AnyServerType = None) ansys.dpf.core.config.Config #
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 with channel connected to the remote or local instance. When
None
, attempts to use the global server.- Returns:
A new Config instance equivalent to the default config for this operator.
- Return type:
config
- property inputs: InputsToNodal#
Enables to connect inputs to the operator
- Returns:
An instance of InputsToNodal.
- Return type:
inputs
- property outputs: OutputsToNodal#
Enables to get outputs of the operator by evaluating it
- Returns:
An instance of OutputsToNodal.
- Return type:
outputs